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 1iHBth-0006sb-HR for pgsql-general@arkaria.postgresql.org; Sun, 06 Oct 2019 19:08:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iHBtf-0007Jk-B1 for pgsql-general@arkaria.postgresql.org; Sun, 06 Oct 2019 19:08:47 +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 1iHBte-0007JR-QO for pgsql-general@lists.postgresql.org; Sun, 06 Oct 2019 19:08:47 +0000 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iHBtb-0003sc-33 for pgsql-general@lists.postgresql.org; Sun, 06 Oct 2019 19:08:45 +0000 Received: by mail-io1-xd2a.google.com with SMTP id b19so24073464iob.4 for ; Sun, 06 Oct 2019 12:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=VD41ATRQxkB9DOVg6gjS2wX9RZ3fQ/mi1cu0M4Z97vY=; b=ksS2NtERRRZrLslmWHJTm6yJh5MSVbzNKtCb2++wcuoh/jbi0q7A46l0mk7QO+dzX3 vf2Gh7+4OXzmjsEafHuhaMLud1qLVWzDRiJNGrh9egYHRU7ybzRMQ26PE3P/qF86Tslx gvXcZ4z+BSGVZ3duKy+UpUp5f2sfMOP7HYRZgGkz1BKVTfc8tl3F95f1JlmQTb4BuY5i LRl25XjTqCs37EDeqhPOogVKUzXjnZ7JX8Jum32edXlmpRX7NuxEDIK/WdEq5AafjzDH RQdlWFLaL3EZecZVqDnSzra7W+MSb9IRqC5zcNtQuUdB1u7x3iVNq086nCor5hFBHhOV Lp+A== 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:subject:message-id:mime-version :content-disposition:user-agent; bh=VD41ATRQxkB9DOVg6gjS2wX9RZ3fQ/mi1cu0M4Z97vY=; b=JnTPEhGRFO6TDqlLm5aBc/lkPIMCYS1L8kqVM5flNSDvF0GWMmM6YuXtP7BB91im9d 1ihIVzm4TXI08NPsWeP4i24Zkgn3EusHcspvuTA9TO4Zc2gBShRkmnN4Rx2rPsJN8wlM 5Dc8YTmdtcGC8mwxnu3jt9y1I0RhlxsJdI1RDLhPek37ZftRGbkp1O/X1HnMPKZvTZsZ H4ev28CTNq1TGht3KC6kOqCilUE75zQlJXqrzqPDWKKH0BJg7peDIzdh7w3x1xk8irso aJRCShFwQdIZAn5TcuILsmGSDnz9RajZwyLJiwqdU0HUJnBmCIC1QjlcQrkyN+NL/Qo+ aArg== X-Gm-Message-State: APjAAAVpud95ti2GvaSHSKEdn0qyHW99IRIoxv7kZZuiVUTSl9QiBowS XQqED1DPNG0tDMz0cLhvcB4ld1hbF2I= X-Google-Smtp-Source: APXvYqxNU6dMrWUmfxHjGFncPKqiuKLsZJqZ7GS1j0PaUnDJAo4MW7YTWRc2DysVYjuRU+dw1ZAR0g== X-Received: by 2002:a02:65cd:: with SMTP id u196mr24003008jab.3.1570388921562; Sun, 06 Oct 2019 12:08:41 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id c11sm4357566ioi.67.2019.10.06.12.08.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Oct 2019 12:08:40 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 08773800E6F; Sun, 6 Oct 2019 14:08:39 -0500 (CDT) Date: Sun, 6 Oct 2019 14:08:39 -0500 From: Justin Pryzby To: pgsql-general@lists.postgresql.org Subject: v12 and pg_restore -f- Message-ID: <20191006190839.GE18030@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a "heads up" for others upgrading to v12. I found a solution for our use case, but it'd be easy to miss this, even if you read the release notes. I saw this and updated our scripts with pg_restore -f- https://www.postgresql.org/docs/12/release-12.html |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. What I didn't realize at first is that -f- has no special meaning in v11 - it just writes a file called ./- And it's considered untennable to change behavior of v11. In our use, that was being piped to sed, which then saw nothing on its stdin and just exits.. I changed our script to use pg_restore -f /dev/stdout, which seems to be portable across postgres versions for the OS distribution we're running. Unfortunately, I can't think of anything portable across *OS* or useful to include in documentation. In the worst case, someone might need to call pg_restore differently based on its version. Justin