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

Поиск
Список
Период
Сортировка
От Давыдов Виталий
Тема Re: How to accurately determine when a relation should use local buffers?
Дата
Msg-id 242bdb-655dd800-3-6e134d00@180535496
обсуждение исходный текст
Ответ на Re: How to accurately determine when a relation should use local buffers?  (Aleksander Alekseev <aleksander@timescale.com>)
Ответы Re: How to accurately determine when a relation should use local buffers?
Список pgsql-hackers
Hi Aleksander,

Thank you for your answers. It seems, local buffers are used for temporary relations unconditionally. In this case, we may check either relpersistence or backend id, or both of them.

I didn't do a deep investigation of the code in this particular aspect but that could be a fair point. Would you like to propose a refactoring that unifies the way we check if the relation is temporary?

I would propose not to associate temporary relations with local buffers. I would say, that we that we should choose local buffers only in a backend context. It is the primary condition. ​​​Thus, to choose local buffers, two checks should be succeeded:
  • relpersistence (RelationUsesLocalBuffers)
  • backend id (SmgrIsTemp)
I know, it may be not as effective as to check relpersistence only, but ​​​​​it makes the internal architecture more flexible, I believe.

With best regards,
Vitaly Davydov



 

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

Предыдущее
От: Xiang Gao
Дата:
Сообщение: RE: CRC32C Parallel Computation Optimization on ARM
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: undetected deadlock in ALTER SUBSCRIPTION ... REFRESH PUBLICATION