Re: Calling PrepareTempTablespaces in BufFileCreateTemp - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Calling PrepareTempTablespaces in BufFileCreateTemp
Date
Msg-id 8377.1556291111@sss.pgh.pa.us
Whole thread Raw
In response to Re: Calling PrepareTempTablespaces in BufFileCreateTemp  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Calling PrepareTempTablespaces in BufFileCreateTemp
Re: Calling PrepareTempTablespaces in BufFileCreateTemp
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> I think that one piece is missing from the patch.  Wouldn't it be
> better to add an assertion at the beginning of OpenTemporaryFile() to
> make sure that PrepareTempTablespaces() has been called when interXact
> is true?  We could just go with that:
> Assert(!interXact || TempTablespacesAreSet());

The version that I posted left it to GetNextTempTableSpace to assert
that.  That seemed cleaner to me than an Assert that has to depend
on interXact.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: findTargetlistEntrySQL92() and COLLATE clause
Next
From: Alvaro Herrera
Date:
Subject: Re: Fwd: Add tablespace tap test to pg_rewind