Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb775d93

Browse files
committed
Fix pgstat_heap() to not be broken by syncscans starting from a block
higher than zero. Same problem as just detected in CREATE INDEXCONCURRENTLY.
1 parent6666185 commitb775d93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎contrib/pgstattuple/pgstattuple.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.31 2007/10/22 17:29:35 tgl Exp $
2+
* $PostgreSQL: pgsql/contrib/pgstattuple/pgstattuple.c,v 1.32 2008/01/14 02:53:31 tgl Exp $
33
*
44
* Copyright (c) 2001,2002Tatsuo Ishii
55
*
@@ -255,7 +255,8 @@ pgstat_heap(Relation rel, FunctionCallInfo fcinfo)
255255
Bufferbuffer;
256256
pgstattuple_typestat= {0};
257257

258-
scan=heap_beginscan(rel,SnapshotAny,0,NULL);
258+
/* Disable syncscan because we assume we scan from block zero upwards */
259+
scan=heap_beginscan_strat(rel,SnapshotAny,0,NULL, true, false);
259260

260261
nblocks=scan->rs_nblocks;/* # blocks to be scanned */
261262

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp