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

From Peter Geoghegan
Subject Re: Calling PrepareTempTablespaces in BufFileCreateTemp
Date
Msg-id CAH2-Wz=K5YMDyWq1Bd8rzkz9DhjfkcP5VnvfX-eO-wZ2QQ32GA@mail.gmail.com
Whole thread Raw
In response to Calling PrepareTempTablespaces in BufFileCreateTemp  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: Calling PrepareTempTablespaces in BufFileCreateTemp
List pgsql-hackers
On Mon, Apr 22, 2019 at 3:12 PM Melanie Plageman
<melanieplageman@gmail.com> wrote:
> PrepareTempTablespaces is called by most callers of BufFileCreateTemp, so I was
> wondering if there is a reason not to call it inside BufFileCreateTemp.

The best answer I can think of is that a BufFileCreateTemp() caller
might not want to do catalog access. Perhaps the contortions within
assign_temp_tablespaces() are something that callers ought to opt in
to explicitly.

That doesn't seem like a particularly good or complete answer, though.
Perhaps it should simply be called within BufFileCreateTemp(). The
BufFile/fd.c layering is confusing in a number of ways IMV.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_dump is broken for partition tablespaces
Next
From: Alvaro Herrera
Date:
Subject: Re: pg_dump is broken for partition tablespaces