Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKTBl-0003ax-BH for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Jun 2017 17:31:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dKTBk-00071r-Ty for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Jun 2017 17:31:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dKTAD-0004Fa-Hf for pgsql-hackers@postgresql.org; Mon, 12 Jun 2017 17:30:05 +0000 Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dKTA6-0004zu-71 for pgsql-hackers@postgresql.org; Mon, 12 Jun 2017 17:30:05 +0000 Received: by mail-qt0-x229.google.com with SMTP id w1so134324636qtg.2 for ; Mon, 12 Jun 2017 10:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=O48NKYiT4Fok1y7U1CkXq9838u+TABcx043IotQA2Dg=; b=qgggaytiDPz5ufwBiNb8nVrLMsIW2QcMvj2yWvEwrCIH7V1n19UWzbyJjxly9RSEMK OR9ZC4OuucaWNVaGwGwxuHOIEpduaXRcJwmvFGTulhePTastHA9efbCP819JfoAPEjv2 IIy8yFxJRvzjAj0dAuHJ/gOGy7fYHJrf71lngdLpXejxzXN++Qm2rpfssXGSDq426EgY 8vwx0rs98DnZ1j51qPjhnnvNwav9WVRvN70brg3O1uBdL8CBrRrsVPf/EBt0jC8XjWq6 rfwnBObC1By6W39RyLHBm/cKK75dw1huL8wHSK5b1wCBLggB/pR2m7M4h4gA+mQ/88dA nreA== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=O48NKYiT4Fok1y7U1CkXq9838u+TABcx043IotQA2Dg=; b=b8fQpIIRcszFWaHWt6naJUA51GN0aYVNGNnNdfzpTtn1eylauaoAxp2hqnWSe18fWA 5kmjINUCgnrplTeMgHpO5Qn39wHh7ar1NOJyMkyMSzF07FHmlWac8iAEz6O8mlBOS8Ge IssFAZDQKYkzufoKwzrRo2yMDRxbQonPVijwn61ZYJGDQ0eJxYEOgKY0hRhqGf98IN8V Ai41CDz/KxSE44bxgfjqfgqmEmN6V0rVCKgee4dZNiyOnD36aPxBnWaXS/cZuhRmtnMl RgJ5Rf6aOGkhPolJnzma9mdZ3QRR5eXMiHf44JfQkJ3v/AULmycQt10wCM/GSy/fHES8 7OPw== X-Gm-Message-State: AODbwcBD0HJMZXckPSdZSOq10Jh8iN2cZBDVmBpgJ3b4WT0GkcILnMle PO+t5bEkXvFlIGXq X-Received: by 10.200.50.25 with SMTP id x25mr63539649qta.23.1497288596028; Mon, 12 Jun 2017 10:29:56 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.217.209.130]) by smtp.gmail.com with ESMTPSA id a41sm7028768qte.50.2017.06.12.10.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 10:29:55 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 984BB738; Mon, 12 Jun 2017 14:29:49 -0300 (-03) Date: Mon, 12 Jun 2017 13:29:49 -0400 From: Alvaro Herrera To: Tom Lane Cc: Andres Freund , Peter Eisentraut , pgsql-hackers@postgresql.org Subject: Re: Transactional sequence stuff breaks pg_upgrade Message-ID: <20170612172949.g4thwdrgfmo3q5wo@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9761.1497225808@sss.pgh.pa.us> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Tom Lane wrote: > On closer inspection, the only thing that pg_upgrade needs is to be > able to do ALTER SEQUENCE OWNED BY without a relfilenode bump. PFA > two versions of a patch that fixes this problem, at least to the > extent that it gets through check-world without triggering the Assert > I added to GetNewRelFileNode (which HEAD doesn't). The first one > is a minimally-invasive hack; the second one puts the responsibility > for deciding if a sequence rewrite is needed into init_params. That's > bulkier but might be useful if we ever grow additional ALTER SEQUENCE > options that don't need a rewrite. OTOH, I'm not very clear on what > such options might look like, so maybe the extra flexibility is useless. > Thoughts? I vote for the second patch. I don't have a clear idea either, but I'm pretty sure the logical-replication people is going to be hacking on sequences some more, yet, and this is likely to come in handy. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers