Re: Calling PrepareTempTablespaces in BufFileCreateTemp
От | Ashwin Agrawal |
---|---|
Тема | Re: Calling PrepareTempTablespaces in BufFileCreateTemp |
Дата | |
Msg-id | CALfoeisJU5SJ-9GWvr7XyqgMpe16y8r0cpLNW-SLDw8E0ho6-w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Calling PrepareTempTablespaces in BufFileCreateTemp (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Calling PrepareTempTablespaces in BufFileCreateTemp
|
Список | pgsql-hackers |
On Thu, Apr 25, 2019 at 9:45 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
However, by that argument we should change all 3 of these functions to
set up the data. If we're eating the layering violation to the extent
of letting OpenTemporaryFile call into commands/tablespace, then there's
little reason for the other 2 not to do likewise.
I agree to that point, same logic should be used for all three calls irrespective of the approach we pick.
I still remain concerned that invoking catalog lookups from fd.c is a darn
bad idea, even if we have a fallback for it to work (for some value of
"work") in non-transactional states. It's not really hard to envision
that kind of thing leading to infinite recursion. I think it's safe
right now, because catalog fetches shouldn't lead to any temp-file
access, but that's sort of a rickety assumption isn't it?
Is there (easy) way to assert for that assumption? If yes, then can add the same and make it not rickety.
Though I agree any exceptions/violations coded generally bites in long run somewhere later.
В списке pgsql-hackers по дате отправления: