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 1icAw1-0003o2-8W for pgsql-general@arkaria.postgresql.org; Tue, 03 Dec 2019 16:21:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1icAvz-0000JP-Ue for pgsql-general@arkaria.postgresql.org; Tue, 03 Dec 2019 16:21:55 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1icAvz-0000JH-H3 for pgsql-general@lists.postgresql.org; Tue, 03 Dec 2019 16:21:55 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icAvt-0005Xr-2p for pgsql-general@lists.postgresql.org; Tue, 03 Dec 2019 16:21:55 +0000 Received: by mail-pf1-x442.google.com with SMTP id n13so2105209pff.1 for ; Tue, 03 Dec 2019 08:21:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illuminatedcomputing-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Q2BTdv3f1wfMKor6G+CgJVIfB1hMBstt/PcqxJIYi1w=; b=HN8dteosBUFUlvzUC7JpmjMvVS34155e9haJGl3qfYSUroJ9GuXs7K/xtR+RxONd0H Rc8hsRtbEX/uofG8r9JGZdw2h688Sr6KWOAet3SpjseGYe9ofu+W7rGYNee9sxLYPQMw OWLATs1zUyPbFfdR8GNi7VA3h1IRjNKXbQqAtSg7YdJH2pNG86VjsuqyDM+dBmQLdWKq xvQZS1dPWnPrSPecso7cjaAySmIp5WjxJY+Kwcg6bNoUtgmagI3EBUpyjwL1z3KbK8uP b2YG9pV4aRSfNvL7prr7hkPI+wq4PNQBL6HjfDkP+YyqniHdM9YNQXu26LrO50w55tNv op1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Q2BTdv3f1wfMKor6G+CgJVIfB1hMBstt/PcqxJIYi1w=; b=khgdyRxN2t1J6Da+5yl6zOKMFK7D+Bqp/CUyucE/onDj5EWJAGDQQmZGr/ADQolvj3 sYDVByv0hDG6z3ImAh7RjV8d3G9v6RFQZ0gJiJxF4CJ6mvDXK9OUJmrj0yIQJfMfp7Xl 4Ve50kbSJp5rh3R97au0iXAhTs9wEVWSPNxaee9mhdugumqIN5b5Xzz2mK1aEA12aFtk phQ1LO1iOvvGAM3iOttiEjYbsf86Xwox3sD2Ztzv9lR9fgVcwMVkweaOPwZBbtZvjS3g HV0vIt9BXTQTg9skuCktwI1jW1PeVkNcC6b6qWnGf6CPf7yIpFzBfNFDeuVpq76863yA nnZg== X-Gm-Message-State: APjAAAWhOEF9dpA0eEt5/F5z46WseRhfNUr1b4VO0MDJXsEq2tONNTv9 42H8X2XpiEliqSVAOHIuAg4e/Eye63Y= X-Google-Smtp-Source: APXvYqx3+zo22pn7mP/2sZeQXCBnMfN/6lvFcmnvKD5roNjm1uDjR9YutDlaQ9L+SKcMcm5IDWDhgA== X-Received: by 2002:a63:d617:: with SMTP id q23mr6313468pgg.146.1575390106291; Tue, 03 Dec 2019 08:21:46 -0800 (PST) Received: from [192.168.2.101] (static-50-53-109-254.bvtn.or.frontiernet.net. [50.53.109.254]) by smtp.googlemail.com with ESMTPSA id k60sm3728878pjh.22.2019.12.03.08.21.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2019 08:21:45 -0800 (PST) Subject: Re: Issue upgrading from V11 to V12 on Debian To: pgsql-general@lists.postgresql.org References: <20191203155347.GA15007@panix.com> From: Paul Jungwirth Message-ID: <5beab70b-33fd-65db-4ddc-d7334fd6592f@illuminatedcomputing.com> Date: Tue, 3 Dec 2019 08:21:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191203155347.GA15007@panix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/3/19 7:53 AM, stan wrote: > I am working on upgrading from V11 to V12 on Debian. > > My first attempt failed, and I have figured out that this is because I have > added extensions to the V11 DB, at least one of which was not installed > using the Debian packages. > > So, it looks like i need to install these before doing the upgrade, correct? > > This brings up a chicken or egg issue however. We are creating the > extensions, like this: > > CREATE EXTENSION emailaddr with schema ica > > So, to accomplish this, I would need to create the ice schema, and the user > it "belongs" to before I run pg_upgradecluster. This raises 2 questions There are two parts to adding extensions. First you install the *files* the extension needs. If you build from source this happens when you say `make install`. Or if you use pgxn, when you say `pgxn install foo`. On Ubuntu this will add the *.sql and *.control files to /usr/share/postgresql/12/extension, and the *.so files to /usr/lib/postgresql/12/lib (so I assume Debian is similar). You can do that before running pg_upgradecluster. The second part is saying CREATE EXTENSION, which adds the extension to the current database. pg_upgradecluster should handle that for you; it shouldn't require any extra steps. I hope this helps! Yours, -- Paul ~{:-) pj@illuminatedcomputing.com