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 1iKoyd-0004Zy-6X for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Oct 2019 19:28:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKoya-0005tP-9G for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Oct 2019 19:28:52 +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 1iKoyZ-0005t4-GP for pgsql-hackers@lists.postgresql.org; Wed, 16 Oct 2019 19:28:51 +0000 Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iKoyR-0006tU-JN for pgsql-hackers@lists.postgresql.org; Wed, 16 Oct 2019 19:28:49 +0000 Received: by mail-io1-xd42.google.com with SMTP id b136so55287328iof.3 for ; Wed, 16 Oct 2019 12:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-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=9uzyWR/0WCejp/I3MLTOoH9biXF0WoLjhs5SlTGJYNA=; b=RJY3hACQ/ox/RnlZ5kV3dn8hI9+fsiT2Imuf/o/2t1n7Z5QedW5+vA7TJ4k2coYD2e Q5vS1cTK9TW5SSWXx9lnJkdCkJEnJxNXMQtMplEwqVNEjUp7wOh5AaNp5xbhpkdw1i3R LVGUwzK2gBA1eEjIbsSHuJpBAZrei1KMztPQkBxkAturC1seT9r/nHctlZMLr4N2+vHq H2xgc+I1aw7OO5NbA5/jYCzRh/C9Z3mGlJkhQ63f7s/AoSwn0cWJJKfkM+e+Eq2qZCjf fikJukWLxkgMGbbrYI5U9qALNN5AYNPlaMKjTL6Y8eUi1gnLZh57o8bAGkN3owM3WmQ5 S9Bg== 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=9uzyWR/0WCejp/I3MLTOoH9biXF0WoLjhs5SlTGJYNA=; b=mVVK2ahp7IOybPjIJurzVaAyVWwr690kdpbpgCjVtlh2dmpj0bhXCbFFwc3M3Gb51e NPyfaMBr1q6gzEnFugl7Vnuwy/7+K/0wf0s9RfCMLAnrkb27X/57gcDDG3hihSnP/9tA iK2fHigHTjImoT7uXOcOqXC3lA5Ky3bdNsoaZ+pkzGaGIt6M0wN4d76qz6qy5ysdCMWI 5t7TDMXTobH7fU0mr4IscqpPwJzjhMOgARGLx8XC1XT74TXsmn8ykXtvI7ECjXnzZ8jR HVxRrWjCoaECVKmsO+6Fysm58CSmFfojXZMjBoyRN4Gp/WJzYVvK5krZrvuRulknHFgd A0fQ== X-Gm-Message-State: APjAAAXCAnPoVwGqZuMLkpfyQote4kx6LwwANTYjXKzdY51dWtDgX7SI i4J+2GLjcksnHz8syXjMwOE1eQ== X-Google-Smtp-Source: APXvYqwz49AaOgeKvhiv7vPBQyMAeUsWB4i/uZj0KASa/+WlP166rW1pJzd3vZi9yG+ZFAONJ0p23Q== X-Received: by 2002:a5d:955a:: with SMTP id a26mr30155761ios.211.1571254122810; Wed, 16 Oct 2019 12:28:42 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id t9sm17837705iop.86.2019.10.16.12.28.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Oct 2019 12:28:42 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id B3E66801065; Wed, 16 Oct 2019 14:28:40 -0500 (CDT) Date: Wed, 16 Oct 2019 14:28:40 -0500 From: Justin Pryzby To: Stephen Frost Cc: "imai.yoshikazu@fujitsu.com" , Euler Taveira , Tom Lane , Andrew Gierth , pgsql-hackers@lists.postgresql.org Subject: Re: v12 and pg_restore -f- Message-ID: <20191016192840.GO3599@telsasoft.com> References: <28770.1570394593@sss.pgh.pa.us> <875zl11tla.fsf@news-spur.riddles.org.uk> <30069.1570396524@sss.pgh.pa.us> <20191008180840.GQ6962@tamriel.snowman.net> <20191009124505.GT6962@tamriel.snowman.net> <20191016172148.GH6962@tamriel.snowman.net> <20191016175838.GL3599@telsasoft.com> <20191016190452.GJ6962@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191016190452.GJ6962@tamriel.snowman.net> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Oct 16, 2019 at 03:04:52PM -0400, Stephen Frost wrote: > > On Wed, Oct 16, 2019 at 01:21:48PM -0400, Stephen Frost wrote: > > > [...] if they actually need to work with both concurrently (which strikes me > > > as already at least relatively uncommon...). > > > > I doubt it's uncommon. In our case, we have customers running centos6 and 7. > > There's no postgis RPMs provided for centos6 which allow an upgrade path to > > v12, so we'll end up supporting at least (centos6, pg11) and (centos7,pg12) for > > months, at least. > > I suppose the issue here is that you don't want to have different > versions of some scripts for centos6/pg11 vs. centos7/pg12? I'm a bit > surprised that you don't have to for reasons unrelated to pg_restore. Right, I don't want to "have to" do anything :) If we really need a separate script, or conditional, then we'll do, but it's nicer to be ABLE write something (like this sanity check) in one line and not NEED TO write it in six. So far these maint scripts have significant a bit telsasoft-specific logic, but very little specific to postgres versions. I recall the schema-qualification stuff caused some churn, but it was in a minor release, so everyone was upgraded within 30-40 days, and if they weren't, I probably knew not to deploy updated scripts, either. > > I'd *like* to be able to deploy our most recent maint scripts during the > > interval of time our customers are running different major versions. The > > alternative being to try to remember to avoid deploying updated v12 scripts at > > customers still running v11. I went to the effort to make our vacuum/analyze > > script support both versions following the OID change. > > And I suppose you don't want to install v12 client tools for the v11 > systems..? I get that there's an argument for that, but it does also > seem like it'd be an alternative solution. Hm, I'd be opened to it, except that when I tries this during beta, the PGDG RPMs are compiled with GSSAPI, which creates lots of warnings...but maybe that's just in nagios... > > Tom's proposed in February to backpatch the -f- behavior, so ISTM that we're > > right now exactly where we (or at least he) planned to be, except that the > > backpatch ideally should've been included in the minor releases in August, > > before v12 was released. > > > > https://www.postgresql.org/message-id/24868.1550106683%40sss.pgh.pa.us > > That continues to strike me as a good way forward, and I'm guessing you > agree on that? If so, sorry for not including you in my earlier email. I believe you did include me (?) - I started the thread (on -general). https://www.postgresql.org/message-id/20191016172148.GH6962%40tamriel.snowman.net I think it's a good idea to do some combination of backpatching -f-, and maybe document behavior of pre-12 pg_restore in v12 release notes, and suggest /dev/stdout as a likely workaround. Of course, if backpatched, the behavior of pre-12 will vary, and should be documented as such, which is a kind of alot, but well. |In pg_restore, require specification of -f - to send the dump contents to standard output (Euler Taveira) |Previously, this happened by default if no destination was specified, but that was deemed to be unfriendly. |In the latest minor releases of versions v11 and earlier, pg_restore -f - is updated for |consistency with the new behavior of v12, to allow scripts to be written which |work on both. But note that earlier releases of v9.3 to v11 don't specially |handle "-f -", which will cause them to write to a file called "-" and not |stdout. If called under most unix shells, -f /dev/stdout will write to stdout on all versions of pg_restore. It's not perfect - someone who wants portable behavior has to apply November's minor upgrade before installing any v12 server. And vendors (something like pgadmin) will end up "having to" write to a file to be portable, or else check the full version, not just the major version. Justin