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 253eaf-65604c80-3-6ad0a100@178302037
обсуждение исходный текст
Ответ на 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?  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-hackers
Hi Aleksander,

I sort of suspect that you are working on a very specific extension
and/or feature for PG fork. Any chance you could give us more details
about the case?

I'm trying to adapt a multimaster solution to some changes in pg16. We replicate temp table DDL due to some reasons. Furthermore, such tables should be accessible from other processes than the replication receiver process on a replica, and they still should be temporary. I understand that DML replication for temporary tables will cause a severe performance degradation. But it is not our case.

There are some changes in ReadBuffer logic if to compare with pg15. To define which buffers to use, ReadBuffer used SmgrIsTemp function in pg15. The decision was based on backend id of the relation. In pg16 the decision is based on relpersistence attribute, that caused some problems on my side. My opinion, we should choose local buffers based on backend ids of relations, not on its persistence. Additional check for relpersistence prior to backend id may improve the performance in some cases, I think. The internal design may become more flexible as a result.

With best regards,
Vitaly Davydov
 

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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: Don't use bms_membership in places where it's not needed
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH] fix race condition in libpq (related to ssl connections)