Re: Calling PrepareTempTablespaces in BufFileCreateTemp
Melanie Plageman <melanieplageman@gmail.com>
From: Melanie Plageman <melanieplageman@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Geoghegan <pg@bowt.ie>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-04-24T19:08:24Z
Lists: pgsql-hackers
On Tue, Apr 23, 2019 at 1:06 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > There are three functions in fd.c that have a dependency on the > temp tablespace info having been set up: > OpenTemporaryFile > GetTempTablespaces > GetNextTempTableSpace > This patch makes the first of those automatically set up the info > if it's not done yet. The second one has always had an assertion > that the caller did it already, and now the third one does too. > An about equally plausible change would be to make all three > call PrepareTempTablespaces, but there are so few callers of the > second and third that I'm not sure that'd be better. Thoughts? > > I think an assertion is sufficiently clear for GetNextTempTableSpace based on what it does and its current callers. The same is probably true for GetTempTableSpaces. -- Melanie Plageman
Commits
-
Make BufFileCreateTemp() ensure that temp tablespaces are set up.
- 93f03dad824f 12.0 landed