Re: pg_sequence_last_value() for unlogged sequences on standbys
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>, pgsql-hackers@postgresql.org
Date: 2024-05-07T19:39:42Z
Lists: pgsql-hackers
Attachments
On Tue, May 07, 2024 at 03:02:01PM -0400, Tom Lane wrote: > Nathan Bossart <nathandbossart@gmail.com> writes: >> On Tue, May 07, 2024 at 01:44:16PM -0400, Tom Lane wrote: >>> +1 to include that, as it offers a defense if someone invokes this >>> function directly. In HEAD we could then rip out the test in the >>> view. > >> I apologize for belaboring this point, but I don't see how we would be >> comfortable removing that check unless we are okay with other sessions' >> temporary sequences appearing in the view, albeit with a NULL last_value. > > Oh! You're right, I'm wrong. I was looking at the CASE filter, which > we could get rid of -- but the "WHERE NOT pg_is_other_temp_schema(N.oid)" > part has to stay. Okay, phew. We can still do something like v3-0002 for v18. I'll give Michael a chance to comment on 0001 before committing/back-patching that one. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Remove redundant privilege check from pg_sequences system view.
- 7967d10c5b49 18.0 landed
-
Fix pg_sequence_last_value() for unlogged sequences on standbys.
- 2812059d3eea 12.20 landed
- 09ec5d45548a 13.16 landed
- c8714230ad35 14.13 landed
- 857d280c6528 15.8 landed
- c1664c8eefad 16.4 landed
- 3cb2f13ac500 17.0 landed