Re: pgsql: Restrict the use of temporary namespace in two-phase transaction

2019-01-22 Thread Masahiko Sawada
On Tue, Jan 22, 2019 at 2:17 PM Michael Paquier wrote: > > On Tue, Jan 22, 2019 at 01:47:05PM +0900, Masahiko Sawada wrote: > > Or can we make the test script set force_parallel_mode = off? Since > > the failure case is a very rare in real world I think that it might be > > better to change the te

Re: pgsql: Restrict the use of temporary namespace in two-phase transaction

2019-01-21 Thread Michael Paquier
On Tue, Jan 22, 2019 at 01:47:05PM +0900, Masahiko Sawada wrote: > Or can we make the test script set force_parallel_mode = off? Since > the failure case is a very rare in real world I think that it might be > better to change the test scripts rather than changing properly of > current_schema(). P

Re: pgsql: Restrict the use of temporary namespace in two-phase transaction

2019-01-21 Thread Masahiko Sawada
On Sat, Jan 19, 2019 at 5:05 AM Robert Haas wrote: > > On Thu, Jan 17, 2019 at 8:08 PM Tom Lane 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 sur

Re: pgsql: Restrict the use of temporary namespace in two-phase transaction

2019-01-18 Thread Michael Paquier
On Sat, Jan 19, 2019 at 09:08:27AM +0900, Michael Paquier wrote: > On Fri, Jan 18, 2019 at 03:34:30PM -0500, Tom Lane wrote: >> 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

Re: pgsql: Restrict the use of temporary namespace in two-phase transaction

2019-01-18 Thread Michael Paquier
On Fri, Jan 18, 2019 at 03:34:30PM -0500, Tom Lane wrote: > 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

Re: pgsql: Restrict the use of temporary namespace in two-phase transaction

2019-01-18 Thread Tom Lane
Robert Haas writes: > On Thu, Jan 17, 2019 at 8:08 PM Tom Lane 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 >>> probl

Re: pgsql: Restrict the use of temporary namespace in two-phase transaction

2019-01-18 Thread Robert Haas
On Thu, Jan 17, 2019 at 8:08 PM Tom Lane 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 bi