Re: pgsql: Deduplicate choice of horizon for a relation procarray.c. - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: pgsql: Deduplicate choice of horizon for a relation procarray.c.
Date
Msg-id 20210827224639.GX17906@tamriel.snowman.net
Whole thread Raw
Responses Re: pgsql: Deduplicate choice of horizon for a relation procarray.c.  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Greetings,

* Andres Freund (andres@anarazel.de) wrote:
> As the code in question was only introduced in dc7420c2c92 it seems worth
> backpatching this change as well, otherwise 14 will look different from all
> other branches.

Interestingly, these patches ended up actually introducing a difference
between 14 and master in the form of:

GlobalVisTestFor(Relation rel)

-   GlobalVisState *state;
+   GlobalVisState *state = NULL;

being done on master but not in the 14 stable branch, leading to, at
least for me:

.../src/backend/storage/ipc/procarray.c: In function ‘GlobalVisTestFor’:
.../src/backend/storage/ipc/procarray.c:4054:9: warning: ‘state’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
 4054 |  return state;
      |         ^~~~~

Seems like we should include that change in 14 too, to get rid of the
above warning and to make that bit of code the same too..?

Thanks!

Stephen

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: New predefined roles- 'pg_read/write_all_data'
Next
From: Mark Dilger
Date:
Subject: Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)