Re: In-placre persistance change of a relation

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, nathandbossart(at)gmail(dot)com, postgres(at)jeltef(dot)nl, smithpb2250(at)gmail(dot)com, vignesh21(at)gmail(dot)com, jakub(dot)wartak(at)enterprisedb(dot)com, stark(dot)cfm(at)gmail(dot)com, barwick(at)gmail(dot)com, jchampion(at)timescale(dot)com, pryzby(at)telsasoft(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, rjuju123(at)gmail(dot)com, jakub(dot)wartak(at)tomtom(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, bharath(dot)rupireddyforpostgres(at)gmail(dot)com
Subject: Re: In-placre persistance change of a relation
Date: 2024-09-02 00:30:20
Message-ID: ZtUHHMVv1-PqxYdZ@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 01, 2024 at 10:15:00PM +0300, Heikki Linnakangas wrote:
> I wonder if the twophase state files and undo log files should be merged
> into one file. They're similar in many ways: there's one file per
> transaction, named using the XID. I haven't thought this fully through, just
> a thought..

Hmm. It could be possible to extract some of this knowledge out of
twophase.c and design some APIs that could be used for both, but would
that be really necessary? The 2PC data and the LSNs used by the files
to check if things are replayed or on disk rely on
GlobalTransactionData that has its own idea of things and timings at
recovery.

Or perhaps your point is actually to do that and add one layer for the
file handlings and their flush timings? I am not sure, TBH, what this
thread is trying to fix is complicated enough that it may be better to
live with two different code paths. But perhaps my gut feeling is
just wrong reading your paragraph.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-09-02 00:43:56 Re: Minor refactor: Use more consistent names for the labels of PG_Locale_Strategy
Previous Message Peter Smith 2024-09-02 00:16:50 DOCS - pg_replication_slot . Fix the 'inactive_since' description