Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eoGPO-0003RL-Go for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Feb 2018 22:29:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoGPN-0003UP-IV for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Feb 2018 22:29:09 +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 1eoGPN-0003UF-Cg for pgsql-bugs@lists.postgresql.org; Tue, 20 Feb 2018 22:29:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eoGPJ-000138-KV for pgsql-bugs@postgresql.org; Tue, 20 Feb 2018 22:29:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w1KMT132027850; Tue, 20 Feb 2018 17:29:01 -0500 From: Tom Lane To: Andres Freund cc: Claudio Freire , pgsql-bugs@postgresql.org Subject: Re: pg_upgrade and materialized views In-reply-to: <20180220221709.qztvpxgly2wvbz2u@alap3.anarazel.de> References: <20180220215420.cdmx6bfqtzasjjcs@alap3.anarazel.de> <25875.1519164329@sss.pgh.pa.us> <20180220221709.qztvpxgly2wvbz2u@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 20 Feb 2018 14:17:09 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27848.1519165741.1@sss.pgh.pa.us> Date: Tue, 20 Feb 2018 17:29:01 -0500 Message-ID: <27849.1519165741@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > I wonder if there's a scenario in which a schema restore uses enough > xids to get close to anti-wraparound territory? Interesting question ... you'd need one heck of a lot of objects in the cluster, but we've certainly heard of people with lots of objects. We could stave that problem off by running the restore steps in --single-transaction mode, if it weren't that pg_restore will reject the combination of --create and --single-transaction. I wonder if we should allow that, specifying that it means that the single transaction starts after we reconnect to the new DB. regards, tom lane