How to accurately determine when a relation should use local buffers?

Поиск
Список
Период
Сортировка
От Давыдов Виталий
Тема How to accurately determine when a relation should use local buffers?
Дата
Msg-id 2362e7-655c3a80-1-1dbb4d20@48286261
обсуждение исходный текст
Ответы Re: How to accurately determine when a relation should use local buffers?  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-hackers
Dear Hackers,

I would like to clarify, what the correct way is to determine that a given relation is using local buffers. Local buffers, as far as I know, are used for temporary tables in backends. There are two functions/macros (bufmgr.c): SmgrIsTemp, RelationUsesLocalBuffers. The first function verifies that the current process is a regular session backend, while the other macro verifies the relation persistence characteristic. It seems, the use of each function independently is not correct. I think, these functions should be applied in pair to check for local buffers use, but, it seems, these functions are used independently. It works until temporary tables are allowed only in session backends.

I'm concerned, how to determine the use of local buffers in some other theoretical cases? For example, if we decide to replicate temporary tables? Are there the other cases, when local buffers can be used with relations in the Vanilla? Do we allow the use of relations with RELPERSISTENCE_TEMP not only in session backends?

Thank you in advance for your help!

With best regards,
Vitaly Davydov

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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Do away with a few backwards compatibility macros
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Do away with a few backwards compatibility macros