pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_restore
67+ messages / 37 participants
[nested] [flat]

* pg_restore
@ 2001-11-05 17:39  lluong@home.com
  0 siblings, 1 reply; 67+ messages in thread

From: lluong@home.com @ 2001-11-05 17:39 UTC (permalink / raw)
  To: pgsql-general

Hi,

I was wondering does pg_restore exist prior to 7.1.  I am running 7.0 and 
just wondering is there an equivalent I can use with pg_dump to restore a tar 
file with the archive.list file.

Thanks

-- 
LL



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2001-11-08 00:25  Peter Eisentraut <peter_e@gmx.net>
  parent: lluong@home.com
  0 siblings, 1 reply; 67+ messages in thread

From: Peter Eisentraut @ 2001-11-08 00:25 UTC (permalink / raw)
  To: linh.luong@computalog.com; +Cc: pgsql-general

lluong@home.com writes:

> I was wondering does pg_restore exist prior to 7.1.

No.

> I am running 7.0 and just wondering is there an equivalent I can use
> with pg_dump to restore a tar file with the archive.list file.

No.  You could try the 7.1 pg_dump/pg_restore with 7.0, but it probably
won't work.  Better plan to upgrade soon, since there are many
enhancements in 7.1.

-- 
Peter Eisentraut   peter_e@gmx.net




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2001-11-08 01:27  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 67+ messages in thread

From: Tom Lane @ 2001-11-08 01:27 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: linh.luong@computalog.com; pgsql-general

Peter Eisentraut <peter_e@gmx.net> writes:
> No.  You could try the 7.1 pg_dump/pg_restore with 7.0, but it probably
> won't work.

Actually I believe 7.1.1 and later pg_dump *is* backwards compatible
with a 7.0.* server.  The output script isn't, but it should be possible
to use the newer pg_dump to dump out your 7.0 database in preparation
for upgrading.

Not sure how well tested that mode is, mind you, but it's alleged to
work.  I'd recommend running some experiments before trusting it
completely.  (If you can load a schema-only dump of your 7.0 database
into a 7.1 test installation, and everything looks okay, that's probably
enough testing.)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* pg_restore
@ 2005-01-17 20:04  Cesar Schneider <cesar@hzta.com.br>
  0 siblings, 1 reply; 67+ messages in thread

From: Cesar Schneider @ 2005-01-17 20:04 UTC (permalink / raw)
  To: pgsql-general

Hi, I have a dump that was generated with pg_dump in 8.0-beta5 and I'm
trying to restore with pg_restore in 8.0-RC3.

The pg_dump command was: # pg_dump -Ft -o -b database
The pg_restore command was: # pg_restore -Ft -d database

When I execute pg_restore I get this error:
pg_restore: [archiver] unsupported version (1.13) in file header

Dumps created in beta5 are incompatible with rc3 ?
Any suggestion for how can I restore this dump ?

Thank for any help.
Cesar




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2005-01-17 20:23  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Cesar Schneider <cesar@hzta.com.br>
  0 siblings, 2 replies; 67+ messages in thread

From: Tom Lane @ 2005-01-17 20:23 UTC (permalink / raw)
  To: Cesar Schneider <cesar@hzta.com.br>; +Cc: pgsql-general

Cesar Schneider <cesar@hzta.com.br> writes:
> When I execute pg_restore I get this error:
> pg_restore: [archiver] unsupported version (1.13) in file header

There is no 1.13; you have a corrupt dump file.  Personally I'd bet
money that you ran it through a Windows newline conversion (LF to CR/LF).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2005-01-19 19:42  Niederland <niederland@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 67+ messages in thread

From: Niederland @ 2005-01-19 19:42 UTC (permalink / raw)
  To: pgsql-general

I am having the same problem:
System: the released Postgres 8.0, winXP
Install performed an initDB.  Tryed all types of backup/restore
combinations, see below:

Using:
pg_dump --format=t --blobs myDB > DBFile
pg_restore --create -dbname=crm DBFile

Resulted in:
pg_restore: [archiver] unsupported version (1.13) in file header

NOTE:  File was created from pg_dump
and then tried as an input to pg_restore.  File was not viewed or
modified
in any way.

*************
Using:
pg_dump --format=t --blobs myDB > DBFile

Resulted in:
pg_dump: [custom archiver] WARNING: ftell mismatch with expected
position -- ftell used

************
Using:
pg_dump --format=t --blobs myDB > DBFile

Resulted in:
pg_dump: large-object output is not supported for plain-text dump files
pg_dump: <Use a different output format.>
***********

Tom Lane wrote:
> Cesar Schneider <cesar@hzta.com.br> writes:
> > When I execute pg_restore I get this error:
> > pg_restore: [archiver] unsupported version (1.13) in file header
>
> There is no 1.13; you have a corrupt dump file.  Personally I'd bet
> money that you ran it through a Windows newline conversion (LF to
CR/LF).
>
> 			regards, tom lane
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faqs/FAQ.html




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2005-01-20 05:00  Cesar Schneider <cesar@hzta.com.br>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 67+ messages in thread

From: Cesar Schneider @ 2005-01-20 05:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general

I'm still having problems to restore a database.

The dump command used was:

# pg_dump -Ft -b -o database > database.dump

This dump was created in Postgres 8.0beta5 (Windows).

When I try to restore this file in Postgres 8.0-rc3 (Linux) I get this
error:

# pg_restore -Ft -d database database.dump

Using a dump file generated in pgadmin3, works fine... but pgadmin
exports some strange things that are not related to the database.

What can be wrong ?

Cesar


On Mon, 2005-01-17 at 18:42, Tom Lane wrote:
> Cesar Schneider <cesar@hzta.com.br> writes:
> > but is not a plain text dump, so I don't think that is a CRFL problem.
> 
> Exactly, but you did something to it with a program that thought it was
> plain text.  The actual current version number is 1.10.  I think it is
> pretty suggestive that LF == 10 decimal and CR == 13 decimal.
> 
> 			regards, tom lane
> 




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2005-01-20 08:19  Niederland <niederland@gmail.com>
  parent: Cesar Schneider <cesar@hzta.com.br>
  0 siblings, 0 replies; 67+ messages in thread

From: Niederland @ 2005-01-20 08:19 UTC (permalink / raw)
  To: pgsql-general

More Info:
If I perform a backup of my database with PGAdmin3.  I can restore
the database via the command line pg_restore.  It seems as if the
backup created with pg_restore when issued from a winXP command prompt
does not create a file that the pg_restore can read... At least for the
file types Compress and Tar.  Which I need to use since my database
contains blobs.

One other item:  Issuing an pg_restore -C -d myDB myDB.backup
Did not create the database myDB and complained that the database did
not exist.  I had to first create the database and then the pg_restore
functioned correctly (without -C option).




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2005-01-23 01:00  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Niederland <niederland@gmail.com>
  0 siblings, 2 replies; 67+ messages in thread

From: Tom Lane @ 2005-01-23 01:00 UTC (permalink / raw)
  To: Niederland <niederland@gmail.com>; +Cc: pgsql-general; pgsql-hackers-win32@postgresql.org

"Niederland" <niederland@gmail.com> writes:
> System: the released Postgres 8.0, winXP

> Using:
> pg_dump --format=t --blobs myDB > DBFile
> pg_restore --create -dbname=crm DBFile

> Resulted in:
> pg_restore: [archiver] unsupported version (1.13) in file header

Come to think of it, I'll bet that you cannot use "> DBFile" on Windows
because it ends up opening the archive file in text instead of binary
mode.  SetOutput() in pg_backup_archiver.c tries to work around this by
doing

	fn = fileno(stdout);
	AH->OF = fdopen(dup(fn), PG_BINARY_W);

but it wouldn't surprise me in the least to learn that that doesn't work
on Windows.

Does it work if you use
	pg_dump --format=t --blobs -f DBFile myDB
?  Can anyone on pgsql-hackers-win32 think of a way around this?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: [pgsql-hackers-win32] pg_restore
@ 2005-01-23 16:08  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 67+ messages in thread

From: Bruce Momjian @ 2005-01-23 16:08 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Niederland <niederland@gmail.com>; pgsql-general; pgsql-hackers-win32@postgresql.org

Tom Lane wrote:
> "Niederland" <niederland@gmail.com> writes:
> > System: the released Postgres 8.0, winXP
> 
> > Using:
> > pg_dump --format=t --blobs myDB > DBFile
> > pg_restore --create -dbname=crm DBFile
> 
> > Resulted in:
> > pg_restore: [archiver] unsupported version (1.13) in file header
> 
> Come to think of it, I'll bet that you cannot use "> DBFile" on Windows
> because it ends up opening the archive file in text instead of binary
> mode.  SetOutput() in pg_backup_archiver.c tries to work around this by
> doing
> 
> 	fn = fileno(stdout);
> 	AH->OF = fdopen(dup(fn), PG_BINARY_W);
> 
> but it wouldn't surprise me in the least to learn that that doesn't work
> on Windows.
> 
> Does it work if you use
> 	pg_dump --format=t --blobs -f DBFile myDB
> ?  Can anyone on pgsql-hackers-win32 think of a way around this?

I never considered the distinction of binary/text mode on ">" but I can
see it could certainly be an issue.

Do we have to start suggesting "-f" for all scripts just so Win32 is OK?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2005-01-24 06:14  Niederland <niederland@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 67+ messages in thread

From: Niederland @ 2005-01-24 06:14 UTC (permalink / raw)
  To: pgsql-general

That worked thanks.  Just can not use the "> DBFile" on windows.




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* pg_restore
@ 2005-04-05 06:40  Nageshwar Rao <NageshwarR@PLANETASIA.COM>
  0 siblings, 1 reply; 67+ messages in thread

From: Nageshwar Rao @ 2005-04-05 06:40 UTC (permalink / raw)
  To: pgsql-general

Hi,
I took a dump using the following command
Pg_dump  -f  bk.dmp


When I tried to restore  a table from the dump it just hangs there

Pg_restore -f bk.dump -t table_name


Also tried by giving username also

Any light on this.


Thnx
Rao

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2005-04-05 14:05  Sven Willenberger <sven@dmv.com>
  parent: Nageshwar Rao <NageshwarR@PLANETASIA.COM>
  0 siblings, 0 replies; 67+ messages in thread

From: Sven Willenberger @ 2005-04-05 14:05 UTC (permalink / raw)
  To: Nageshwar Rao <NageshwarR@PLANETASIA.COM>; +Cc: pgsql-general

On Tue, 2005-04-05 at 12:10 +0530, Nageshwar Rao wrote:
> Hi,
> 
> I took a dump using the following command
> 
> Pg_dump  -f  bk.dmp
> 
> 
> When I tried to restore  a table from the dump it just hangs there
> 
> Pg_restore -f bk.dump -t table_name
> 
> 
> Also tried by giving username also
> 
> Any light on this.

pg_restore [OPTION]... [FILE]

in this case don't use -f (as that represents "output" file name)
try pg_restore -d db_name -t table_name -U username bk.dmp

Sven




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* pg_restore
@ 2007-10-28 18:32  Bob Pawley <rjpawley@shaw.ca>
  0 siblings, 1 reply; 67+ messages in thread

From: Bob Pawley @ 2007-10-28 18:32 UTC (permalink / raw)
  To: pgsql-general

Please help.

I am attempting to restore a database into PostgreSQL version 8.2 running on 
Win XP Professional.



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 18:45  Adrian Klaver <aklaver@comcast.net>
  parent: Bob Pawley <rjpawley@shaw.ca>
  0 siblings, 1 reply; 67+ messages in thread

From: Adrian Klaver @ 2007-10-28 18:45 UTC (permalink / raw)
  To: pgsql-general; +Cc: Bob Pawley <rjpawley@shaw.ca>

On Sunday 28 October 2007 11:32 am, Bob Pawley wrote:
> Please help.
>
> I am attempting to restore a database into PostgreSQL version 8.2 running
> on Win XP Professional.
>
> From the 'bin' folder, I am using the command line-
> pg_restore psql -h localhost -d PDW -U postgres -f aurel.sql

Try  pg_restore psql -h localhost -d PDW -U postgres  aurel.sql 
No -f switch

>
> I get an error -
>
> pg_restore: cannot specify both -d and -f output.
>
> If the error message is correct how does pg_restore know what to put where?

The -d switch tells pg_restore to the named database. The -f switch tells it 
to restore to named file. It won't do both.

>
> I used the same command to successfully install the same pg_dump file into
> PostgreSQL 8.1 running on the same computer.

Maybe 8.1 ignored the error.

>
> Any thoughts would be much appreciated.
>


-- 
Adrian Klaver
aklaver@comcast.net



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 21:13  Bob Pawley <rjpawley@shaw.ca>
  parent: Adrian Klaver <aklaver@comcast.net>
  0 siblings, 2 replies; 67+ messages in thread

From: Bob Pawley @ 2007-10-28 21:13 UTC (permalink / raw)
  To: Adrian Klaver <aklaver@comcast.net>; pgsql-general

Hi Adrian

With  pg_restore psql -h localhost -d PDW -U postgres  aurel.sql the error 
message is -

pg_restore: could not open input file: No such file or directory exists.

I get this message with aurel.sql - or aurel - or the path to aurel 
(......8,2\bin) or  when aurel is not even mentioned.

This is becoming quite frustrating.

Bob
----- Original Message ----- 
From: "Adrian Klaver" <aklaver@comcast.net>
To: <pgsql-general@postgresql.org>
Cc: "Bob Pawley" <rjpawley@shaw.ca>
Sent: Sunday, October 28, 2007 11:45 AM
Subject: Re: [GENERAL] pg_restore


> On Sunday 28 October 2007 11:32 am, Bob Pawley wrote:
>> Please help.
>>
>> I am attempting to restore a database into PostgreSQL version 8.2 running
>> on Win XP Professional.
>>
>> From the 'bin' folder, I am using the command line-
>> pg_restore psql -h localhost -d PDW -U postgres -f aurel.sql
>
> Try  pg_restore psql -h localhost -d PDW -U postgres  aurel.sql
> No -f switch
>
>>
>> I get an error -
>>
>> pg_restore: cannot specify both -d and -f output.
>>
>> If the error message is correct how does pg_restore know what to put 
>> where?
>
> The -d switch tells pg_restore to the named database. The -f switch tells 
> it
> to restore to named file. It won't do both.
>
>>
>> I used the same command to successfully install the same pg_dump file 
>> into
>> PostgreSQL 8.1 running on the same computer.
>
> Maybe 8.1 ignored the error.
>
>>
>> Any thoughts would be much appreciated.
>>
>
>
> -- 
> Adrian Klaver
> aklaver@comcast.net 




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 21:26  Adrian Klaver <aklaver@comcast.net>
  parent: Bob Pawley <rjpawley@shaw.ca>
  1 sibling, 0 replies; 67+ messages in thread

From: Adrian Klaver @ 2007-10-28 21:26 UTC (permalink / raw)
  To: pgsql-general; +Cc: Bob Pawley <rjpawley@shaw.ca>

On Sunday 28 October 2007 2:13 pm, Bob Pawley wrote:
> Hi Adrian
>
> With  pg_restore psql -h localhost -d PDW -U postgres  aurel.sql the error
> message is -
>
> pg_restore: could not open input file: No such file or directory exists.
>
> I get this message with aurel.sql - or aurel - or the path to aurel
> (......8,2\bin) or  when aurel is not even mentioned.

Is this really the path -(......8,2\bin)? Note the ','.  

> This is becoming quite frustrating.
>
The other thing to check is whether you have the necessary permissions to read 
the file.


-- 
Adrian Klaver
aklaver@comcast.net



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 21:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Bob Pawley <rjpawley@shaw.ca>
  1 sibling, 2 replies; 67+ messages in thread

From: Tom Lane @ 2007-10-28 21:28 UTC (permalink / raw)
  To: Bob Pawley <rjpawley@shaw.ca>; +Cc: Adrian Klaver <aklaver@comcast.net>; pgsql-general

Bob Pawley <rjpawley@shaw.ca> writes:
> This is becoming quite frustrating.

The errant "psql" is your problem ... although pg_restore is being
quite unhelpful by not mentioning the filename that it's trying to open.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 21:38  Adrian Klaver <aklaver@comcast.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 67+ messages in thread

From: Adrian Klaver @ 2007-10-28 21:38 UTC (permalink / raw)
  To: pgsql-general; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Bob Pawley <rjpawley@shaw.ca>

On Sunday 28 October 2007 2:28 pm, Tom Lane wrote:
> Bob Pawley <rjpawley@shaw.ca> writes:
> > This is becoming quite frustrating.
>
> The errant "psql" is your problem ... although pg_restore is being
> quite unhelpful by not mentioning the filename that it's trying to open.
>
> 			regards, tom lane
>
Well there is your problem. Might help if I was using both eyes. Thanks for 
the heads up Tom.
-- 
Adrian Klaver
aklaver@comcast.net



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 22:01  Bob Pawley <rjpawley@shaw.ca>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 2 replies; 67+ messages in thread

From: Bob Pawley @ 2007-10-28 22:01 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Adrian Klaver <aklaver@comcast.net>; pgsql-general

The latest in the saga -

By using - pg_restore  -h localhost -d PDW -U postgres  aurel.sql

I get the message - pg_restore: input file does not appear to be a valid 
archive.

I get this message when I used the aurel.sql file which I previously loaded 
successfully in 8.1 and also when I use an aurel.sql file which I just 
successfully dumped a few minutes ago from the 8.1 on my other computer.

Could pg_restore in my 8.2 be corrupted??

Bob
----- Original Message ----- 
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Bob Pawley" <rjpawley@shaw.ca>
Cc: "Adrian Klaver" <aklaver@comcast.net>; <pgsql-general@postgresql.org>
Sent: Sunday, October 28, 2007 2:28 PM
Subject: Re: [GENERAL] pg_restore


> Bob Pawley <rjpawley@shaw.ca> writes:
>> This is becoming quite frustrating.
>
> The errant "psql" is your problem ... although pg_restore is being
> quite unhelpful by not mentioning the filename that it's trying to open.
>
> regards, tom lane 




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 22:15  Adrian Klaver <aklaver@comcast.net>
  parent: Bob Pawley <rjpawley@shaw.ca>
  1 sibling, 1 reply; 67+ messages in thread

From: Adrian Klaver @ 2007-10-28 22:15 UTC (permalink / raw)
  To: pgsql-general; +Cc: Bob Pawley <rjpawley@shaw.ca>; Tom Lane <tgl@sss.pgh.pa.us>

On Sunday 28 October 2007 3:01 pm, Bob Pawley wrote:
> The latest in the saga -
>
> By using - pg_restore  -h localhost -d PDW -U postgres  aurel.sql
>
> I get the message - pg_restore: input file does not appear to be a valid
> archive.
>
> I get this message when I used the aurel.sql file which I previously loaded
> successfully in 8.1 and also when I use an aurel.sql file which I just
> successfully dumped a few minutes ago from the 8.1 on my other computer.
>
> Could pg_restore in my 8.2 be corrupted??
>
> Bob
What does your dump command look like? My guess is your are doing a plain text 
dump and pg_restore only works with the custom formats. If you want to use 
the plain text version than you need to use psql. This maybe how you got to 
the point of having both pg_restore and psql on the same line.
-- 
Adrian Klaver
aklaver@comcast.net



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 22:18  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Bob Pawley <rjpawley@shaw.ca>
  1 sibling, 2 replies; 67+ messages in thread

From: Tom Lane @ 2007-10-28 22:18 UTC (permalink / raw)
  To: Bob Pawley <rjpawley@shaw.ca>; +Cc: Adrian Klaver <aklaver@comcast.net>; pgsql-general

Bob Pawley <rjpawley@shaw.ca> writes:
> The latest in the saga -
> By using - pg_restore  -h localhost -d PDW -U postgres  aurel.sql

> I get the message - pg_restore: input file does not appear to be a valid 
> archive.

Oh, I just twigged that you are using a plain-SQL dump file (that is,
you didn't specify -Fc or -Ft to pg_dump).  For plain-SQL dumps you
should not use pg_restore at all; you feed those to psql.

This bites enough newbies that I'm thinking the above message ought to
inclue a HINT to use psql directly.  We haven't previously used hints
in client-side messages but this seems to need one.  Anyone have
thoughts about how to phrase and format it?

(BTW, I just fixed pg_restore to always mention the file name it
attempted to open after getting an fopen failure.)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 22:40  Bob Pawley <rjpawley@shaw.ca>
  parent: Adrian Klaver <aklaver@comcast.net>
  0 siblings, 2 replies; 67+ messages in thread

From: Bob Pawley @ 2007-10-28 22:40 UTC (permalink / raw)
  To: Adrian Klaver <aklaver@comcast.net>; pgsql-general; +Cc: Tom Lane <tgl@sss.pgh.pa.us>

This is the dump command

pg_dump -h localhost -d  Aurel -U postgres

Could you suggest a dump command that will match the restore command -

pg_restore  -h localhost -d PDW -U postgres  aurel.sql


Thanks

Bob

----- Original Message ----- 
From: "Adrian Klaver" <aklaver@comcast.net>
To: <pgsql-general@postgresql.org>
Cc: "Bob Pawley" <rjpawley@shaw.ca>; "Tom Lane" <tgl@sss.pgh.pa.us>
Sent: Sunday, October 28, 2007 3:15 PM
Subject: Re: [GENERAL] pg_restore


> On Sunday 28 October 2007 3:01 pm, Bob Pawley wrote:
>> The latest in the saga -
>>
>> By using - pg_restore  -h localhost -d PDW -U postgres  aurel.sql
>>
>> I get the message - pg_restore: input file does not appear to be a valid
>> archive.
>>
>> I get this message when I used the aurel.sql file which I previously 
>> loaded
>> successfully in 8.1 and also when I use an aurel.sql file which I just
>> successfully dumped a few minutes ago from the 8.1 on my other computer.
>>
>> Could pg_restore in my 8.2 be corrupted??
>>
>> Bob
> What does your dump command look like? My guess is your are doing a plain 
> text
> dump and pg_restore only works with the custom formats. If you want to use
> the plain text version than you need to use psql. This maybe how you got 
> to
> the point of having both pg_restore and psql on the same line.
> -- 
> Adrian Klaver
> aklaver@comcast.net
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match 




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 22:58  Adrian Klaver <aklaver@comcast.net>
  parent: Bob Pawley <rjpawley@shaw.ca>
  1 sibling, 1 reply; 67+ messages in thread

From: Adrian Klaver @ 2007-10-28 22:58 UTC (permalink / raw)
  To: pgsql-general; +Cc: Bob Pawley <rjpawley@shaw.ca>; Tom Lane <tgl@sss.pgh.pa.us>

On Sunday 28 October 2007 3:40 pm, Bob Pawley wrote:
> This is the dump command
>
> pg_dump -h localhost -d  Aurel -U postgres
>
> Could you suggest a dump command that will match the restore command -
>
> pg_restore  -h localhost -d PDW -U postgres  aurel.sql
>
>
> Thanks
>
> Bob
>
It depends on what you want to do. But to use pg_restore you will need to use 
one of either -Fc or Ft after the pg_dump command. My concern is that you are 
connecting to a different database name in the dump and restore commands. 
This may be what you want, but then again it may not.I would suggest reading 
the information at the URL below before proceeding further.
http://www.postgresql.org/docs/8.2/interactive/app-pgdump.html

-- 
Adrian Klaver
aklaver@comcast.net



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 23:12  Raymond O'Donnell <rod@iol.ie>
  parent: Bob Pawley <rjpawley@shaw.ca>
  1 sibling, 0 replies; 67+ messages in thread

From: Raymond O'Donnell @ 2007-10-28 23:12 UTC (permalink / raw)
  To: Bob Pawley <rjpawley@shaw.ca>; +Cc: Adrian Klaver <aklaver@comcast.net>; pgsql-general; Tom Lane <tgl@sss.pgh.pa.us>

On 28/10/2007 22:40, Bob Pawley wrote:

> pg_dump -h localhost -d  Aurel -U postgres
 >
 > Could you suggest a dump command that will match the restore command -
 >
 > pg_restore  -h localhost -d PDW -U postgres  aurel.sql

One thing that caught me, and I suspect may be catching you also - 
somewhat confusingly, in pg_restore the -d option specifies the database 
to which to restore; in pg_dump it instead causes the data to be dumped 
as INSERT statements rather than COPY.

I can see why things may work this way (pg_dump always needs to be 
pointed at a database, whereas pg_restore doesn't if the dump is going 
to create the database)....but it can trap the unwary.

See the docs at 
http://www.postgresql.org/docs/8.2/static/reference-client.html

Ray.


---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 23:19  Thomas Kellerer <spam_eater@gmx.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 67+ messages in thread

From: Thomas Kellerer @ 2007-10-28 23:19 UTC (permalink / raw)
  To: pgsql-general

Tom Lane wrote on 28.10.2007 23:18:
> Oh, I just twigged that you are using a plain-SQL dump file (that is,
> you didn't specify -Fc or -Ft to pg_dump).  For plain-SQL dumps you
> should not use pg_restore at all; you feed those to psql.

While we are on the topic of pg_dump/pg_restore:

Why is it, that pg_dump can use a compressed output directly but pg_dumpall is 
always using a SQL (i.e. "plain text") output?

Thomas




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-28 23:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  0 siblings, 1 reply; 67+ messages in thread

From: Tom Lane @ 2007-10-28 23:55 UTC (permalink / raw)
  To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-general

Thomas Kellerer <spam_eater@gmx.net> writes:
> Why is it, that pg_dump can use a compressed output directly but pg_dumpall is 
> always using a SQL (i.e. "plain text") output?

The custom and tar formats are not designed to support data from more
than one database.  At some point somebody should probably try to
improve that situation, but it's not immediately obvious what the
feature ought to look like.

If all you need is compression it's certainly easy enough:

	pg_dumpall | gzip >mydump.gz

	zcat mydump.gz | psql

So the argument for doing more hinges around the extra flexibility of
pg_restore to do selective restores and suchlike, and extending those
features to behave sanely for multi-database dumps is not trivial.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-29 04:13  Joshua D. Drake <jd@commandprompt.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 67+ messages in thread

From: Joshua D. Drake @ 2007-10-29 04:13 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bob Pawley <rjpawley@shaw.ca>; Adrian Klaver <aklaver@comcast.net>; pgsql-general

Tom Lane wrote:
> Bob Pawley <rjpawley@shaw.ca> writes:
>> The latest in the saga -
>> By using - pg_restore  -h localhost -d PDW -U postgres  aurel.sql
> 
>> I get the message - pg_restore: input file does not appear to be a valid 
>> archive.
> 
> Oh, I just twigged that you are using a plain-SQL dump file (that is,
> you didn't specify -Fc or -Ft to pg_dump).  For plain-SQL dumps you
> should not use pg_restore at all; you feed those to psql.
> 
> This bites enough newbies that I'm thinking the above message ought to
> inclue a HINT to use psql directly.  We haven't previously used hints
> in client-side messages but this seems to need one.  Anyone have
> thoughts about how to phrase and format it?

Honestly, I would prefer we just fix pg_restore to be able to use plain 
text format. The fact that it doesn't is a serious lack of consistency 
within our client side apps. E.g; it is completely counter-intuitive to 
require our "client user interface" to be used for restoration when 
there is a "pg_restore" sitting in the bin directory.

Sincerely,

Joshua D. Drake



> 
> (BTW, I just fixed pg_restore to always mention the file name it
> attempted to open after getting an fopen failure.)
> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
> 




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-29 16:50  Bob Pawley <rjpawley@shaw.ca>
  parent: Adrian Klaver <aklaver@comcast.net>
  0 siblings, 1 reply; 67+ messages in thread

From: Bob Pawley @ 2007-10-29 16:50 UTC (permalink / raw)
  To: Adrian Klaver <aklaver@comcast.net>; pgsql-general; +Cc: Tom Lane <tgl@sss.pgh.pa.us>

Following the examples in the docs I've come to this.

I am attempting to restore the existing sql dump using
psql -d PDW -f aurel.sql

I am then asked for a password.

I try every password that the computer knows with no success.

Funny thing the password cursor doesn't move when inputting the password.

I keep getting authentication failure.

When I attempt to do a new pg_dump with -Fc I also get a request for 
password with identical results.

Bob



----- Original Message ----- 
From: "Adrian Klaver" <aklaver@comcast.net>
To: <pgsql-general@postgresql.org>
Cc: "Bob Pawley" <rjpawley@shaw.ca>; "Tom Lane" <tgl@sss.pgh.pa.us>
Sent: Sunday, October 28, 2007 3:58 PM
Subject: Re: [GENERAL] pg_restore


> On Sunday 28 October 2007 3:40 pm, Bob Pawley wrote:
>> This is the dump command
>>
>> pg_dump -h localhost -d  Aurel -U postgres
>>
>> Could you suggest a dump command that will match the restore command -
>>
>> pg_restore  -h localhost -d PDW -U postgres  aurel.sql
>>
>>
>> Thanks
>>
>> Bob
>>
> It depends on what you want to do. But to use pg_restore you will need to 
> use
> one of either -Fc or Ft after the pg_dump command. My concern is that you 
> are
> connecting to a different database name in the dump and restore commands.
> This may be what you want, but then again it may not.I would suggest 
> reading
> the information at the URL below before proceeding further.
> http://www.postgresql.org/docs/8.2/interactive/app-pgdump.html
>
> -- 
> Adrian Klaver
> aklaver@comcast.net 




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-29 17:04  Douglas McNaught <doug@mcnaught.org>
  parent: Bob Pawley <rjpawley@shaw.ca>
  0 siblings, 0 replies; 67+ messages in thread

From: Douglas McNaught @ 2007-10-29 17:04 UTC (permalink / raw)
  To: Bob Pawley <rjpawley@shaw.ca>; +Cc: Adrian Klaver <aklaver@comcast.net>; pgsql-general; Tom Lane <tgl@sss.pgh.pa.us>

Bob Pawley <rjpawley@shaw.ca> writes:

> Following the examples in the docs I've come to this.
>
> I am attempting to restore the existing sql dump using
> psql -d PDW -f aurel.sql
>
> I am then asked for a password.
>
> I try every password that the computer knows with no success.
>
> Funny thing the password cursor doesn't move when inputting the password.

This is standard for Unix command-line applications.

> I keep getting authentication failure.
>
> When I attempt to do a new pg_dump with -Fc I also get a request for
> password with identical results.

Sounds like you need to fix pg_hba.conf then.

-Doug



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2007-10-29 18:34  Thomas Kellerer <spam_eater@gmx.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 67+ messages in thread

From: Thomas Kellerer @ 2007-10-29 18:34 UTC (permalink / raw)
  To: pgsql-general

Tom Lane wrote on 29.10.2007 00:55:
> Thomas Kellerer <spam_eater@gmx.net> writes:
>> Why is it, that pg_dump can use a compressed output directly but pg_dumpall is 
>> always using a SQL (i.e. "plain text") output?
> 
> The custom and tar formats are not designed to support data from more
> than one database.  At some point somebody should probably try to
> improve that situation, but it's not immediately obvious what the
> feature ought to look like.

OK, thanks


> If all you need is compression it's certainly easy enough:
> 
> 	pg_dumpall | gzip >mydump.gz

That's what I'm currently doing ;)


Thanks




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* pg_restore
@ 2011-03-30 20:56  Mike Orr <sluggoster@gmail.com>
  0 siblings, 3 replies; 67+ messages in thread

From: Mike Orr @ 2011-03-30 20:56 UTC (permalink / raw)
  To: pgsql-general

I'm converting a MySQL webapp to PostgreSQL. I have a backup server
which is refreshed twice daily with mysqldump/mysql and has a
continuously-running copy of the webapp. I want to replicate this with
pg_dump/pg_restore.  Ideally I'd like to restore just a few tables,
without stopping the webapp and closing/reopening its connections. Is
this possible with pg_restore?

MySQL simply locks the tables, drops/recreates them, loads the data,
and unlocks the tables. Other connections have to wait but they don't
have to be closed/reopened. The PostgreSQL manual recommends restoring
into an empty database using template0, which would require first
closing the other connections and then dropping the database. It would
also take unnecessary time to recreate the database and tables that
aren't changing. So I'm wondering if there's a less obtrusive way to
refresh the data.

The tables to be updated do have 1:many relationships. How would I
restore all of them at once? List them all as '-t' args to the same
pg_restore command?

-- 
Mike Orr <sluggoster@gmail.com>



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2011-03-30 21:36  John R Pierce <pierce@hogranch.com>
  parent: Mike Orr <sluggoster@gmail.com>
  2 siblings, 1 reply; 67+ messages in thread

From: John R Pierce @ 2011-03-30 21:36 UTC (permalink / raw)
  To: pgsql-general

On 03/30/11 1:56 PM, Mike Orr wrote:
> MySQL simply locks the tables, drops/recreates them, loads the data,
> and unlocks the tables. Other connections have to wait but they don't
> have to be closed/reopened. The PostgreSQL manual recommends restoring
> into an empty database using template0, which would require first
> closing the other connections and then dropping the database. It would
> also take unnecessary time to recreate the database and tables that
> aren't changing. So I'm wondering if there's a less obtrusive way to
> refresh the data.

its a backup server, right?   so noone is accessing it, are they?

rather than using pg_dump -Fc |pg_restore, you can use pg_dump | psql 
... and you can tell pg_dump in this mode to only dump specified tables.

however, you might look at PITR and/or WAL log shipping rather than 
dump/restore.  this would only update new data, and when you playback 
the WAL log on the backup server bring it up to whatever point in time 
you want.






^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2011-03-30 21:55  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Mike Orr <sluggoster@gmail.com>
  2 siblings, 0 replies; 67+ messages in thread

From: Scott Marlowe @ 2011-03-30 21:55 UTC (permalink / raw)
  To: Mike Orr <sluggoster@gmail.com>; +Cc: pgsql-general

On Wed, Mar 30, 2011 at 2:56 PM, Mike Orr <sluggoster@gmail.com> wrote:
> I'm converting a MySQL webapp to PostgreSQL. I have a backup server
> which is refreshed twice daily with mysqldump/mysql and has a
> continuously-running copy of the webapp. I want to replicate this with
> pg_dump/pg_restore.  Ideally I'd like to restore just a few tables,
> without stopping the webapp and closing/reopening its connections. Is
> this possible with pg_restore?
>

Would replication of just those tables give you what you want?  If so
look into slony which allows you to replicate individual tables.



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2011-03-30 23:08  Mike Orr <sluggoster@gmail.com>
  parent: John R Pierce <pierce@hogranch.com>
  0 siblings, 3 replies; 67+ messages in thread

From: Mike Orr @ 2011-03-30 23:08 UTC (permalink / raw)
  To: pgsql-general

On Wed, Mar 30, 2011 at 2:36 PM, John R Pierce <pierce@hogranch.com> wrote:
> On 03/30/11 1:56 PM, Mike Orr wrote:
>>
>> MySQL simply locks the tables, drops/recreates them, loads the data,
>> and unlocks the tables. Other connections have to wait but they don't
>> have to be closed/reopened. The PostgreSQL manual recommends restoring
>> into an empty database using template0, which would require first
>> closing the other connections and then dropping the database. It would
>> also take unnecessary time to recreate the database and tables that
>> aren't changing. So I'm wondering if there's a less obtrusive way to
>> refresh the data.
>
> its a backup server, right?   so noone is accessing it, are they?

Somebody may be accessing it. I could take the site down for the
duration, but it would be easier not to.

> rather than using pg_dump -Fc |pg_restore, you can use pg_dump | psql ...
> and you can tell pg_dump in this mode to only dump specified tables.

That might be a better solution. I was hoping to use the same pgdump
file for this that I also use for routine offline backup, but maybe
this is such a special case that a separate dump file would be better.

> however, you might look at PITR and/or WAL log shipping rather than
> dump/restore.  this would only update new data, and when you playback the
> WAL log on the backup server bring it up to whatever point in time you want.

I looked at PITR and WAL, but it looks like I can't have the backup
database running and answering queries while it's WAL'ing. I'd have to
log in and switch it to normal mode and start the webapp, and that's
what I may not be able to do if the backup server were needed.

The backup server exists in case there's something like an earthquake
at the main data center. Something that could cause a regional
communication blackout and prevent the sysadmins from accessing the
backup server remotely. The site is a data-sharing tool for emergency
responders across the country. They may be in another region working
on an unrelated incident, and need the website. So the backup site has
to be already running and loaded with data -- we can't depend on a
sysadmin being able to log in remotely to turn it on.

-- 
Mike Orr <sluggoster@gmail.com>



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2011-03-30 23:14  John R Pierce <pierce@hogranch.com>
  parent: Mike Orr <sluggoster@gmail.com>
  2 siblings, 0 replies; 67+ messages in thread

From: John R Pierce @ 2011-03-30 23:14 UTC (permalink / raw)
  To: pgsql-general

On 03/30/11 4:08 PM, Mike Orr wrote:
> I looked at PITR and WAL, but it looks like I can't have the backup
> database running and answering queries while it's WAL'ing. I'd have to
> log in and switch it to normal mode and start the webapp, and that's
> what I may not be able to do if the backup server were needed.
>

look at the 'warm standby' stuff.  just realize that this backup HAS to 
be readonly.


> The backup server exists in case there's something like an earthquake
> at the main data center. Something that could cause a regional
> communication blackout and prevent the sysadmins from accessing the
> backup server remotely. The site is a data-sharing tool for emergency
> responders across the country. They may be in another region working
> on an unrelated incident, and need the website. So the backup site has
> to be already running and loaded with data -- we can't depend on a
> sysadmin being able to log in remotely to turn it on


distributed failover is tricky stuff.    the standby *could* be 
monitoring the active server and initiate automatic failover if it goes 
down, but you don't want spontaneous failover if communications between 
the servers is disrupted or you end up with two masters.





^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2011-03-30 23:17  Joshua D. Drake <jd@commandprompt.com>
  parent: Mike Orr <sluggoster@gmail.com>
  2 siblings, 0 replies; 67+ messages in thread

From: Joshua D. Drake @ 2011-03-30 23:17 UTC (permalink / raw)
  To: Mike Orr <sluggoster@gmail.com>; +Cc: pgsql-general


> > however, you might look at PITR and/or WAL log shipping rather than
> > dump/restore.  this would only update new data, and when you playback the
> > WAL log on the backup server bring it up to whatever point in time you want.
> 
> I looked at PITR and WAL, but it looks like I can't have the backup
> database running and answering queries while it's WAL'ing. I'd have to
> log in and switch it to normal mode and start the webapp, and that's
> what I may not be able to do if the backup server were needed.

You can if you are using 9.x, take a look at the HS stuff.

Joshua D. Drake

-- 
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2011-04-01 02:00  Marco Colombo <pgsql@esiway.net>
  parent: Mike Orr <sluggoster@gmail.com>
  2 siblings, 0 replies; 67+ messages in thread

From: Marco Colombo @ 2011-04-01 02:00 UTC (permalink / raw)
  To: pgsql-general

On 03/31/2011 01:08 AM, Mike Orr wrote:
> That might be a better solution. I was hoping to use the same pgdump
> file for this that I also use for routine offline backup, but maybe
> this is such a special case that a separate dump file would be better.

Why don't you post the exact mysqldump/mysql commands you are using? It 
would be easier to provide equivalent pgdump/psql commands.

Meanwhile, have a look at the pg_restore man page, -t and/or -L options. 
Maybe -c as well. Oh, and -1.

.TM.



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2011-04-01 21:39  Merlin Moncure <mmoncure@gmail.com>
  parent: Mike Orr <sluggoster@gmail.com>
  2 siblings, 1 reply; 67+ messages in thread

From: Merlin Moncure @ 2011-04-01 21:39 UTC (permalink / raw)
  To: Mike Orr <sluggoster@gmail.com>; +Cc: pgsql-general

On Wed, Mar 30, 2011 at 3:56 PM, Mike Orr <sluggoster@gmail.com> wrote:
> I'm converting a MySQL webapp to PostgreSQL. I have a backup server
> which is refreshed twice daily with mysqldump/mysql and has a
> continuously-running copy of the webapp. I want to replicate this with
> pg_dump/pg_restore.  Ideally I'd like to restore just a few tables,
> without stopping the webapp and closing/reopening its connections. Is
> this possible with pg_restore?
>
> MySQL simply locks the tables, drops/recreates them, loads the data,
> and unlocks the tables. Other connections have to wait but they don't
> have to be closed/reopened. The PostgreSQL manual recommends restoring
> into an empty database using template0, which would require first
> closing the other connections and then dropping the database. It would
> also take unnecessary time to recreate the database and tables that
> aren't changing. So I'm wondering if there's a less obtrusive way to
> refresh the data.
>
> The tables to be updated do have 1:many relationships. How would I
> restore all of them at once? List them all as '-t' args to the same
> pg_restore command?

pg_dump and pg_restore can do it.  pg_dump -Fc is just like regular
dump but you can pull out specific tables by name.  or you can just
take are regular backup and just pg_dump out specific tables with the
proper options set in a small script.

because pg is transactional, you can do this any time of the day
without blocking  users (although there may be a small performance
hit).

hs/sr is also something to look at.

merlin



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_restore
@ 2011-04-12 21:09  Mike Orr <sluggoster@gmail.com>
  parent: Merlin Moncure <mmoncure@gmail.com>
  0 siblings, 0 replies; 67+ messages in thread

From: Mike Orr @ 2011-04-12 21:09 UTC (permalink / raw)
  To: pgsql-general

On Fri, Apr 1, 2011 at 2:39 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
> On Wed, Mar 30, 2011 at 3:56 PM, Mike Orr <sluggoster@gmail.com> wrote:
>> I'm converting a MySQL webapp to PostgreSQL. I have a backup server
>> which is refreshed twice daily with mysqldump/mysql and has a
>> continuously-running copy of the webapp. I want to replicate this with
>> pg_dump/pg_restore.  Ideally I'd like to restore just a few tables,
>> without stopping the webapp and closing/reopening its connections. Is
>> this possible with pg_restore?
>>
>> MySQL simply locks the tables, drops/recreates them, loads the data,
>> and unlocks the tables. Other connections have to wait but they don't
>> have to be closed/reopened. The PostgreSQL manual recommends restoring
>> into an empty database using template0, which would require first
>> closing the other connections and then dropping the database. It would
>> also take unnecessary time to recreate the database and tables that
>> aren't changing. So I'm wondering if there's a less obtrusive way to
>> refresh the data.
>>
>> The tables to be updated do have 1:many relationships. How would I
>> restore all of them at once? List them all as '-t' args to the same
>> pg_restore command?
>
> pg_dump and pg_restore can do it.  pg_dump -Fc is just like regular
> dump but you can pull out specific tables by name.  or you can just
> take are regular backup and just pg_dump out specific tables with the
> proper options set in a small script.
>
> because pg is transactional, you can do this any time of the day
> without blocking  users (although there may be a small performance
> hit).

I'm tentatively going with a psql script:

"""
\set quiet 1
\timing off
BEGIN;
TRUNCATE incidents, entries, locator, events;
\i /tmp/sync-pg/hotline.sql
\i /tmp/sync-pg/locator.sql
\i /tmp/sync-pg/events.sql
COMMIT;
ANALYZE;
"""

And a shell script that can do the saving, transfer, and loading in
discrete parts. (So I can have the same script on both hosts, and do
the parts individually for testing or together for production):

"""
usage: daily-pg [-hdtlk]

Synchronize Postgres data to the backup server. Options:
  -d: Dump the data to /tmp/sync-pg
  -t HOSTNAME: Rsync the data to the specified host
  -l: Load the data from /tmp/sync-pg
  -k: Keep the dump directory after loading (otherwise delete it)
  -h: Print this help message and exit

If no options, do nothing.
"""

Dumping also compresses the files, and loading uncompresses them if
they're compressed.

-- 
Mike Orr <sluggoster@gmail.com>



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* PG_RESTORE
@ 2011-05-31 20:42  salah jubeh <s_jubeh@yahoo.com>
  0 siblings, 0 replies; 67+ messages in thread

From: salah jubeh @ 2011-05-31 20:42 UTC (permalink / raw)
  To: pgsql-general

Hello,

I hope that I am not wasting your time,  I tried to restore a part of a database 
and I faced couple of obstacles. First of all, I tried to restore a certain set 
of schemas without restoring a certain relations. I wanted to do that in order 
to create some automated dummy data for testing. There is no option in 
pg_restore to do that so I started to  restore it using the -n and -t options. 
There are two things, here 
1. When I tried to restore a table which has a dependency I get errors, I think 
pg_restore can be improved here by having an option to restore the dependencies 
if they are not existed.
2. when I resetored a table in a certain schema which has a dependency on 
another table in the public schema, pg restore was not able to find this table 
(the one in the public schema)  and I get an error.

i.e pg_restore ..... -n schema1 -t table1 ...

error tablex does not exist... (I do not remember the exact format and message) 

My question, is there is an easier way to do that, - I will have a look on 
pg_dump to see if I can achieve this task by combining both tools. Also, I am 
wondering if I am doing something wrong here.

Thanks in advance

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* pg_Restore
@ 2013-01-20 18:33  bhanu udaya <udayabhanu1984@hotmail.com>
  0 siblings, 2 replies; 67+ messages in thread

From: bhanu udaya @ 2013-01-20 18:33 UTC (permalink / raw)
  To: pgadmin-support@postgresql.org <pgadmin-support@postgresql.org>

Hello, Greetings !I am new to postgres and recently got migrated from oracle.I am trying to restore 9.5G database (1GB dumpfile) which has 500 schemas with 1 lakh rows in each schema. Could take the data dump using pg_dump and it takes around 40 minutes. I tried to use pg_restore to restore this dump, but it takes hours to restore the dump. I have used the configurations parameters as below: shared_buffers = 1024MB   work_mem = 512MBmaintenance_work_mem = 512MBwal_buffers = 100MB I have used command to restore as below:pg_Restore -d newdb -j2 e:\file.dmp My machine configurations are as below:Windows Core I5 with 4GB Ram. Thanks for your help. Thanks and RegardsRadha Krishna 		 	   		  =

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-20 21:42  Guillaume Lelarge <guillaume@lelarge.info>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  1 sibling, 0 replies; 67+ messages in thread

From: Guillaume Lelarge @ 2013-01-20 21:42 UTC (permalink / raw)
  To: bhanu udaya <udayabhanu1984@hotmail.com>; +Cc: pgadmin-support@postgresql.org <pgadmin-support@postgresql.org>

On Mon, 2013-01-21 at 00:03 +0530, bhanu udaya wrote:
> Hello, Greetings !I am new to postgres and recently got migrated from oracle.I am trying to restore 9.5G database (1GB dumpfile) which has 500 schemas with 1 lakh rows in each schema. Could take the data dump using pg_dump and it takes around 40 minutes. I tried to use pg_restore to restore this dump, but it takes hours to restore the dump. I have used the configurations parameters as below: shared_buffers = 1024MB   work_mem = 512MBmaintenance_work_mem = 512MBwal_buffers = 100MB I have used command to restore as below:pg_Restore -d newdb -j2 e:\file.dmp My machine configurations are as below:Windows Core I5 with 4GB Ram. Thanks for your help. Thanks and RegardsRadha Krishna 		 	   		  

You should better look for help on the pgsql-* mailing lists (for
example pgsql-general).

Anyway, from what you say, you should probably take a look at your
checkpoint settings. They probably hurt you more than you think.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 04:10  bhanu udaya <udayabhanu1984@hotmail.com>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  1 sibling, 1 reply; 67+ messages in thread

From: bhanu udaya @ 2013-01-21 04:10 UTC (permalink / raw)
  To: pgsql-general

Hello,
 
Greetings !
I am new to postgres and recently got migrated from oracle. I am using postgresql 9.2 version.
I am trying to restore 9.5G database (1GB dumpfile) which has 500 schemas with 1 lakh rows in each schema. Could take the data dump using pg_dump and it takes around 40 minutes. I tried to use pg_restore to restore this dump, but it takes hours to restore the dump. I have used the configurations parameters as below:
 
shared_buffers = 1024MB   
work_mem = 512MB
maintenance_work_mem = 512MB
wal_buffers = 100MB
 
I have used command to restore as below:
pg_Restore -d newdb -j2 e:\file.dmp
 
My machine configurations are as below:
Windows Core I5 with 4GB Ram.
 
Thanks for your help.
 
Thanks and Regards
Radha Krishna
 		 	   		   		 	   		  =

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 04:19  François Beausoleil <francois@teksol.info>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  0 siblings, 1 reply; 67+ messages in thread

From: François Beausoleil @ 2013-01-21 04:19 UTC (permalink / raw)
  To: bhanu udaya <udayabhanu1984@hotmail.com>; +Cc: pgsql-general


Le 2013-01-20 à 23:10, bhanu udaya a écrit :

> I am new to postgres and recently got migrated from oracle. I am using postgresql 9.2 version.

Welcome, and good choice for the version.

> I am trying to restore 9.5G database (1GB dumpfile) which has 500 schemas with 1 lakh rows in each schema. Could take the data dump using pg_dump and it takes around 40 minutes. I tried to use pg_restore to restore this dump, but it takes hours to restore the dump. I have used the configurations parameters as below:
>  
> shared_buffers = 1024MB   
> work_mem = 512MB
> maintenance_work_mem = 512MB
> wal_buffers = 100MB
>  
> I have used command to restore as below:
> pg_Restore -d newdb -j2 e:\file.dmp
>  
> My machine configurations are as below:
> Windows Core I5 with 4GB Ram.

Other settings you can change during the initial restore / load phase:

fsync = off # ONLY DURING INITIAL DATA LOAD!

checkpoint_segments = 128 # large value, such as 128 or 256 (16MB per file, check disk space)
checkpoint_timeout = 30min
checkpoint_completion_target = 0.9

wal_level = minimal # You'll need to do a full base backup if you use this

Read this section of the manual: http://www.postgresql.org/docs/current/static/runtime-config-wal.html

Have a great day!
François Beausoleil

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 06:17  bhanu udaya <udayabhanu1984@hotmail.com>
  parent: François Beausoleil <francois@teksol.info>
  0 siblings, 2 replies; 67+ messages in thread

From: bhanu udaya @ 2013-01-21 06:17 UTC (permalink / raw)
  To: François Beausoleil <francois@teksol.info>; +Cc: pgsql-general


 Hello,Greetings !Thank you for the prompt reply. I have changed the settings as listed below:> > shared_buffers = 1024MB   
> > work_mem = 512MB
> > maintenance_work_mem = 512MB
> > wal_buffers = 100MB> fsync = off # ONLY DURING INITIAL DATA LOAD!
> checkpoint_segments = 128 # large value, such as 128 or 256 (16MB per file, check disk space)
> checkpoint_timeout = 30min
> checkpoint_completion_target = 0.9
> wal_level = minimal # You'll need to do a full base backup if you use this
But, have same problem. It is almost 1 hour now, the restoration is still going on.  After every test case execution, we would like to refresh the database and expected refresh should be completed in less than 10 minutes. Is this achievable with the kind of configuration I have listed in my earlier email.  Kindly help , as how to speed up this restoration process. Thanks and RegardsRadha Krishna  > Subject: Re: [GENERAL] pg_Restore
> From: francois@teksol.info
> Date: Sun, 20 Jan 2013 23:19:44 -0500
> CC: pgsql-general@postgresql.org
> To: udayabhanu1984@hotmail.com
> 
> 
> Le 2013-01-20 à 23:10, bhanu udaya a écrit :
> 
> > I am new to postgres and recently got migrated from oracle. I am using postgresql 9.2 version.
> 
> Welcome, and good choice for the version.
> 
> > I am trying to restore 9.5G database (1GB dumpfile) which has 500 schemas with 1 lakh rows in each schema. Could take the data dump using pg_dump and it takes around 40 minutes. I tried to use pg_restore to restore this dump, but it takes hours to restore the dump. I have used the configurations parameters as below:
> >  
> > shared_buffers = 1024MB   
> > work_mem = 512MB
> > maintenance_work_mem = 512MB
> > wal_buffers = 100MB
> >  
> > I have used command to restore as below:
> > pg_Restore -d newdb -j2 e:\file.dmp
> >  
> > My machine configurations are as below:
> > Windows Core I5 with 4GB Ram.
> 
> Other settings you can change during the initial restore / load phase:
> 
> fsync = off # ONLY DURING INITIAL DATA LOAD!
> 
> checkpoint_segments = 128 # large value, such as 128 or 256 (16MB per file, check disk space)
> checkpoint_timeout = 30min
> checkpoint_completion_target = 0.9
> 
> wal_level = minimal # You'll need to do a full base backup if you use this
> 
> Read this section of the manual: http://www.postgresql.org/docs/current/static/runtime-config-wal.html
> 
> Have a great day!
> François Beausoleil
 		 	   		  =

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 07:15  Magnus Hagander <magnus@hagander.net>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  1 sibling, 1 reply; 67+ messages in thread

From: Magnus Hagander @ 2013-01-21 07:15 UTC (permalink / raw)
  To: bhanu udaya <udayabhanu1984@hotmail.com>; +Cc: François Beausoleil <francois@teksol.info>; pgsql-general

On Jan 21, 2013 7:17 AM, "bhanu udaya" <udayabhanu1984@hotmail.com> wrote:
>
>
>  Hello,
> Greetings !
> Thank you for the prompt reply. I have changed the settings as listed
below:
> > > shared_buffers = 1024MB
> > > work_mem = 512MB
> > > maintenance_work_mem = 512MB
> > > wal_buffers = 100MB
> > fsync = off # ONLY DURING INITIAL DATA LOAD!
> > checkpoint_segments = 128 # large value, such as 128 or 256 (16MB per
file, check disk space)
> > checkpoint_timeout = 30min
> > checkpoint_completion_target = 0.9
> > wal_level = minimal # You'll need to do a full base backup if you use
this
> But, have same problem. It is almost 1 hour now, the restoration is still
going on.  After every test case execution, we would like to refresh the
database and expected refresh should be completed in less than 10 minutes.
Is this achievable with the kind of configuration I have listed in my
earlier email.
>
> Kindly help , as how to speed up this restoration process.
>

Try running pg_restore with the -1 option. If that doesn't help, try -m4 or
something like that (you'll have to remove the first option then, can't use
both at once)

But it's going to be pushing it anyway. Your scenario is going to create
thousands of files (assuming you have multiple tables in each of your
schemas as is normal), and that's just not something ntfs does very fast.
Once the files are there, I bet loading the data is reasonably fast since
it can't be all that big....

/Magnus

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 09:31  bhanu udaya <udayabhanu1984@hotmail.com>
  parent: Magnus Hagander <magnus@hagander.net>
  0 siblings, 2 replies; 67+ messages in thread

From: bhanu udaya @ 2013-01-21 09:31 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; +Cc: François Beausoleil <francois@teksol.info>; pgsql-general

Hello,Greetings !I tried with all the below options. It approximatly takes 1 hour 30 minutes for restoring a 9GB database.  This much time can not be affordable as the execution of test cases take only 10% of this whole time and waiting 1 hour 30 minutes after every test case execution is alot for the team.  Kindly let me know if we can reduce the database restoration time . Thanks and RegardsRadha Krishna
 Date: Mon, 21 Jan 2013 08:15:47 +0100
Subject: Re: [GENERAL] pg_Restore
From: magnus@hagander.net
To: udayabhanu1984@hotmail.com
CC: francois@teksol.info; pgsql-general@postgresql.org



On Jan 21, 2013 7:17 AM, "bhanu udaya" <udayabhanu1984@hotmail.com> wrote:

>

>

>  Hello,

> Greetings !

> Thank you for the prompt reply. I have changed the settings as listed below:

> > > shared_buffers = 1024MB 

> > > work_mem = 512MB

> > > maintenance_work_mem = 512MB

> > > wal_buffers = 100MB

> > fsync = off # ONLY DURING INITIAL DATA LOAD!

> > checkpoint_segments = 128 # large value, such as 128 or 256 (16MB per file, check disk space)

> > checkpoint_timeout = 30min

> > checkpoint_completion_target = 0.9

> > wal_level = minimal # You'll need to do a full base backup if you use this

> But, have same problem. It is almost 1 hour now, the restoration is still going on.  After every test case execution, we would like to refresh the database and expected refresh should be completed in less than 10 minutes. Is this achievable with the kind of configuration I have listed in my earlier email.


>  

> Kindly help , as how to speed up this restoration process.

> 
Try running pg_restore with the -1 option. If that doesn't help, try -m4 or something like that (you'll have to remove the first option then, can't use both at once) 
But it's going to be pushing it anyway. Your scenario is going to create thousands of files (assuming you have multiple tables in each of your schemas as is normal), and that's just not something ntfs does very fast. Once the files are there, I bet loading the data is reasonably fast since it can't be all that big.... 

/Magnus  		 	   		  =

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 10:11  Raghavendra <raghavendra.rao@enterprisedb.com>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  1 sibling, 0 replies; 67+ messages in thread

From: Raghavendra @ 2013-01-21 10:11 UTC (permalink / raw)
  To: bhanu udaya <udayabhanu1984@hotmail.com>; +Cc: Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

On Mon, Jan 21, 2013 at 3:01 PM, bhanu udaya <udayabhanu1984@hotmail.com>wrote:

> Hello,
> Greetings !
> I tried with all the below options. It approximatly takes 1 hour 30
> minutes for restoring a 9GB database.  This much time can not be affordable
> as the execution of test cases take only 10% of this whole time and waiting
> 1 hour 30 minutes after every test case execution is alot for the
> team.  Kindly let me know if we can reduce the database restoration time .
>
>
On linux, below settings work well using using -j option of pg_restore.
Since its windows, give another try with below option.(as already best
suggested in this email).

shared_buffers= 1024MB
work_mem= 512MB
maintenance_work_mem = 1GB
checkpoint_segments=(in between 128 - 256)
checkpoint_timeout=(default is 15mns make to 1h)
autovacuum=off
track_counts=off
fsync=off
full_page_writes=off
synchronous_commit=off
bgwriter_delay=(default 200ms, change to 50ms)

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/



>
> Thanks and Regards
> Radha Krishna
>
> ------------------------------
> Date: Mon, 21 Jan 2013 08:15:47 +0100
> Subject: Re: [GENERAL] pg_Restore
> From: magnus@hagander.net
> To: udayabhanu1984@hotmail.com
> CC: francois@teksol.info; pgsql-general@postgresql.org
>
>
>
> On Jan 21, 2013 7:17 AM, "bhanu udaya" <udayabhanu1984@hotmail.com> wrote:
> >
> >
> >  Hello,
> > Greetings !
> > Thank you for the prompt reply. I have changed the settings as listed
> below:
> > > > shared_buffers = 1024MB
> > > > work_mem = 512MB
> > > > maintenance_work_mem = 512MB
> > > > wal_buffers = 100MB
> > > fsync = off # ONLY DURING INITIAL DATA LOAD!
> > > checkpoint_segments = 128 # large value, such as 128 or 256 (16MB per
> file, check disk space)
> > > checkpoint_timeout = 30min
> > > checkpoint_completion_target = 0.9
> > > wal_level = minimal # You'll need to do a full base backup if you use
> this
> > But, have same problem. It is almost 1 hour now, the restoration is
> still going on.  After every test case execution, we would like to refresh
> the database and expected refresh should be completed in less than 10
> minutes. Is this achievable with the kind of configuration I have listed in
> my earlier email.
> >
> > Kindly help , as how to speed up this restoration process.
> >
>
> Try running pg_restore with the -1 option. If that doesn't help, try -m4
> or something like that (you'll have to remove the first option then, can't
> use both at once)
>
> But it's going to be pushing it anyway. Your scenario is going to create
> thousands of files (assuming you have multiple tables in each of your
> schemas as is normal), and that's just not something ntfs does very fast.
> Once the files are there, I bet loading the data is reasonably fast since
> it can't be all that big....
>
> /Magnus
>

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 11:39  Albe Laurenz <laurenz.albe@wien.gv.at>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  1 sibling, 2 replies; 67+ messages in thread

From: Albe Laurenz @ 2013-01-21 11:39 UTC (permalink / raw)
  To: bhanu udaya *EXTERN* <udayabhanu1984@hotmail.com>; Magnus Hagander <magnus@hagander.net>; +Cc: François Beausoleil <francois@teksol.info>; pgsql-general

bhanu udaya wrote:
> I tried with all the below options. It approximatly takes 1 hour 30 minutes for restoring a 9GB
> database.  This much time can not be affordable as the execution of test cases take only 10% of this
> whole time and waiting 1 hour 30 minutes after every test case execution is alot for the team.  Kindly
> let me know if we can reduce the database restoration time .

I don't know if that helps, but have you tried creating a template database
and doing DROP DATABASE xxx; CREATE DATABASE xxx TEMPLATE mytemplate;
instead of restoring a dump every time?

Maybe that is faster.

Yours,
Laurenz Albe


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 12:15  dinesh kumar <dineshkumar02@gmail.com>
  parent: Albe Laurenz <laurenz.albe@wien.gv.at>
  1 sibling, 0 replies; 67+ messages in thread

From: dinesh kumar @ 2013-01-21 12:15 UTC (permalink / raw)
  To: bhanu udaya *EXTERN* <udayabhanu1984@hotmail.com>; +Cc: Albe Laurenz <laurenz.albe@wien.gv.at>; Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

Hi Bhanu,

Yes, below is the faster approach to follow.

I don't know if that helps, but have you tried creating a template database
> and doing DROP DATABASE xxx; CREATE DATABASE xxx TEMPLATE mytemplate;
> instead of restoring a dump every time?
>
> Maybe that is faster.
>
>
If you are trying to take the dump from one cluster and restoring it in
another cluster, then make sure your pg_restore use parallel option "-j"
and also follow the parameters what Raghav said and tune WAL_BUFFERS to
some 32 to 64 MB value. And also if possible, keep your dump file into
another partition than the PGDATA which can improve the I/O balance.

Thanks.

Best Regards,
Dinesh
manojadinesh.blogspot.com

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 12:16  Chris Travers <chris.travers@gmail.com>
  parent: Albe Laurenz <laurenz.albe@wien.gv.at>
  1 sibling, 1 reply; 67+ messages in thread

From: Chris Travers @ 2013-01-21 12:16 UTC (permalink / raw)
  To: Albe Laurenz <laurenz.albe@wien.gv.at>; +Cc: bhanu udaya *EXTERN* <udayabhanu1984@hotmail.com>; Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

On Mon, Jan 21, 2013 at 3:39 AM, Albe Laurenz <laurenz.albe@wien.gv.at>wrote:

> bhanu udaya wrote:
> > I tried with all the below options. It approximatly takes 1 hour 30
> minutes for restoring a 9GB
> > database.  This much time can not be affordable as the execution of test
> cases take only 10% of this
> > whole time and waiting 1 hour 30 minutes after every test case execution
> is alot for the team.  Kindly
> > let me know if we can reduce the database restoration time .
>
> I don't know if that helps, but have you tried creating a template database
> and doing DROP DATABASE xxx; CREATE DATABASE xxx TEMPLATE mytemplate;
> instead of restoring a dump every time?
>

Also for test cases, my preferred way is to put every test case in a
transaction that cannot commit.  This way the tests are safe to run on
production environments.  See pgTAP for one possibility here if you are
testing stored procedures.  (Application code we run through wrappers that
filter out commits.)

But also the template approach is a good one fi you cannot guarantee that
the tests always role back.

Best Wishes,
Chris Travers

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 14:19  Chris Ernst <cernst@zvelo.com>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  1 sibling, 0 replies; 67+ messages in thread

From: Chris Ernst @ 2013-01-21 14:19 UTC (permalink / raw)
  To: pgsql-general; udayabhanu1984@hotmail.com

On 01/20/2013 11:17 PM, bhanu udaya wrote:
> I am trying to restore 9.5G database (1GB dumpfile) which has 500
> schemas with 1 lakh rows in each schema. Could take the data dump using
> pg_dump and it takes around 40 minutes. I tried to use pg_restore to
> restore this dump, but it takes hours to restore the dump. I have used
> the configurations parameters as
....
> But, have same problem. It is almost 1 hour now, the restoration is
> still going on.  After every test case execution, we would like to
> refresh the database and expected refresh should be completed in less
> than 10 minutes. Is this achievable with the kind of configuration I
> have listed in my earlier email.

Probably not what you want to hear, but I think This is a completely
unrealistic expectation.  If it takes 40 minutes for pg_dump, I would
expect pg_restore to take at least as long and likely significantly
longer (assuming both are done on similar hardware).

pg_dump only has to read the schema(s) and data and write them to a
file.  pg_restore has to read write the schema and  data into a new
database *AND* re-create all of the indexes, analyze, check referential
integrity......

So if the dump is taking 40 minutes, I would expect the restore to take
somewhere in the 60-90 minute range, depending on the number of and
complexity of the indexing.

	- Chris


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 15:10  bhanu udaya <udayabhanu1984@hotmail.com>
  parent: Chris Travers <chris.travers@gmail.com>
  0 siblings, 3 replies; 67+ messages in thread

From: bhanu udaya @ 2013-01-21 15:10 UTC (permalink / raw)
  To: Chris Travers <chris.travers@gmail.com>; Albe Laurenz <laurenz.albe@wien.gv.at>; +Cc: Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

Hello,Thanks alot for all your replies. I tried all settings suggested, it did not work. pg_restore is very slow. It does not come out less than 1 1/2 hour. Can you please let me know the procedure for Template. Will it restore the data also . Please update. I need the database (metadata + data) to be restored back after certain Java executions.  Ex:- I have 9.5 gb database (with 500 schemas + data). This is treated as base database and it needs to be restored every time after certain transactions. Thanks for your reply. Thanks and REgardsRadha Krishna
 Date: Mon, 21 Jan 2013 04:16:19 -0800
Subject: Re: [GENERAL] pg_Restore
From: chris.travers@gmail.com
To: laurenz.albe@wien.gv.at
CC: udayabhanu1984@hotmail.com; magnus@hagander.net; francois@teksol.info; pgsql-general@postgresql.org



On Mon, Jan 21, 2013 at 3:39 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:

bhanu udaya wrote:

> I tried with all the below options. It approximatly takes 1 hour 30 minutes for restoring a 9GB

> database.  This much time can not be affordable as the execution of test cases take only 10% of this

> whole time and waiting 1 hour 30 minutes after every test case execution is alot for the team.  Kindly

> let me know if we can reduce the database restoration time .



I don't know if that helps, but have you tried creating a template database

and doing DROP DATABASE xxx; CREATE DATABASE xxx TEMPLATE mytemplate;

instead of restoring a dump every time?

Also for test cases, my preferred way is to put every test case in a transaction that cannot commit.  This way the tests are safe to run on production environments.  See pgTAP for one possibility here if you are testing stored procedures.  (Application code we run through wrappers that filter out commits.) 

But also the template approach is a good one fi you cannot guarantee that the tests always role back.
Best Wishes,Chris Travers 		 	   		  =

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 15:19  Albe Laurenz <laurenz.albe@wien.gv.at>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  2 siblings, 1 reply; 67+ messages in thread

From: Albe Laurenz @ 2013-01-21 15:19 UTC (permalink / raw)
  To: bhanu udaya *EXTERN* <udayabhanu1984@hotmail.com>; Chris Travers <chris.travers@gmail.com>; +Cc: Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

bhanu udaya wrote:
> Can you please let me know the procedure for Template. Will it restore the data also
> .

It will create a complete copy of an existing database

The procedure is
CREATE DATABASE newdb TEMPLATE olddb;

Nobody may be connected to olddb for this to work.

Yours,
Laurenz Albe


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 15:22  Alban Hertroys <haramrae@gmail.com>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  2 siblings, 0 replies; 67+ messages in thread

From: Alban Hertroys @ 2013-01-21 15:22 UTC (permalink / raw)
  To: bhanu udaya <udayabhanu1984@hotmail.com>; +Cc: Chris Travers <chris.travers@gmail.com>; Albe Laurenz <laurenz.albe@wien.gv.at>; Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

On 21 January 2013 16:10, bhanu udaya <udayabhanu1984@hotmail.com> wrote:

> Can you please let me know the procedure for Template.
>

As they say, Google is your friend.

The basic principle is this: You create a read-only (template) version of
your sample database and use that as a template for the creation of new
ones. Of course, now you have another copy of the database stored, which
takes up another 9.5GB of disk space, but that's not much on modern systems
(oh wait, Windows & 4GB memory?...)

pg_dump would probably be quite a lot faster on a less limited system -
databases like memory and fast raid arrays for disks.

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 16:10  Alan Hodgson <ahodgson@simkin.ca>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  2 siblings, 0 replies; 67+ messages in thread

From: Alan Hodgson @ 2013-01-21 16:10 UTC (permalink / raw)
  To: pgsql-general

On Monday, January 21, 2013 08:40:05 PM bhanu udaya wrote:
> Hello,Thanks alot for all your replies. I tried all settings suggested, it
> did not work. pg_restore is very slow. It does not come out less than 1 1/2
> hour. Can you please let me know the procedure for Template. Will it
> restore the data also . Please update. I need the database (metadata +
> data) to be restored back after certain Java executions.  Ex:- I have 9.5
> gb database (with 500 schemas + data). This is treated as base database and
> it needs to be restored every time after certain transactions. 

Don't use pg_restore, do the backups/restorations outside of PostgreSQL:

- run on a server with a snapshot-capable volume manager, use that for quick 
restores 
- just try using rsync from a backup copy of the base data directory 

(either of the above require PostgreSQL to not be running during the 
restorations)



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 16:15  bhanu udaya <udayabhanu1984@hotmail.com>
  parent: Albe Laurenz <laurenz.albe@wien.gv.at>
  0 siblings, 1 reply; 67+ messages in thread

From: bhanu udaya @ 2013-01-21 16:15 UTC (permalink / raw)
  To: Albe Laurenz <laurenz.albe@wien.gv.at>; Chris Travers <chris.travers@gmail.com>; +Cc: Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

Hello,Thanks all for the great help. Template is very good option so far seen. It comes little quickly than pg_restore. But, this also takes 40 minutes time. I am using Windows with 4GB Ram.   Thanks and RegardsRadha Krishna
 > From: laurenz.albe@wien.gv.at
> To: udayabhanu1984@hotmail.com; chris.travers@gmail.com
> CC: magnus@hagander.net; francois@teksol.info; pgsql-general@postgresql.org
> Subject: RE: [GENERAL] pg_Restore
> Date: Mon, 21 Jan 2013 15:19:45 +0000
> 
> bhanu udaya wrote:
> > Can you please let me know the procedure for Template. Will it restore the data also
> > .
> 
> It will create a complete copy of an existing database
> 
> The procedure is
> CREATE DATABASE newdb TEMPLATE olddb;
> 
> Nobody may be connected to olddb for this to work.
> 
> Yours,
> Laurenz Albe
 		 	   		  =

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 16:46  bhanu udaya <udayabhanu1984@hotmail.com>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  0 siblings, 2 replies; 67+ messages in thread

From: bhanu udaya @ 2013-01-21 16:46 UTC (permalink / raw)
  To: Albe Laurenz <laurenz.albe@wien.gv.at>; Chris Travers <chris.travers@gmail.com>; +Cc: Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

Hello All,
 Can we achieve this template or pg_Restore in less than 20 minutes time. Any more considerations. Kindly reply. Thanks and RegardsRadha Krishna From: udayabhanu1984@hotmail.com
To: laurenz.albe@wien.gv.at; chris.travers@gmail.com
CC: magnus@hagander.net; francois@teksol.info; pgsql-general@postgresql.org
Subject: RE: [GENERAL] pg_Restore
Date: Mon, 21 Jan 2013 21:45:32 +0530




Hello,
Thanks all for the great help. Template is very good option so far seen. It comes little quickly than pg_restore. But, this also takes 40 minutes time.
 
I am using Windows with 4GB Ram.  
 
Thanks and Regards
Radha Krishna
 
> From: laurenz.albe@wien.gv.at
> To: udayabhanu1984@hotmail.com; chris.travers@gmail.com
> CC: magnus@hagander.net; francois@teksol.info; pgsql-general@postgresql.org
> Subject: RE: [GENERAL] pg_Restore
> Date: Mon, 21 Jan 2013 15:19:45 +0000
> 
> bhanu udaya wrote:
> > Can you please let me know the procedure for Template. Will it restore the data also
> > .
> 
> It will create a complete copy of an existing database
> 
> The procedure is
> CREATE DATABASE newdb TEMPLATE olddb;
> 
> Nobody may be connected to olddb for this to work.
> 
> Yours,
> Laurenz Albe
 		 	   		   		 	   		  =

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 17:17  Adrian Klaver <adrian.klaver@gmail.com>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  1 sibling, 0 replies; 67+ messages in thread

From: Adrian Klaver @ 2013-01-21 17:17 UTC (permalink / raw)
  To: bhanu udaya <udayabhanu1984@hotmail.com>; +Cc: Albe Laurenz <laurenz.albe@wien.gv.at>; Chris Travers <chris.travers@gmail.com>; Magnus Hagander <magnus@hagander.net>; François Beausoleil <francois@teksol.info>; pgsql-general

On 01/21/2013 08:46 AM, bhanu udaya wrote:
> Hello All,
>
> Can we achieve this template or pg_Restore in less than 20 minutes time.
> Any more considerations. Kindly reply.

Seems to me this is where Point in Time Recovery(PITR) might be helpful.

http://www.postgresql.org/docs/9.2/static/continuous-archiving.html

> Thanks and Regards



-- 
Adrian Klaver
adrian.klaver@gmail.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-21 21:28  Kevin Grittner <kgrittn@mail.com>
  0 siblings, 0 replies; 67+ messages in thread

From: Kevin Grittner @ 2013-01-21 21:28 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@gmail.com>; bhanu udaya <udayabhanu1984@hotmail.com>; +Cc: Albe Laurenz <laurenz.albe@wien.gv.at>; Chris Travers <chris.travers@gmail.com>; Magnus Hagander <magnus@hagander.net>; "François Beausoleil" <francois@teksol.info>; pgsql-general

Adrian Klaver wrote:
> On 01/21/2013 08:46 AM, bhanu udaya wrote:

>> Can we achieve this template or pg_Restore in less than 20
>> minutes time.

> Seems to me this is where Point in Time Recovery(PITR) might be
> helpful.

Maybe, if the source is on a different set of drives, to reduce
contention for storage and head movement. Either way it is down to
just a straight file copy, so it is the speed of your disk system
that is the limiting factor, not anything within PostgreSQL.

The more sure way of speeding it up is to add more spindles to your
drive array and make sure you are using a good RAID controller with
battery-backed cache.

-Kevin


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-30 11:39  Eduardo Morras <emorrasg@yahoo.es>
  parent: bhanu udaya <udayabhanu1984@hotmail.com>
  1 sibling, 1 reply; 67+ messages in thread

From: Eduardo Morras @ 2013-01-30 11:39 UTC (permalink / raw)
  To: pgsql-general

On Mon, 21 Jan 2013 22:16:00 +0530
bhanu udaya <udayabhanu1984@hotmail.com> wrote:

> Hello All,
>  Can we achieve this template or pg_Restore in less than 20 minutes time. Any more considerations. Kindly reply. Thanks and RegardsRadha Krishna From: udayabhanu1984@hotmail.com

Perhaps you can use the ntfs snapshot feature. 

a) Create the db with the data you want
b) Shutdown PostgreSql completly
c) Go to data folder, properties, make a recover point
d) Start PostgreSql
f) Work with it
g) Stop PostgreSql
h) Go to data folder, properties, recover the previous version
i) Go to d)

Don't know exactly the name of the ntfs property, if i remember well it's recover point, but haven't used Windows for a while.

Perhaps other folders should be set to recover.

It's easy with this "feature" shoot your own feet (yes, in plural). If something wrong happens recover from the dump.

HTH


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-30 13:12  C. Bensend <benny@bennyvision.com>
  parent: Eduardo Morras <emorrasg@yahoo.es>
  0 siblings, 1 reply; 67+ messages in thread

From: C. Bensend @ 2013-01-30 13:12 UTC (permalink / raw)
  To: pgsql-general


> Don't know exactly the name of the ntfs property, if i remember well it's
> recover point, but haven't used Windows for a while.

I think you're talking about shadow copies.  :)

Benny


-- 
"The very existence of flamethrowers proves that sometime, somewhere,
someone said to themselves, 'You know, I want to set those people
over there on fire, but I'm just not close enough to get the job
done.'"                          -- George Carlin



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: pg_Restore
@ 2013-01-30 17:18  John R Pierce <pierce@hogranch.com>
  parent: C. Bensend <benny@bennyvision.com>
  0 siblings, 0 replies; 67+ messages in thread

From: John R Pierce @ 2013-01-30 17:18 UTC (permalink / raw)
  To: pgsql-general

On 1/30/2013 5:12 AM, C. Bensend wrote:
>> >Don't know exactly the name of the ntfs property, if i remember well it's
>> >recover point, but haven't used Windows for a while.
> I think you're talking about shadow copies.


the UI and usability of NTFS shadow copies is quite frustrating. you can 
create them, but you can't actually access them, they are only available 
to software like backup programs that know how to use them.

-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Pg_restore
@ 2019-03-01 08:17  Nicola Contu <nicola.contu@gmail.com>
  0 siblings, 2 replies; 67+ messages in thread

From: Nicola Contu @ 2019-03-01 08:17 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org; +Cc: Alessandro Aste <Alessandro.aste@gtt.net>

Hello,
we are trying to move our postgres 10.5 instance to 11.2

We are trying to restore a DB in a pre-production env but we get an error
on the pg_restore command

[root@STAGING]#  /usr/local/pgsql11.2/bin/pg_restore -v -U postgres -L
/data/cofinder_restore.lst  -d cofinder  -j 16
/home/ncontu/data/dbbackups/C
pg_restore: connecting to database for restore
pg_restore: processing item 3098 ENCODING ENCODING
pg_restore: processing item 3099 STDSTRINGS STDSTRINGS
pg_restore: processing item 3100 SEARCHPATH SEARCHPATH
pg_restore: processing item 3101 DATABASE cofinder
pg_restore: processing item 3 SCHEMA public
pg_restore: creating SCHEMA "public"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3; 2615 2200 SCHEMA public
postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  schema
"public" already exists
    Command was: CREATE SCHEMA public;

The dump is taken with pgsql10 binaries.

Can you help on this please?
We also have another DB, but with the other one no issues doing the same
thing.

Thanks

^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: Pg_restore
@ 2019-03-01 08:38  Ron <ronljohnsonjr@gmail.com>
  parent: Nicola Contu <nicola.contu@gmail.com>
  1 sibling, 0 replies; 67+ messages in thread

From: Ron @ 2019-03-01 08:38 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 3/1/19 2:17 AM, Nicola Contu wrote:
> Hello,
> we are trying to move our postgres 10.5 instance to 11.2
>
> We are trying to restore a DB in a pre-production env but we get an error 
> on the pg_restore command
>
> [root@STAGING]#  /usr/local/pgsql11.2/bin/pg_restore -v -U postgres -L 
> /data/cofinder_restore.lst  -d cofinder  -j 16  /home/ncontu/data/dbbackups/C
> pg_restore: connecting to database for restore
> pg_restore: processing item 3098 ENCODING ENCODING
> pg_restore: processing item 3099 STDSTRINGS STDSTRINGS
> pg_restore: processing item 3100 SEARCHPATH SEARCHPATH
> pg_restore: processing item 3101 DATABASE cofinder
> pg_restore: processing item 3 SCHEMA public
> pg_restore: creating SCHEMA "public"
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 3; 2615 2200 SCHEMA 
> public postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  schema 
> "public" already exists
>     Command was: CREATE SCHEMA public;
>
> The dump is taken with pgsql10 binaries.
>
> Can you help on this please?
> We also have another DB, but with the other one no issues doing the same 
> thing.

Out of curiosity, why are you using the "-L" option instead of restoring the 
whole database?

-- 
Angular momentum makes the world go 'round.




^ permalink  raw  reply  [nested|flat] 67+ messages in thread

* Re: Pg_restore
@ 2019-03-01 08:45  Nicola Contu <nicola.contu@gmail.com>
  parent: Nicola Contu <nicola.contu@gmail.com>
  1 sibling, 0 replies; 67+ messages in thread

From: Nicola Contu @ 2019-03-01 08:45 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org; +Cc: Alessandro Aste <Alessandro.aste@gtt.net>

I guess it depends on this
https://www.postgresql.org/message-id/15466-0b90383ff69c6e4b%40postgresql.org

Thanks

Il giorno ven 1 mar 2019 alle ore 09:17 Nicola Contu <nicola.contu@gmail.com>
ha scritto:

> Hello,
> we are trying to move our postgres 10.5 instance to 11.2
>
> We are trying to restore a DB in a pre-production env but we get an error
> on the pg_restore command
>
> [root@STAGING]#  /usr/local/pgsql11.2/bin/pg_restore -v -U postgres -L
> /data/cofinder_restore.lst  -d cofinder  -j 16
> /home/ncontu/data/dbbackups/C
> pg_restore: connecting to database for restore
> pg_restore: processing item 3098 ENCODING ENCODING
> pg_restore: processing item 3099 STDSTRINGS STDSTRINGS
> pg_restore: processing item 3100 SEARCHPATH SEARCHPATH
> pg_restore: processing item 3101 DATABASE cofinder
> pg_restore: processing item 3 SCHEMA public
> pg_restore: creating SCHEMA "public"
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 3; 2615 2200 SCHEMA
> public postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  schema
> "public" already exists
>     Command was: CREATE SCHEMA public;
>
> The dump is taken with pgsql10 binaries.
>
> Can you help on this please?
> We also have another DB, but with the other one no issues doing the same
> thing.
>
> Thanks
>
>
>

^ permalink  raw  reply  [nested|flat] 67+ messages in thread


end of thread, other threads:[~2019-03-01 08:45 UTC | newest]

Thread overview: 67+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05 17:39 pg_restore lluong@home.com
2001-11-08 00:25 ` Peter Eisentraut <peter_e@gmx.net>
2001-11-08 01:27   ` Tom Lane <tgl@sss.pgh.pa.us>
2005-01-17 20:04 pg_restore Cesar Schneider <cesar@hzta.com.br>
2005-01-17 20:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-01-19 19:42   ` Niederland <niederland@gmail.com>
2005-01-23 01:00     ` Tom Lane <tgl@sss.pgh.pa.us>
2005-01-23 16:08       ` Bruce Momjian <pgman@candle.pha.pa.us>
2005-01-24 06:14       ` Niederland <niederland@gmail.com>
2005-01-20 05:00   ` Cesar Schneider <cesar@hzta.com.br>
2005-01-20 08:19     ` Niederland <niederland@gmail.com>
2005-04-05 06:40 pg_restore Nageshwar Rao <NageshwarR@PLANETASIA.COM>
2005-04-05 14:05 ` Sven Willenberger <sven@dmv.com>
2007-10-28 18:32 pg_restore Bob Pawley <rjpawley@shaw.ca>
2007-10-28 18:45 ` Adrian Klaver <aklaver@comcast.net>
2007-10-28 21:13   ` Bob Pawley <rjpawley@shaw.ca>
2007-10-28 21:26     ` Adrian Klaver <aklaver@comcast.net>
2007-10-28 21:28     ` Tom Lane <tgl@sss.pgh.pa.us>
2007-10-28 21:38       ` Adrian Klaver <aklaver@comcast.net>
2007-10-28 22:01       ` Bob Pawley <rjpawley@shaw.ca>
2007-10-28 22:15         ` Adrian Klaver <aklaver@comcast.net>
2007-10-28 22:40           ` Bob Pawley <rjpawley@shaw.ca>
2007-10-28 22:58             ` Adrian Klaver <aklaver@comcast.net>
2007-10-29 16:50               ` Bob Pawley <rjpawley@shaw.ca>
2007-10-29 17:04                 ` Douglas McNaught <doug@mcnaught.org>
2007-10-28 23:12             ` Raymond O'Donnell <rod@iol.ie>
2007-10-28 22:18         ` Tom Lane <tgl@sss.pgh.pa.us>
2007-10-28 23:19           ` Thomas Kellerer <spam_eater@gmx.net>
2007-10-28 23:55             ` Tom Lane <tgl@sss.pgh.pa.us>
2007-10-29 18:34               ` Thomas Kellerer <spam_eater@gmx.net>
2007-10-29 04:13           ` Joshua D. Drake <jd@commandprompt.com>
2011-03-30 20:56 pg_restore Mike Orr <sluggoster@gmail.com>
2011-03-30 21:36 ` John R Pierce <pierce@hogranch.com>
2011-03-30 23:08   ` Mike Orr <sluggoster@gmail.com>
2011-03-30 23:14     ` John R Pierce <pierce@hogranch.com>
2011-03-30 23:17     ` Joshua D. Drake <jd@commandprompt.com>
2011-04-01 02:00     ` Marco Colombo <pgsql@esiway.net>
2011-03-30 21:55 ` Scott Marlowe <scott.marlowe@gmail.com>
2011-04-01 21:39 ` Merlin Moncure <mmoncure@gmail.com>
2011-04-12 21:09   ` Mike Orr <sluggoster@gmail.com>
2011-05-31 20:42 PG_RESTORE salah jubeh <s_jubeh@yahoo.com>
2013-01-20 18:33 pg_Restore bhanu udaya <udayabhanu1984@hotmail.com>
2013-01-20 21:42 ` Re: pg_Restore Guillaume Lelarge <guillaume@lelarge.info>
2013-01-21 04:10 ` Re: pg_Restore bhanu udaya <udayabhanu1984@hotmail.com>
2013-01-21 04:19   ` Re: pg_Restore François Beausoleil <francois@teksol.info>
2013-01-21 06:17     ` Re: pg_Restore bhanu udaya <udayabhanu1984@hotmail.com>
2013-01-21 07:15       ` Re: pg_Restore Magnus Hagander <magnus@hagander.net>
2013-01-21 09:31         ` Re: pg_Restore bhanu udaya <udayabhanu1984@hotmail.com>
2013-01-21 10:11           ` Re: pg_Restore Raghavendra <raghavendra.rao@enterprisedb.com>
2013-01-21 11:39           ` Re: pg_Restore Albe Laurenz <laurenz.albe@wien.gv.at>
2013-01-21 12:15             ` Re: pg_Restore dinesh kumar <dineshkumar02@gmail.com>
2013-01-21 12:16             ` Re: pg_Restore Chris Travers <chris.travers@gmail.com>
2013-01-21 15:10               ` Re: pg_Restore bhanu udaya <udayabhanu1984@hotmail.com>
2013-01-21 15:19                 ` Re: pg_Restore Albe Laurenz <laurenz.albe@wien.gv.at>
2013-01-21 16:15                   ` Re: pg_Restore bhanu udaya <udayabhanu1984@hotmail.com>
2013-01-21 16:46                     ` Re: pg_Restore bhanu udaya <udayabhanu1984@hotmail.com>
2013-01-21 17:17                       ` Re: pg_Restore Adrian Klaver <adrian.klaver@gmail.com>
2013-01-30 11:39                       ` Re: pg_Restore Eduardo Morras <emorrasg@yahoo.es>
2013-01-30 13:12                         ` Re: pg_Restore C. Bensend <benny@bennyvision.com>
2013-01-30 17:18                           ` Re: pg_Restore John R Pierce <pierce@hogranch.com>
2013-01-21 15:22                 ` Re: pg_Restore Alban Hertroys <haramrae@gmail.com>
2013-01-21 16:10                 ` Re: pg_Restore Alan Hodgson <ahodgson@simkin.ca>
2013-01-21 14:19       ` Re: pg_Restore Chris Ernst <cernst@zvelo.com>
2013-01-21 21:28 Re: pg_Restore Kevin Grittner <kgrittn@mail.com>
2019-03-01 08:17 Pg_restore Nicola Contu <nicola.contu@gmail.com>
2019-03-01 08:38 ` Re: Pg_restore Ron <ronljohnsonjr@gmail.com>
2019-03-01 08:45 ` Re: Pg_restore Nicola Contu <nicola.contu@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox