pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org, Jacob Champion <pchampion@vmware.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Ashwin Agrawal <aagrawal@pivotal.io>
Cc: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Subject: Re: alter table set TABLE ACCESS METHOD
Date: Mon, 1 Mar 2021 11:16:36 +0900
Message-ID: <YDxOhIGLPEGYINNP@paquier.xyz> (raw)
In-Reply-To: <20210228222530.GD20769@telsasoft.com>
References: <20210228222530.GD20769@telsasoft.com>

On Sun, Feb 28, 2021 at 04:25:30PM -0600, Justin Pryzby wrote:
> I called this "set TABLE access method" rather than just "set access method"
> for the reasons given on the LIKE thread:
> https://www.postgresql.org/message-id/20210119210331.GN8560@telsasoft.com

ALTER TABLE applies to a table (or perhaps a sequence, still..), so
that sounds a bit weird to me to add again the keyword "TABLE" for
that.

> I've tested this with zedstore, but the lack of 2nd, in-core table AM limits
> testing possibilities.  It also limits at least my own ability to reason about
> the AM API.
>
> For example, I was surprised to hear that toast is a concept that's
> intended to be applied to AMs other than heap.
> https://www.postgresql.org/message-id/flat/CA%2BTgmoYTuT4sRtviMLOOO%2B79VnDCpCNyy9rK6UZFb7KEAVt21w%4...

What kind of advanced testing do you have in mind?  It sounds pretty
much enough to me for a basic patch to use the trick with heap2 as
your patch does.  That would be enough to be sure that the rewrite
happens and that data is still around.  If you are worrying about
recovery, a TAP test with an immediate stop of the server could
equally be used to check after the FPWs produced for the new
relfilenode during the rewrite.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (41+ messages)  latest in thread

Message-ID: <YDxOhIGLPEGYINNP@paquier.xyz>
Permalink:  ../YDxOhIGLPEGYINNP@paquier.xyz/
Also on:    postgresql.org/message-id/YDxOhIGLPEGYINNP@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, pryzby@telsasoft.com, pchampion@vmware.com, hlinnaka@iki.fi, aagrawal@pivotal.io, ashu.coek88@gmail.com, andres@anarazel.de, robertmhaas@gmail.com, amit.kapila16@gmail.com, alvherre@alvh.no-ip.org, dilipbalaut@gmail.com
  Subject: Re: alter table set TABLE ACCESS METHOD
  In-Reply-To: <YDxOhIGLPEGYINNP@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox