Fix stack variable scope from previous commit.
authorNoah Misch <noah@leadboat.com>
Tue, 3 Sep 2024 19:44:54 +0000 (12:44 -0700)
committerNoah Misch <noah@leadboat.com>
Tue, 3 Sep 2024 19:44:54 +0000 (12:44 -0700)
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

index 9975e8876e63077eb2328df3415ba890b6a77f86..db796e35cb2f8fd2e9b4678f9e282ffedac66178 100644 (file)
@@ -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,