Hi Aleksander,
Well even assuming this patch will make it to the upstream some day,
which I seriously doubt, it will take somewhere between 2 and 5 years.
Personally I would recommend reconsidering this design.
I understand what you are saying. I have no plans to create a patch for this
issue. I
Hi,
> 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
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.
Hi,
> I would propose not to associate temporary relations with local buffers
The whole point of why local buffers exist is to place the buffers of
temp tables into MemoryContexts so that these tables will not fight
for the locks for shared buffers with the rest of the system. If we
start
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
Hi,
> Furthermore, there is some possible inconsistency in the code show below
> (REL_16_STABLE) in bufmgr.c file:
>
> FlushRelationBuffers, PrefetchBuffer uses RelationUsesLocalBuffers(rel).
> ExtendBufferedRel_common finally use BufferManagerRelation.relpersistence
> which is actually
Hi Aleksander,
Thank you for the reply.
> Could you please provide a specific example when the current code willdo
> something wrong/unintended?
I can't say that something is wrong in vanilla. But if you decide to
replicate DDL in some solutions like multimaster, you might want to
replicate
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
Dear Hackers,
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