Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP82B-0005hS-Un for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Mar 2021 18:15:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lP82A-0004jH-S9 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Mar 2021 18:15:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP82A-0004j9-Kr for pgsql-hackers@lists.postgresql.org; Wed, 24 Mar 2021 18:15:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP828-00087F-H6 for pgsql-hackers@lists.postgresql.org; Wed, 24 Mar 2021 18:15:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12OIF2pp1112853; Wed, 24 Mar 2021 14:15:02 -0400 From: Tom Lane To: Justin Pryzby cc: Robert Haas , Andrew Dunstan , Dilip Kumar , Alvaro Herrera , Andres Freund , Tomas Vondra , Alexander Korotkov , David Steele , Ildus Kurbangaliev , Dmitry Dolgov <9erthalion6@gmail.com>, pgsql-hackers@lists.postgresql.org Subject: Re: [HACKERS] Custom compression methods In-reply-to: <20210324175815.GE15100@telsasoft.com> References: <20210320074420.GR11765@telsasoft.com> <20210320153933.GT11765@telsasoft.com> <229250.1616261775@sss.pgh.pa.us> <261449.1616267030@sss.pgh.pa.us> <1099280.1616600518@sss.pgh.pa.us> <20210324172450.GD15100@telsasoft.com> <20210324175815.GE15100@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Wed, 24 Mar 2021 12:58:15 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1112851.1616609702.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 24 Mar 2021 14:15:02 -0400 Message-ID: <1112852.1616609702@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > On Wed, Mar 24, 2021 at 01:30:26PM -0400, Robert Haas wrote: >> ... So --no-toast-compression is just fine for people who are >> dumping and restoring, but it's no help at all if you want to switch >> TOAST compression methods while doing a pg_upgrade. However, what does >> help with that is sticking with what Tom committed before rather than >> changing to what he's proposing now. > I don't know what/any other cases support using pg_upgrade to change stu= ff like > the example (changing to lz4). The way to do it is to make the changes = either > before or after. It seems weird to think that pg_upgrade would handle t= hat. Yeah; I think the charter of pg_upgrade is to reproduce the old database state. If you try to twiddle the process to incorporate some changes in that state, maybe it will work, but if it breaks you get to keep both pieces. I surely don't wish to consider such shenanigans as supported. But let's ignore the case of pg_upgrade and just consider a dump/restore. I'd still say that unless you give --no-toast-compression then I would expect the dump/restore to preserve the tables' old compression behavior. Robert's argument that the pre-v14 database had no particular compression behavior seems nonsensical to me. We know exactly which compression behavior it has. regards, tom lane