From 1c61fd8b527954f0ec522e5e60a11ce82628b681 Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Tue, 3 Sep 2024 12:44:54 -0700 Subject: [PATCH] Fix stack variable scope from previous commit. The defect came from me, not from that commit's credited author. Per buildfarm members olingo and grassquit. Discussion: https://postgr.es/m/20240903192030.1e@rfd.leadboat.com --- contrib/pg_visibility/pg_visibility.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/pg_visibility/pg_visibility.c b/contrib/pg_visibility/pg_visibility.c index 9975e8876e..db796e35cb 100644 --- a/contrib/pg_visibility/pg_visibility.c +++ b/contrib/pg_visibility/pg_visibility.c @@ -490,6 +490,7 @@ collect_visibility_data(Oid relid, bool include_pd) BlockNumber blkno; Buffer vmbuffer = InvalidBuffer; BufferAccessStrategy bstrategy = GetAccessStrategy(BAS_BULKREAD); + BlockRangeReadStreamPrivate p; ReadStream *stream = NULL; rel = relation_open(relid, AccessShareLock); @@ -505,8 +506,6 @@ collect_visibility_data(Oid relid, bool include_pd) /* Create a stream if reading main fork. */ if (include_pd) { - BlockRangeReadStreamPrivate p; - p.current_blocknum = 0; p.last_exclusive = nblocks; stream = read_stream_begin_relation(READ_STREAM_FULL,