Re: Proper object locking for GRANT/REVOKE
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-11-15T10:19:50Z
Lists: pgsql-hackers
On 11.11.24 08:53, Bertrand Drouvot wrote: >> Maybe it would be better to push the assertion into get_object_address(), >> something like >> >> Assert(!relation || relp) >> >> near the end. > > That looks like a good idea to me, that would make the code cleaner and easier > to understand. > >> Meaning, if you pass NULL for the relp argument, then you >> don't expect a relation. This is kind of what will happen now anyway, >> except with a segfault instead of an assertion. > > Yeah, I like it. > > So, something like the attached (provided as .txt file to no mess up the CF bot > entry related to this thread) could be applied before? Thanks. I have applied your patch and then also mine with the appropriate adjustments.
Commits
-
Put back intra-grant-inplace.spec test coverage
- 310d04169a41 19 (unreleased) landed
- baf45ba0533f 18.0 landed
-
Improve objectNamesToOids() comment
- e36fa9319b13 19 (unreleased) landed
- 118601a7e8c0 18.0 landed
-
Proper object locking for GRANT/REVOKE
- d31bbfb6590e 18.0 landed
-
Add an assertion in get_object_address()
- e468ec0fddcd 18.0 landed