Re: BUG #18545: \dt breaks transaction, calling error when executed in SET SESSION AUTHORIZATION

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Андрей Рачицкий <therealgofman@mail.ru>
Cc: pgsql-bugs@lists.postgresql.org, Robert Haas <robertmhaas@gmail.com>
Date: 2024-07-31T22:59:16Z
Lists: pgsql-bugs, pgsql-hackers
=?UTF-8?B?0JDQvdC00YDQtdC5INCg0LDRh9C40YbQutC40Lk=?= <therealgofman@mail.ru> writes:
> Hi, Tom! Thank you for work on the subject.  After applying patch, problem is no longer reproducible.

Thanks for checking.  I realized that the idea of making
check_session_authorization a no-op was wrong as presented:
if we don't set up an "extra" struct then guc.c would be
unable to restore the setting later, in case say a function
that's run inside the parallel query has a SET
session_authorization clause.  It's probably possible to
revive that idea with more work, but it's not essential to the
bug fix and we're getting close to the August minor releases.
So I pushed the core bug fix, and I'll take another look at
that part later.

			regards, tom lane



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix parallel worker tracking of new catalog relfilenumbers.

  2. Restore relmapper state early enough in parallel workers.

  3. Allow parallel workers to cope with a newly-created session user ID.

  4. Clean up handling of client_encoding GUC in parallel workers.

  5. Fix rd_firstRelfilenodeSubid for nailed relations, in parallel workers.

  6. Fix several mistakes around parallel workers and client_encoding.