From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Harden new test case against force_parallel_mode = regress.
Date: Fri, 03 Mar 2023 12:46:42 -0500
Message-ID: <2504511.1677865602@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmobbA4gC103oSaFw+M7-ivmOMXRLAEx3Lwk+2asB92=4sg@mail.gmail.com>
References: <E1pXri2-001aid-6W@gemulon.postgresql.org>
<CA+TgmoY-dsB-6GyF8q+V0T5+0Gbw0cT6TE7_8SsnESeUHZpnZQ@mail.gmail.com>
<2478846.1677861476@sss.pgh.pa.us>
<CA+TgmobbA4gC103oSaFw+M7-ivmOMXRLAEx3Lwk+2asB92=4sg@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Mar 3, 2023 at 11:37 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> +ERROR: role "regress_psql_user" does not exist
>> +CONTEXT: while setting parameter "session_authorization" to "regress_psql_user"
> Oh, that's interesting (and sad). A parallel worker has a "startup
> transaction" that is used to restore library and GUC state, and then
> after that transaction commits, it starts up a new transaction that
> uses the same snapshot and settings as the transaction in the parallel
> leader. So the problem here is that the startup transaction can't see
> the uncommitted work of some unrelated (as far as it knows)
> transaction, and that prevents restoring the session_authorization
> GUC.
Got it.
> That startup transaction has broken stuff before, and it would be nice
> to get rid of it. Unfortunately, I don't remember right now why we
> need it in the first place. I'm fairly sure that if you load the
> library and GUC state without any transaction, that doesn't work,
> because a bunch of important processing gets skipped. And I think if
> you try to do those things in the "real" transaction that fails for
> some reason too, maybe that there's no guarantee that all the relevant
> GUCs can be changed at that point, but I'm fuzzy on the details at the
> moment.
Couldn't we install the leader's snapshot into both transactions?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: pgsql: Harden new test case against force_parallel_mode = regress.
In-Reply-To: <2504511.1677865602@sss.pgh.pa.us>
References: <E1pXri2-001aid-6W@gemulon.postgresql.org> <CA+TgmoY-dsB-6GyF8q+V0T5+0Gbw0cT6TE7_8SsnESeUHZpnZQ@mail.gmail.com> <2478846.1677861476@sss.pgh.pa.us> <CA+TgmobbA4gC103oSaFw+M7-ivmOMXRLAEx3Lwk+2asB92=4sg@mail.gmail.com> <2504511.1677865602@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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