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

From: Давыдов Виталий <v(dot)davydov(at)postgrespro(dot)ru>
To: "Aleksander Alekseev" <aleksander(at)timescale(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, "Vitaly Davydov" <vitprof(at)gmail(dot)com>
Subject: Re: How to accurately determine when a relation should use local buffers?
Date: 2023-11-24 07:10:17
Message-ID: 253eaf-65604c80-3-6ad0a100@178302037
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
 

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-11-24 07:48:58 Re: [PATCH] fix race condition in libpq (related to ssl connections)
Previous Message Richard Guo 2023-11-24 06:53:50 Re: Don't use bms_membership in places where it's not needed