summaryrefslogtreecommitdiff
path: root/src/backend/commands/analyze.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/analyze.c')
-rw-r--r--src/backend/commands/analyze.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index f13e247916..ee1defbc97 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -524,8 +524,8 @@ acquire_sample_rows(Relation onerel, HeapTuple *rows, int targrows,
/*
* Do a simple linear scan until we reach the target number of rows.
*/
- scan = heap_beginscan(onerel, false, SnapshotNow, 0, NULL);
- while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
+ scan = heap_beginscan(onerel, SnapshotNow, 0, NULL);
+ while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
rows[numrows++] = heap_copytuple(tuple);
if (numrows >= targrows)