Re: How to accurately determine when a relation should use local buffers? - Mailing list pgsql-hackers

From Давыдов Виталий
Subject Re: How to accurately determine when a relation should use local buffers?
Date
Msg-id 253eaf-65604c80-3-6ad0a100@178302037
Whole thread Raw
In response to Re: How to accurately determine when a relation should use local buffers?  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: How to accurately determine when a relation should use local buffers?
List 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 by date:

Previous
From: Richard Guo
Date:
Subject: Re: Don't use bms_membership in places where it's not needed
Next
From: Michael Paquier
Date:
Subject: Re: [PATCH] fix race condition in libpq (related to ssl connections)