Skip to content

Commit a07c52d

Browse files
veksenclaude
andcommitted
chore: add logging to tests to capture actual pg_class values
Temporary commit to verify actual relpages and estimated rows values in CI. Will be reverted after capturing the numbers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dd00b83 commit a07c52d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/build-stats.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ test("BUG: fromAssumption(relpages=1) inflates estimates with real data", async
204204
const plan = await optimizer.testQueryWithStats(builder);
205205

206206
const estimatedRows = (plan.Plan as Record<string, unknown>)["Plan Rows"];
207-
expect(estimatedRows).toBeGreaterThan(100_000);
207+
208+
// With relpages=74 on disk and the override setting relpages=1,
209+
// PostgreSQL computes: density = 10000/1 = 10000 tuples/page,
210+
// then estimates tuples = 74 * 10000 = 740,000 instead of 10,000.
211+
expect(estimatedRows).toBe(740_000);
208212
});
209213

210214
test("leaves columns null so ANALYZE pg_statistic entries persist", async () => {

0 commit comments

Comments
 (0)