projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ee6af7
)
Fix pgstat_heap() to not be broken by syncscans starting from a block
author
Tom Lane
<tgl@sss.pgh.pa.us>
Mon, 14 Jan 2008 02:53:31 +0000
(
02:53
+0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Mon, 14 Jan 2008 02:53:31 +0000
(
02:53
+0000)
higher than zero. Same problem as just detected in CREATE INDEX
CONCURRENTLY.
contrib/pgstattuple/pgstattuple.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pgstattuple/pgstattuple.c
b/contrib/pgstattuple/pgstattuple.c
index 176f517c52001b35762d31551ee28c95517f036d..0f9de66344c65c63d53728b37aac097c50de255c 100644
(file)
--- 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 */