Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a7Vh0-0007uA-9d for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Dec 2015 21:57:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a7Vgz-0002E5-SP for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Dec 2015 21:57:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a7VgN-0001X1-Km for pgsql-bugs@postgresql.org; Fri, 11 Dec 2015 21:56:55 +0000 Received: from mout.perfora.net ([74.208.4.197]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1a7VgL-0007z3-7T for pgsql-bugs@postgresql.org; Fri, 11 Dec 2015 21:56:54 +0000 Received: from [192.168.1.122] ([68.98.130.52]) by mrelay.perfora.net (mreueus002) with ESMTPSA (Nemesis) id 0MIOcr-1a5aXe2yD9-004Biy; Fri, 11 Dec 2015 22:56:49 +0100 Message-ID: <566B46A2.8040105@sqlexec.com> Date: Fri, 11 Dec 2015 16:56:50 -0500 From: "michael@sqlexec.com" User-Agent: Postbox 4.0.8 (Windows/20151105) MIME-Version: 1.0 To: pgsql-bugs@postgresql.org CC: pgdude@pgdude.com, Michael Paquier Subject: Re: BUG #13804: pg_restore returns unexpected error References: <20151207163520.2628.95990@wrigleys.postgresql.org> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000900070709000804060005" X-Provags-ID: V03:K0:DZEUKgPbFYDjcSpNbaPuaOgEj9QqpD8lNaBa5sFHb/QHg4GyKuc 288MtYncc/oIOxljG729V9ggOnHSV1NOZbawQQ18nsIP5pHJIXtiGyOS5IbxsrvK00RlKiv OzjIUzcxIXAHO35Hc6rrCzITqEhsvRzbu+6x+ucoxS+LX5bg6vGJOPRmw5XqZQIqXcfdV31 0h+nxMiPXDKLHG8sGnnlA== X-UI-Out-Filterresults: notjunk:1;V01:K0:8vQv0qmmUxk=:ubvG6sp1YQcvv0KP+rMUN1 EvWYol5IdYntehCymxUN6mYoaLXGJ3Ys8Vf4QFmn45B/GWT3ILgGklP0AbF+p46FgHf/DFdPp Btpsov1gHmhltn3Ow54NDtBFhYI0YB+FvisAJmSMLu1TXYsDKSVNHZsBL/Blf72J3xGkDOdxS nT5m2niqlyOTl8UPMhIICqewdby5CHig+BUfj9yhybJ5ua1/zkP2H9S3d1t5g1af3Ujw4vN0T la6W1/kwJO9KMCjgJqpfx2VL+zD0AOcRoSmOhJ1e87FPxLAvPO6mRBA8Ad8d/In8uClin5S00 An4Yl+WBVK44Ld0e6eupWNiVy3kgumwfsr5q43gdjgvJrW3bOtz5l/GcujbOxP+95E32XnOy9 JiZQrnQenz8H6RIm975ozXWa3q9tFn9vZu9XdKBkOnGcQIQrgPK6ZUC+92mroxBdLnkGZEH0+ fhEbH6rHdTUODc+ooSTdB7EzHLdZZGFJIv4+XA6w8SCaz2QeZUQ7GI6+A7mWlRavljN8f4c2g 0b4+YcYHHo+ut1pZypt0HvcNMCPxARYE3pMbxPIPucibT8Eh3DvUCcnQ5v/e8rGLefF/lmV77 dEopiCbd9Dh4r34ysaGp4UsY/Eu/chyxjYDQ6Op1EJA6KimiVoRPdT1CEldU0a9eoIQ02PWpq B2B443TgyWVO4Zj9T9tq5M09HoS1d3CUhatwnm4jwwLYdJEV14Ts6gYDRF5T52AwE9Q9gK1Zu v9q1RcyWYQRl1V9u X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is a multi-part message in MIME format. --------------000900070709000804060005 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Example Test Case: psql create database aaa; \c aaa create table t1(akey int); insert into t1 VALUES(1); \q -- example generates exit code 1 for pg_restore when creating public schema pg_dump -d aaa -p 6432 -C -c --if-exists -Fc -v -w -f ./db.dump pg_restore -d postgres -p 6432 -C -c --if-exists -Fc -v ./db.dump -- generate listing pg_restore -C -c --if-exists -Fc -v -l db.dump > db.list -- generate output commands (no db provided) pg_restore -C -c --if-exists -Fc -v -L db.list db.dump -- execute using the list: generates same exit code 1 when attempting to create public schema pg_restore -C -c --if-exists -Fc -v -L db.list db.dump -d postgres > Michael Paquier > Monday, December 7, 2015 7:06 PM > > > > If you think this is a bug, could you send a test case? There is not > enough information regarding what you expect of pg_restore and what it > is currently doing. > -- > Michael --------------000900070709000804060005 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Example Test Case:

psql
create database aaa;
\c aaa
create table t1(akey int);
insert into t1 VALUES(1);
\q

-- example generates exit code 1 for pg_restore when creating public schema
pg_dump    -d aaa      -p 6432 -C -c --if-exists -Fc -v -w -f  ./db.dump
pg_restore -d postgres -p 6432 -C -c --if-exists -Fc -v        ./db.dump

-- generate listing
pg_restore -C -c --if-exists -Fc -v -l db.dump > db.list

-- generate output commands (no db provided)
pg_restore -C -c --if-exists -Fc -v -L db.list db.dump

-- execute using the list: generates same exit code 1 when attempting to create public schema
pg_restore -C -c --if-exists -Fc -v -L db.list db.dump -d postgres



Monday, December 7, 2015 7:06 PM



If you think this is a bug, could you send a test case? There is not enough information regarding what you expect of pg_restore and what it is currently doing.
--
Michael

--------------000900070709000804060005--