Re: Parallell hashjoin sometimes ignores temp_tablespaces

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Parallell hashjoin sometimes ignores temp_tablespaces
Дата
Msg-id 930701.1593785792@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Parallell hashjoin sometimes ignores temp_tablespaces  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Parallell hashjoin sometimes ignores temp_tablespaces  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Thanks. pushed!

Sorry for not having paid more attention earlier, but this patch is
quite broken.  If it weren't misguided it'd still be wrong, because
this isn't the only spot in PrepareTempTablespaces that inserts
InvalidOid into the output list.

But, in fact, it's intentional that we represent the DB's default
tablespace by InvalidOid in that list.  Some callers of
GetNextTempTableSpace need that to be the case, either for
permissions-checking reasons or because they're going to store the
result into a temp table's pg_class.reltablespace, where that
representation is *required*.

I see that this is perhaps underdocumented, since while
GetNextTempTableSpace's comment mentions the behavior, there's
no comment about it with the data structure proper.

It looks to me like the actual bug here is that whoever added
GetTempTablespaces() and made sharedfileset.c depend on it
did not get the memo about what to do with InvalidOid.
It's possible that we could safely make GetTempTablespaces()
do the substitution, but that would be making fd.c assume more
about the usage of GetTempTablespaces() than I think it ought to.
I feel like we oughta fix sharedfileset.c, instead.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: TAP tests and symlinks on Windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: warnings for invalid function casts