Re: In-placre persistance change of a relation

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(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, hlinnaka(at)iki(dot)fi, 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-06-05 04:52:21
Message-ID: Zl_vBVP4dNMCu1vb@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 04, 2024 at 03:50:51PM -0500, Nathan Bossart wrote:
> Bharath, does the multi-INSERT stuff apply when changing a table to be
> LOGGED? If so, I think it would be interesting to compare it with the FPI
> approach being discussed here.

The answer to this question is yes AFAIK. Look at patch 0002 in the
latest series posted here, that touches ATRewriteTable() in
tablecmds.c where the rewrite happens should a relation's
relpersistence, AM, column or default requires a switch (particularly
if more than one property is changed in a single command, grep for
AT_REWRITE_*):
https://www.postgresql.org/message-id/CALj2ACUz5+_YNEa4ZY-XG960_oXefM50MjD71VgSCAVDkF3bzQ@mail.gmail.com

I've just read through the patch set, and they are rather pleasant to
the eye. I have comments about them, actually, but that's a topic for
the other thread.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-06-05 05:04:39 Re: Fix use of possible uninitialized variable retval (src/pl/plpgsql/src/pl_handler.c)
Previous Message Kyotaro Horiguchi 2024-06-05 04:12:41 Re: Fix use of possible uninitialized variable retval (src/pl/plpgsql/src/pl_handler.c)