Re: un-revert the MAINTAIN privilege and the pg_maintain predefined role

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Nathan Bossart <nathandbossart@gmail.com>, pgsql-hackers@postgresql.org
Date: 2024-03-13T16:49:26Z
Lists: pgsql-hackers
On Tue, 2024-03-12 at 16:05 -0500, Nathan Bossart wrote:
> It's easy enough to resolve this inconsistency by sending
> down the parent OID when recursing to a TOAST table and using that
> for the
> privilege checks.  AFAICT this avoids any kind of cache lookup
> hazards
> because we hold a session lock on the main relation in this case. 
> I've
> done this in the attached v2.

Looks good to me. Thank you for expanding on the comment, as well.

Regards,
	Jeff Davis





Commits

  1. Reintroduce MAINTAIN privilege and pg_maintain predefined role.

  2. Revert MAINTAIN privilege and pg_maintain predefined role.