From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Restrict the use of temporary namespace in two-phase transaction
Date: Fri, 18 Jan 2019 15:34:30 -0500
Message-ID: <499.1547843670@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZaCNTxXzV76zuyMuc8N9vU6RgEhVu8t9dXDcKqThUW7A@mail.gmail.com>
References: <E1gkHvw-00010c-3O@gemulon.postgresql.org>
<20190118005949.GD1883@paquier.xyz>
<25291.1547773687@sss.pgh.pa.us>
<CA+TgmoZaCNTxXzV76zuyMuc8N9vU6RgEhVu8t9dXDcKqThUW7A@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jan 17, 2019 at 8:08 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Anyway, it seems to me that this is pointing out to another issue:
>>> current_schema() can trigger a namespace creation, hence shouldn't we
>>> mark it as PARALLEL UNSAFE and make sure that we never run into this
>>> problem?
>> That seems a bit annoying, but maybe we have little choice?
> The only other option I see is to make current_schema() not trigger a
> namespace creation.
Seems hard to avoid. We could conceivably make it return "pg_temp"
for the temp schema instead of the schema's actual name, but it's
not very hard to think of ways whereby that would make use of the
result fail in contexts where it previously worked.
Another idea is to force creation of the temp namespace as soon as
we see that search_path references it. I'm not very sure exactly
where would be a convenient place to make that happen, though.
There are paths whereby the GUC's value will change outside a
transaction, so we couldn't tie it directly to the GUC update.
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Restrict the use of temporary namespace in two-phase transaction
In-Reply-To: <499.1547843670@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