diff options
author | Tom Lane | 2008-01-14 02:53:31 +0000 |
---|---|---|
committer | Tom Lane | 2008-01-14 02:53:31 +0000 |
commit | dbbe96708b9e1d4ad39851fcdf66ac145d6aa451 (patch) | |
tree | 9279b913b640f12978a488b7cd7be087a187bc79 | |
parent | 5ee6af7f860267552ead5db2d53bcf704bf44887 (diff) |
Fix pgstat_heap() to not be broken by syncscans starting from a block
higher than zero. Same problem as just detected in CREATE INDEX
CONCURRENTLY.
-rw-r--r-- | contrib/pgstattuple/pgstattuple.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index 176f517c52..0f9de66344 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -255,7 +255,8 @@ pgstat_heap(Relation rel, FunctionCallInfo fcinfo) Buffer buffer; pgstattuple_type stat = {0}; - scan = heap_beginscan(rel, SnapshotAny, 0, NULL); + /* Disable syncscan because we assume we scan from block zero upwards */ + scan = heap_beginscan_strat(rel, SnapshotAny, 0, NULL, true, false); nblocks = scan->rs_nblocks; /* # blocks to be scanned */ |