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

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: How to accurately determine when a relation should use local buffers?
Дата
Msg-id CAJ7c6TO3b=Fqb9jYYNiMG5vVPXrOrS3HY==8VO-TzGRkME0QPQ@mail.gmail.com
обсуждение исходный текст
Ответ на How to accurately determine when a relation should use local buffers?  (Давыдов Виталий <v.davydov@postgrespro.ru>)
Ответы Re: How to accurately determine when a relation should use local buffers?  (Vitaly Davydov <vitprof@gmail.com>)
Список pgsql-hackers
Hi,

> 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,
whilethe other macro verifies the relation persistence characteristic. It seems, the use of each function independently
isnot correct. I think, these functions should be applied in pair to check for local buffers use, but, it seems, these
functionsare used independently. It works until temporary tables are allowed only in session backends. 

Could you please provide a specific example when the current code will
do something wrong/unintended?

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

Temporary tables, by definition, are visible only within one session.
I can't imagine how and why they would be replicated.

--
Best regards,
Aleksander Alekseev



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [PATCH] fix race condition in libpq (related to ssl connections)