diff options
author | Tom Lane | 2008-01-14 02:53:31 +0000 |
---|---|---|
committer | Tom Lane | 2008-01-14 02:53:31 +0000 |
commit | b775d93acb961ceea1371d6c724317e1ea6f3242 (patch) | |
tree | b75ed480412843e36816c46a35f9def81cc8135b | |
parent | 66661858aedf01d358cb7081a8d5d645821c452c (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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index 48194e3a6e..d252e23847 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.31 2007/10/22 17:29:35 tgl Exp $ + * $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.32 2008/01/14 02:53:31 tgl Exp $ * * Copyright (c) 2001,2002 Tatsuo Ishii * @@ -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 */ |