Re: Restoring a database restores to unexpected tablespace - Mailing list pgsql-general

From Tom Lane
Subject Re: Restoring a database restores to unexpected tablespace
Date
Msg-id 16457.1562768430@sss.pgh.pa.us
Whole thread Raw
In response to Re: Restoring a database restores to unexpected tablespace  (Ian Barwick <ian.barwick@2ndquadrant.com>)
Responses Re: Restoring a database restores to unexpected tablespace  (Alex Williams <valenceshell@protonmail.com>)
List pgsql-general
Ian Barwick <ian.barwick@2ndquadrant.com> writes:
> On 7/10/19 2:56 AM, Alex Williams wrote:
>> 3. Restore the database with this command:
>> zcat /var/backup/db/mydatabase.gz |         sudo -H -u postgres         psql --quiet -e -c 'SET default_tablespace =
pg_default;'-f - mydatabase_test > /tmp/mydatabase_test.log 

> This should work.

Yeah, on modern PG.  But I think psql didn't support combinations of
-c and -f switches until 9.6.  9.5 would simply have dropped that -c
switch.

            regards, tom lane



pgsql-general by date:

Previous
From: "Weatherby,Gerard"
Date:
Subject: Re: execute_values
Next
From: Adrian Klaver
Date:
Subject: Re: execute_values