Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSMcl-000580-Gh for pgsql-general@arkaria.postgresql.org; Mon, 11 Jun 2018 13:12:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fSMcj-0005UA-IT for pgsql-general@arkaria.postgresql.org; Mon, 11 Jun 2018 13:12:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSMch-0005Sw-FR for pgsql-general@lists.postgresql.org; Mon, 11 Jun 2018 13:12:41 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSMcZ-0001Uu-Ii for pgsql-general@postgresql.org; Mon, 11 Jun 2018 13:12:38 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 80F0121A7F; Mon, 11 Jun 2018 09:12:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 11 Jun 2018 09:12:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=G6BDWtaevcSTkJVUS+SB9LEYvlsNK zq75dy+7i9E+7A=; b=Kl19GVvK/9jBUWYyWR5K15xGw2v/xApi1WUVkJ5WmXcNw KxugeSvI99yn0iaOkM5DpDiS9c+5VJHwMnSs3mg9gBOIag6+o1E0s7fBCrcpunvm fbwhbhshLZIXiZdDBbmmg6pi4ppmK1UwwXw4kEKLBUzvurqhv+vyhJwppYvevUMD 69OjIF9ZMPmM5ulW/VIDj2WzaPZDmWw3WH3Yuh3mFMIWIZBwOdVibTf4ego8ESyb m7km3+YlsnlbiEs6d66Az3zOogONAL67HHMVbcK7d10iBffrpb57EyF+Wiaan8GX hKdkOysoivJrlcrHhylkcGFUjJ2ESF/Kopfn1s1hA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=G6BDWt aevcSTkJVUS+SB9LEYvlsNKzq75dy+7i9E+7A=; b=vo+QNyfNkgYCeK66XGNJXz 9ybzbkSLroZqFoyGcqK2qs8iT2b/C7A+F+TEhTcRQ7Q3Ixqha+mxCoRWEW4anHIC ToWP54m8zYPtPHtoYtU6B1uQ2UZcQ4h9wwHsLjyADyjgCD6cNb9LZBQcruQJISuY 8+12lsrkttHw009q+vePbp8dTZPPk01/9l060oYHD3S0Jmsmt79BcQEqm66L/7rV DVa86TL955bcPt5PcYytwo6kL9CNRfsgRkNb+MQBKVR9WBw8r0GIAqtigM9B34q2 aJYdXj9xpKtCio38HLiJOSpZQYQ7fqtitrPzLWyIQlZgFP+oT12dHj/wXEQgcEGg == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.159.209]) by mail.messagingengine.com (Postfix) with ESMTPA id E85B110268; Mon, 11 Jun 2018 09:12:29 -0400 (EDT) Subject: Re: pg_upgrade and wraparound To: Alexander Shutyaev Cc: pgsql-general References: <107c7c17-2e53-6cd1-1dbd-94d63f7a205f@aklaver.com> <9825.1528573946@sss.pgh.pa.us> <1528663590828-0.post@n3.nabble.com> <8b14df48-20e9-3dd0-9990-7131f95bd30a@aklaver.com> From: Adrian Klaver Message-ID: <29e163a5-3585-5d27-6f3d-e4cfe812b3ec@aklaver.com> Date: Mon, 11 Jun 2018 06:12:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 06/10/2018 11:46 PM, Alexander Shutyaev wrote: > >> Is this the regular Postgres log or the pg_upgrade log which should > be something like pg_upgrade_server.log? > > This is the pg_upgrade_dump_16400.log. > >>> How did you get into the 10 cluster to report on the database OID's and > names? > > After the pg_upgrade failed I was able to start both clusters, so I > connected to the new 10.4 cluster and ran the query. I am at a loss for an explanation. My thoughts: 1) The database with an OID of 0 is a mystery, though it does not seem to be stopping the upgrade by itself. 2) The upgrade stops because of transaction ID wraparound, which is strange as that is not showing up in the 9.6 cluster I presume. You might want the queries found below on the 9.6 and 10 clusters to help figure this out: https://www.postgresql.org/docs/10/static/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND SELECT c.oid::regclass as table_name, greatest(age(c.relfrozenxid),age(t.relfrozenxid)) as age FROM pg_class c LEFT JOIN pg_class t ON c.reltoastrelid = t.oid WHERE c.relkind IN ('r', 'm'); SELECT datname, age(datfrozenxid) FROM pg_database; > >>> Which database has the large objects? > > bof (OID=16400). It is also effectively the only database that matters > here. The other one - sslentry only contains a couple of tables and a > dozen of records. > >>> Did you check this view to confirm? > > Yes, I did: > > select * from pg_prepared_xacts; >  transaction | gid | prepared | owner | database > -------------+-----+----------+-------+---------- > (0 rows) > -- Adrian Klaver adrian.klaver@aklaver.com