Re: In-placre persistance change of a relation

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, michael(at)paquier(dot)xyz
Cc: 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-10-28 13:33:41
Message-ID: 9d45c156-caad-4197-b77d-47dfbbe74eb4@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31/08/2024 19:09, Kyotaro Horiguchi wrote:
> Subject: [PATCH v34 03/16] Remove function for retaining files on outer
> transaction aborts
>
> The function RelationPreserveStorage() was initially created to keep
> storage files committed in a subtransaction on the abort of outer
> transactions. It was introduced by commit b9b8831ad6 in 2010, but no
> use case for this behavior has emerged since then. If we move the
> at-commit removal feature of storage files from pendingDeletes to the
> UNDO log system, the UNDO system would need to accept the cancellation
> of already logged entries, which makes the system overly complex with
> no benefit. Therefore, remove the feature.

I don't think that's quite right. I don't think this was meant for
subtransaction aborts, but to make sure that if the top-transaction
aborts after AtEOXact_RelationMap() has already been called, we don't
remove the new relation. AtEOXact_RelationMap() is called very late in
the commit process to keep the window as small as possible, but if it
nevertheless happens, the consequences are pretty bad if you remove a
relation file that is in fact needed.

--
Heikki Linnakangas
Neon (https://neon.tech)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-10-28 13:40:04 Re: Vacuum statistics
Previous Message Daniel Gustafsson 2024-10-28 13:24:00 Re: [PoC] Federated Authn/z with OAUTHBEARER