Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKAXq-00029W-1x for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Oct 2019 00:18:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKAXn-0007UQ-UE for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Oct 2019 00:18:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKAXn-0007Tx-EY for pgsql-bugs@lists.postgresql.org; Tue, 15 Oct 2019 00:18:31 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iKAXk-0001zq-9k for pgsql-bugs@lists.postgresql.org; Tue, 15 Oct 2019 00:18:30 +0000 Received: by mail-wm1-x342.google.com with SMTP id a6so18845466wma.5 for ; Mon, 14 Oct 2019 17:18:27 -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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sZ1aEdsJbJOoqFtCl4XP0l3z9Ht9E7Ql+oIg9PoLHPo=; b=EDih0k/bzhfxM3Rp5wnKsQp3ZGy+EvGQINuMaqYgeCyDrqDSRM/pavtCqYudteLpLH TU9ek5qBzae2Px4HFMkGFVmARm+K0YqT2+P99S5gtSZTUu+1zc3VV1AiJItC4P3ggzAI +C+hc31ssMU5011M8Cw9jvJ2TH3B0zNqcyDq5xwLNoDGbTfrIIglPmrlR84FdIJX4eIw RGeAD43d4iyVre5PZod8t+Hs6bTdIYsbL/EPToCGbNVDZ88zMmyON3f+sz/RCO/5WxnQ AHwqjIJYRwM9RTy84B89h1tQ1OMVgbIV2WPqCW51HuDndOTuACK6fzs2e46Xoy1+Y94O KsNA== 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=sZ1aEdsJbJOoqFtCl4XP0l3z9Ht9E7Ql+oIg9PoLHPo=; b=OxDnFOPcUqoF5niJUU7VchDraqn9pU+pHGHtX0oB4TyF9BPySZAMpwH13RqlZfHpPY LAsbH9mC4IQU4L0T6r1zp60sdxmwVXmkHYg41Q600GF8xLSEbouOuQDeWdC/CRBXBmjo hWhE+yZxT+2ylN0XWwDxi0282RdFJLYzepP/oepS+bSUCq1UVAXNcy/My/GhG7zG8NqL AbHonhg3ZHK2nNqAdvewE3CSd6vLtZQhWIRargAypAn8ML6TyYdgyE7q7zDmlE9aElIX Ygz7m1thwegB1oFRpGr8vdgydDBxwVnU7nZZMCkB4MnmojtZJYcEoEACO+HLMYP8uh23 TB/Q== X-Gm-Message-State: APjAAAVOiuyIIQF4oZLPzb9ibd2s2v8clkqW8X3PiKtijAljizHL3vc6 h5TiUAzThLls54jaSxwxNLH0eUkfwwJN6Q== X-Google-Smtp-Source: APXvYqyptgcKFVqFQs7LPnu5RcIWhfrOwOfwpbd0SP9EhmqxxqlVUQPVNXp9/HlE3Ie8AF1o09EG1Q== X-Received: by 2002:a7b:c40a:: with SMTP id k10mr18433247wmi.115.1571098705594; Mon, 14 Oct 2019 17:18:25 -0700 (PDT) Received: from localhost (net-188-219-235-30.cust.vodafonedsl.it. [188.219.235.30]) by smtp.gmail.com with ESMTPSA id r13sm28600457wrn.0.2019.10.14.17.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 17:18:19 -0700 (PDT) Date: Tue, 15 Oct 2019 02:18:17 +0200 From: Tomas Vondra To: Tom Lane Cc: Andres Freund , buschmann@nidsa.net, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12 Message-ID: <20191015001817.zei45apgpu5dzngr@development> References: <20191010134303.bkwjzchjb2w66iro@development> <30706.1570717152@sss.pgh.pa.us> <20191010163350.2rtcjtje6tkgilqi@development> <1542.1570738460@sss.pgh.pa.us> <20191010204022.6hiiubm2cueu3ghk@development> <20191013001032.lqrn4kqaovhrf77l@development> <17717.1570991208@sss.pgh.pa.us> <20191013203848.2eksimmpux3546wr@development> <27596.1571062600@sss.pgh.pa.us> <20191014163538.cqn6j4cl7s2mk2yz@development> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="sspr6rxkpcihpkly" Content-Disposition: inline In-Reply-To: <20191014163538.cqn6j4cl7s2mk2yz@development> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --sspr6rxkpcihpkly Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On Mon, Oct 14, 2019 at 06:35:38PM +0200, Tomas Vondra wrote: > ... > >Aha! I forgot we copy the necessary stuff into pg_attribute. Thanks for >clarifying, I'll polish and push the fix shortly. > I've pushed and backpatched the fix. Attached are similar fixes for the existing pg_upgrade checks for pg_catalog.line and pg_catalog.unknown types, which have the same issues with composite types and domains. There are some additional details & examples in the commit messages. I've kept this in two patches primarily because of backpatching - the line fix should go back up to 9.4, the unknown is for 10. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --sspr6rxkpcihpkly Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Correct-the-check-for-pg_catalog.line-in-pg_upgrade.patch"