pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Deduplicate choice of horizon for a relation procarray.c.
4+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2021-09-13 0d0bbee5e3 Fix potential for compiler warning in GlobalVisTestFor().
* pgsql: Deduplicate choice of horizon for a relation procarray.c.
@ 2021-07-25 03:34 Andres Freund <andres@anarazel.de>
2021-07-25 03:34 ` pgsql: Deduplicate choice of horizon for a relation procarray.c. Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 4+ messages in thread
From: Andres Freund @ 2021-07-25 03:34 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Deduplicate choice of horizon for a relation procarray.c.
5a1e1d83022 was a minimal bug fix for dc7420c2c92. To avoid future bugs of
that kind, deduplicate the choice of a relation's horizon into a new helper,
GlobalVisHorizonKindForRel().
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.
A different approach to this was suggested by Matthias van de Meent.
Author: Andres Freund
Discussion: https://postgr.es/m/20210621122919.2qhu3pfugxxp3cji@alap3.anarazel.de
Backpatch: 14, like 5a1e1d83022
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/3d0a4636aa4c976e971c05c77e162fc70c61f40b
Modified Files
--------------
src/backend/storage/ipc/procarray.c | 98 ++++++++++++++++++++++++-------------
1 file changed, 64 insertions(+), 34 deletions(-)
^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Deduplicate choice of horizon for a relation procarray.c.
2021-07-25 03:34 pgsql: Deduplicate choice of horizon for a relation procarray.c. Andres Freund <andres@anarazel.de>
@ 2021-07-25 03:34 ` Andres Freund <andres@anarazel.de>
2021-08-27 22:46 ` Re: pgsql: Deduplicate choice of horizon for a relation procarray.c. Stephen Frost <sfrost@snowman.net>
0 siblings, 1 reply; 4+ messages in thread
From: Andres Freund @ 2021-07-25 03:34 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Deduplicate choice of horizon for a relation procarray.c.
5a1e1d83022 was a minimal bug fix for dc7420c2c92. To avoid future bugs of
that kind, deduplicate the choice of a relation's horizon into a new helper,
GlobalVisHorizonKindForRel().
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.
A different approach to this was suggested by Matthias van de Meent.
Author: Andres Freund
Discussion: https://postgr.es/m/20210621122919.2qhu3pfugxxp3cji@alap3.anarazel.de
Backpatch: 14, like 5a1e1d83022
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d9d8aa9bb9aa2a850f53facd2c91e454129af57b
Modified Files
--------------
src/backend/storage/ipc/procarray.c | 101 +++++++++++++++++++++++-------------
1 file changed, 66 insertions(+), 35 deletions(-)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Deduplicate choice of horizon for a relation procarray.c.
2021-07-25 03:34 pgsql: Deduplicate choice of horizon for a relation procarray.c. Andres Freund <andres@anarazel.de>
2021-07-25 03:34 ` pgsql: Deduplicate choice of horizon for a relation procarray.c. Andres Freund <andres@anarazel.de>
@ 2021-08-27 22:46 ` Stephen Frost <sfrost@snowman.net>
2021-09-14 00:01 ` Re: pgsql: Deduplicate choice of horizon for a relation procarray.c. Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Frost @ 2021-08-27 22:46 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-hackers@lists.postgresql.org
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
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Deduplicate choice of horizon for a relation procarray.c.
2021-07-25 03:34 pgsql: Deduplicate choice of horizon for a relation procarray.c. Andres Freund <andres@anarazel.de>
2021-07-25 03:34 ` pgsql: Deduplicate choice of horizon for a relation procarray.c. Andres Freund <andres@anarazel.de>
2021-08-27 22:46 ` Re: pgsql: Deduplicate choice of horizon for a relation procarray.c. Stephen Frost <sfrost@snowman.net>
@ 2021-09-14 00:01 ` Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 4+ messages in thread
From: Andres Freund @ 2021-09-14 00:01 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: pgsql-hackers@lists.postgresql.org
Hi,
On 2021-08-27 18:46:39 -0400, Stephen Frost wrote:
> * 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..?
Done! Stupid oversight :(
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-09-14 00:01 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25 03:34 pgsql: Deduplicate choice of horizon for a relation procarray.c. Andres Freund <andres@anarazel.de>
2021-07-25 03:34 ` Andres Freund <andres@anarazel.de>
2021-08-27 22:46 ` Stephen Frost <sfrost@snowman.net>
2021-09-14 00:01 ` Andres Freund <andres@anarazel.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox