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 1lP7lu-00050y-Ue for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Mar 2021 17:58:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lP7lt-0004Oj-TB for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Mar 2021 17:58:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP7lt-0004Ob-IK for pgsql-hackers@lists.postgresql.org; Wed, 24 Mar 2021 17:58:21 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lP7lq-0003iQ-UZ for pgsql-hackers@lists.postgresql.org; Wed, 24 Mar 2021 17:58:20 +0000 Received: by mail-io1-xd2d.google.com with SMTP id e8so22456636iok.5 for ; Wed, 24 Mar 2021 10:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QnebVX8c7WnrwbaNSRHa1UjTX9IkNj9463IVPT5gj/4=; b=Q64WhHlr2E33jhx7fbBtCiTqRU21VpZ1blknjW7LdE8iANF2DK6GYXDd978RGdOs/4 C0XK9esmyCNkg8UhwohTIph0KCs6jH8B/mB1oEmvUkdN0iQA7B34r6yaB7JWxBshiqwU 9V/q+Rwt5ZBDTMLAbaSz3mXXAZNOkFuJFvhVSQJxLxBXovSKtkp19u3sW/LN/AOfNdlr 5VqAxQyyHelgppSEgLI0SF6buBEaCTtBLyBQJAcQxsOY7ITozpl7MITGQ2gvUWcVFlzo N94M4k/FbtRAuLkbKdi6yelXTx8MROkwjrtSBXiePSveDCICk1T9zn+RGQ3CNEiBt3Xs 9/3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QnebVX8c7WnrwbaNSRHa1UjTX9IkNj9463IVPT5gj/4=; b=VhzOuDciVuVbbayREkTDZHCSXvu2flHyWfJIJkM84dvkd7xNpw9CtdPngIocGq0k2Z emZXxN803zjWa5Hlcvo2anjJJr7aVLtc5S+CwwuCOQiCnx0+4KCqOzcKrsIkusH/XvdL jE9cDC5kxJwGyIkNDQtPHVISdeJ3J4jdtx1Ac17pr822ypCW323wb1E9iPAXKffJzrMx kbLaPRF+E3cxRxZpccDQhEkk2nG0K9hZ0uqOXQRxhGsU/b9zFBZKhcSfQvE/SRri6oTE RiOWMpW5mhWmftArcWZ/9wu3cYn/PMuqQ7kCc/rHv86rTvJyD8qWLOVH8stk+BgppHXv R/+w== X-Gm-Message-State: AOAM5332IIgm0XJmeuBdt5SSavkNc5RlOcgP112uw7UIrjFpODVF18lq mjrQcZl7Xi5acEmPD7wmMnAUXg== X-Google-Smtp-Source: ABdhPJyJ0oOnzpuE1YkAx/iw4l1oO4e4+WBmvnrQChBY2O03r8bFtB08ty8x7G+FxC3TXc+0EFfkiQ== X-Received: by 2002:a02:7f0e:: with SMTP id r14mr3916662jac.112.1616608697160; Wed, 24 Mar 2021 10:58:17 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id o15sm1421545ils.87.2021.03.24.10.58.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Mar 2021 10:58:16 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 7CB41800A3C; Wed, 24 Mar 2021 12:58:15 -0500 (CDT) Date: Wed, 24 Mar 2021 12:58:15 -0500 From: Justin Pryzby To: Robert Haas Cc: Tom Lane , 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 Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 24, 2021 at 01:30:26PM -0400, Robert Haas wrote: > On Wed, Mar 24, 2021 at 1:24 PM Justin Pryzby wrote: > > I think it's not specific to pg_upgrade, but any pg_dump |pg_restore. > > > > The analogy with tablespaces is restoring from a cluster where the tablespace > > is named "vast" to one where it's named "huge". I do this by running > > PGOPTIONS=-cdefault_tablespace=huge pg_restore --no-tablespaces > > > > So I thinks as long as --no-toast-compression does the corresponding thing, the > > "restore with alternate compression" case is handled fine. > > I think you might be missing the point. If you're using pg_dump and > pg_restore, you can pass --no-toast-compression if you want. But if Actually, I forgot that pg_restore doesn't (can't) have --no-toast-compression. So my analogy is broken. > you're using pg_upgrade, and it's internally calling pg_dump > --binary-upgrade, then you don't have control over what options get > passed. 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 stuff 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 that. I'm going to risk making the analogy that it's not supported to pass --no-tablespaces from pg_upgrade to pg_dump/restore. It certainly can't work for --link (except in the weird case that the dirs are on the same filesystem). -- Justin