Re: Calling PrepareTempTablespaces in BufFileCreateTemp

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Ashwin Agrawal <aagrawal(at)pivotal(dot)io>, Peter Geoghegan <pg(at)bowt(dot)ie>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Calling PrepareTempTablespaces in BufFileCreateTemp
Date: 2019-04-26 15:05:11
Message-ID: 8377.1556291111@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-04-26 15:18:29 Re: Fwd: Add tablespace tap test to pg_rewind
Previous Message Tom Lane 2019-04-26 15:02:46 Re: findTargetlistEntrySQL92() and COLLATE clause