Re: [SQL] pg_restore problem

2012-09-14 Thread Adrian Klaver
On 09/14/2012 01:58 AM, Kjell Øygard wrote: 1 - Ok, I was not aware of that 2 - I used version 9.1.4 of pg_dump 3 - The command was in a script, se below pdir=/usr/local/postgresql-9.1.4/ bdir=/backup/`hostname -s`/dump/ export PATH=${pdir}/bin:$PATH # make sure tmp files are not readable

Re: [SQL] pg_restore problem

2012-09-13 Thread Adrian Klaver
On 09/12/2012 12:23 AM, Kjell Øygard wrote: Morning guys... I have two servers , one with postgres 9.2rc1 and one with postgres 9.1.4. I need to do a restore from a dump from 9.1.4 to 9.2rc1 and I get this error: pg_restore: [archiver (db)] Error from TOC entry 177675; 2613 579519 BLOB 579519 p

[SQL] pg_restore problem

2012-09-12 Thread Kjell Øygard
Morning guys... I have two servers , one with postgres 9.2rc1 and one with postgres 9.1.4. I need to do a restore from a dump from 9.1.4 to 9.2rc1 and I get this error: pg_restore: [archiver (db)] Error from TOC entry 177675; 2613 579519 BLOB 579519 primar pg_restore: [archiver (db)] could not ex

Re: [SQL] pg_restore followed by immediate VACUUM ANALYZE

2009-11-30 Thread Tom Lane
Bryce Nesbitt writes: >> Correct. Autovacuum might fix them eventually, but usually it's >> worth forcing the issue once you've completed your data loading. >> (This might involve multiple steps, which is why pg_restore >> doesn't try to force it for you.) > Hmm.  It seems like pg_restore would

Re: [SQL] pg_restore followed by immediate VACUUM ANALYZE

2009-11-30 Thread Bryce Nesbitt
Tom Lane wrote: Does pg_restore not update the query planner statistics? Correct. Autovacuum might fix them eventually, but usually it's worth forcing the issue once you've completed your data loading. (This might involve multiple steps, which is why pg_restore doesn't try t

Re: [SQL] pg_restore followed by immediate VACUUM ANALYZE

2009-11-30 Thread Tom Lane
Bryce Nesbitt writes: > I looking at a script that does a pg_restore followed by an immediate > VACUUM ANALYZE (postgres 8.3). That's standard. > Does pg_restore not update the query planner statistics? Correct. Autovacuum might fix them eventually, but usually it's worth forcing the issue on

[SQL] pg_restore followed by immediate VACUUM ANALYZE

2009-11-30 Thread Bryce Nesbitt
I looking at a script that does a pg_restore followed by an immediate VACUUM ANALYZE (postgres 8.3). I'm told that without the VACUUM ANALYZE the database will run slow. Does this ring true? Does pg_restore not update the query planner statistics? -- Sent via pgsql-sql mailing list (pgsql-sq

Re: [SQL] pg_restore "WARNING: errors ignored on restore"

2009-10-29 Thread Gerardo Herzig
Bryce Nesbitt wrote: > So when restoring a particular DB with pg_restore, I get "WARNING: > errors ignore on restore". Is there a way to dump a list of those errors? > > > # /usr/local/bin/pg_restore8.3 -d SUP-3067 -h 192.168.1.93 -p 5433 -U > postgres -L toc_with_parts_commented_out.txt -v pr

Re: [SQL] pg_restore "WARNING: errors ignored on restore"

2009-10-28 Thread Tom Lane
Bryce Nesbitt writes: > So when restoring a particular DB with pg_restore, I get "WARNING: > errors ignore on restore". Is there a way to dump a list of those errors? All such errors should have been reported on stderr already. I imagine the chatter from -v is distracting you ... try dropping t

[SQL] pg_restore "WARNING: errors ignored on restore"

2009-10-28 Thread Bryce Nesbitt
So when restoring a particular DB with pg_restore, I get "WARNING: errors ignore on restore". Is there a way to dump a list of those errors? # /usr/local/bin/pg_restore8.3 -d SUP-3067 -h 192.168.1.93 -p 5433 -U postgres -L toc_with_parts_commented_out.txt -v production_db.dump.20091016 ...

Re: [SQL] Pg_Restore with --clean option

2009-09-30 Thread Scott Marlowe
On Wed, Sep 30, 2009 at 11:14 PM, Jyoti Seth wrote: > > I want to restore data of a single table. Before restoring the data I > disabled all the triggers and constraints on that table. I used the restore > command with --clean option so that data gets deleted from that table and > then fresh data

Re: [SQL] Pg_Restore with --clean option

2009-09-30 Thread Peter Eisentraut
On Wed, 2009-09-30 at 22:14 -0700, Jyoti Seth wrote: > I want to restore data of a single table. Before restoring the data I > disabled all the triggers and constraints on that table. I used the restore > command with --clean option so that data gets deleted from that table and > then fresh data ge

[SQL] Pg_Restore with --clean option

2009-09-30 Thread Jyoti Seth
I want to restore data of a single table. Before restoring the data I disabled all the triggers and constraints on that table. I used the restore command with --clean option so that data gets deleted from that table and then fresh data get inserted. But this is throwing error: duplicate key value

[SQL] pg_restore

2009-06-09 Thread Jyoti Seth
Hi all, I have two databases db1 and db2 with no network connection. I want to take backup of few master tables from db1 and restore it to db2 at frequent intervals.. I do not want to delete data from the tables and restores the fresh data as this data is getting referenced in other tables. I

[SQL] pg_restore error - Any Idea?

2009-03-22 Thread DM
Hi All, I am facing an error on executing the below command dump name: pg_dump_FcZ0.pnps_200903041201_1.2.1.0_base_testing databae name: pnqd_test $pg_restore -U postgres -p 5433 -d pnqd_test pg_dump_FcZ0.pnps_200903041201_1.2.1.0_base_testing pg_restore: [archiver (db)] Error while PROCESSING

Re: [SQL] pg_restore in java connection (auto_commit = false)

2008-09-11 Thread Emi Lu
> See: > http://www.postgresql.org/docs/8.3/interactive/explicit-locking.html > > where it says that ALTER TABLE obtains the ACCESS EXCLUSIVE lock. You > can confirm this by issuing the command of interest then running: > > SELECT * from pg_catalog.pg_locks; > > With that transaction still open,

Re: [SQL] pg_restore in java connection (auto_commit = false)

2008-09-10 Thread Craig Ringer
Emi Lu wrote: Good afternoon, I have a question about pg_restore in JAVA and need your help. I planed to do: == 1. pg_dump each tables (done successfully) 2. start a java connection auto_commit = false 3.for(Table1... ... TableN) { drop primary key pg_restore ta

[SQL] pg_restore in java connection (auto_commit = false)

2008-09-10 Thread Emi Lu
Good afternoon, I have a question about pg_restore in JAVA and need your help. I planed to do: == 1. pg_dump each tables (done successfully) 2. start a java connection auto_commit = false 3.for(Table1... ... TableN) { drop primary key pg_restore table (dead lock

[SQL] pg_restore problem -- MORE?!?

2005-02-03 Thread Bradley Miller
This is getting ridiculous . . . I dump from the database into another one (just for grins) on the same server to a different name and I don't even get all the info? My functions are coming through fine (finally) but now I've got missing tables and missing data. Could someone point me somewhere

Re: [SQL] pg_restore problem

2005-02-03 Thread Bradley Miller
Interestingly, I made a new database on my test server and then was able to do a pg_dump from my mac box to the test server and I think it got just about everything . . . I've got some constraint issues and other oddities happening, but at least my functions came in fine. I used the pipe command t

Re: [SQL] pg_restore problem

2005-02-03 Thread Richard Huxton
Bradley Miller wrote: So in the current version I'm running (7.4.6) and I do a pg_dump I have to then manually manipulate the order by doing a -l to get a table of contents and then reorder (just changing the first number; or the oid also??) just to get it to work right? Does anyone else have

Re: [SQL] pg_restore problem

2005-02-03 Thread Bradley Miller
So in the current version I'm running (7.4.6) and I do a pg_dump I have to then manually manipulate the order by doing a -l to get a table of contents and then reorder (just changing the first number; or the oid also??) just to get it to work right? Does anyone else have these issues? How exactl

Re: [SQL] pg_restore problem

2005-02-02 Thread Tom Lane
Bradley Miller <[EMAIL PROTECTED]> writes: > I'm attempting to restore a dump from one server to another (one is a > Mac and one is a Linux base, if that makes any difference). I keep > running into issues like this: > pg_restore: [archiver (db)] could not execute query: ERROR: function > pub

Re: [SQL] pg_restore problem

2005-02-02 Thread Joel Fradkin
MAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bradley Miller Sent: Wednesday, February 02, 2005 3:17 PM To: Postgres List Subject: [SQL] pg_restore problem   I'm attempting to restore a dump from one server to another (one is a Mac and one is a Linux base, if that makes any difference

[SQL] pg_restore problem

2005-02-02 Thread Bradley Miller
I'm attempting to restore a dump from one server to another (one is a Mac and one is a Linux base, if that makes any difference). I keep running into issues like this: pg_restore: [archiver (db)] could not execute query: ERROR: function public.random_page_link_id_gen() does not exist This is wh

Re: [SQL] pg_restore - don?t restore. Why?

2004-02-20 Thread Andrew Sullivan
On Fri, Feb 20, 2004 at 12:24:46AM -0300, 2000info wrote: > pg_dump, ok. > pg_restore, don?t restore. Why? If you didn't use a non-ASCII format from pg_dump, you don't need pg_restore. Just use psql. A -- Andrew Sullivan ---(end of broadcast)-

[SQL] pg_restore - don´t restore. Why?

2004-02-19 Thread 2000info
pg_dump, ok. pg_restore, don´t restore. Why?   Red Hat 9, Fedora, Conectiva 9 and Postgres 7.4.1 make my ambient use.   pg_restore -i -v -N -etc... return: Droping... error! Object does not exist...   OR Creating... error! Object exist with the same arguments...  

Re: [SQL] pg_restore cannot restore an index

2003-01-16 Thread Jie Liang
Sorry, it because I have another index with same indexname because pg_restore index fail. Thanks. Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 10:07 AM To: Jie Liang Cc: Tom Lane; [EMAIL PROTECTED] Subject: Re: [SQL

Re: [SQL] pg_restore cannot restore an index

2003-01-16 Thread Bruce Momjian
Yes, I remember this. The code in 7.3 looks OK to me. Can you show me a command line that fails for you? I just tried: $ pg_restore -I x asdf pg_restore: [archiver] could not open input file: No such file or directory so it looks like -I is working. ---

[SQL] pg_restore cannot restore an index

2003-01-16 Thread Jie Liang
Last July, I pointed out this problem when I use v7.2.1, I got the answer that will be resolved in v7.3, however, I am using v7.3.1, pg_restore.c seems have no change in this section. So it still doesn't work. Jie Liang Jie Liang wrote: > I read the pg_restore.c source code, I found: > #ifdef

[SQL] pg_restore vs. indexes

2002-07-24 Thread daq
Hi all! I try dump and restore my database, but i got some trouble with indexes. I dumped my database with pg_dump: pg_dump --format c --file=/home/postgres/bydump byenet After this i try to restore the db: pg_restore -c -d byprb /home/postgres/bydump pg_restore: [archiver (db)] could not execu

[SQL] pg_restore --flag

2002-07-15 Thread Jie Liang
I tried, I got same error msg. I even run as user postgres or myself, same same. My OS=FreeBSD4.3 DB=PostgreSQL7.2 Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 4:25 PM To: Jie Liang Cc: 'Jan Wieck'; '[EMAIL PROTECTED]'; '

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Bruce Momjian
Jie Liang wrote: > su postgres -c "/usr/local/pgsql/bin/pg_restore --table=mytable > --dbname=mydb mydumpfile" > error msg > pg_restore: [archiver] could not open input file: No such file or directory > > I run it on 7.2.0 OK, my guess is that the 'su' is moving you to another directory. Try sp

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Jie Liang
su postgres -c "/usr/local/pgsql/bin/pg_restore --table=mytable --dbname=mydb mydumpfile" error msg pg_restore: [archiver] could not open input file: No such file or directory I run it on 7.2.0 Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday, J

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Bruce Momjian
I just ran some tests in 7.2.1 and 7.3 and both worked fine. Can I see the exact error it generates? --- Jie Liang wrote: > Same problem, did you test: > pg_restore --index=aa --dbname=test /bjm/x > ?? > I didn't make

Re: [SQL] pg_restore cannot restore index

2002-07-15 Thread Jie Liang
Same problem, did you test: pg_restore --index=aa --dbname=test /bjm/x ?? I didn't make it work, I may miss someting. Thanks! Jie Liang -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 7:51 AM To: Jie Liang Cc: 'Jan Wieck'; '[EMAIL P

Re: [SQL] pg_restore cannot restore index

2002-07-13 Thread Bruce Momjian
Jie Liang wrote: > On this point, I'd like to ask: > 1. where I can download this new version? > 2. does > pg_restore --index=aa --dbname=test /bjm/x > works also??? OK, the attached patch should allow -I to work in 7.2.X. This will all be fixed in 7.3. > Because > pg_restore --table=mytable

Re: [SQL] pg_restore cannot restore index

2002-07-11 Thread Jie Liang
What parameter I should change in order to make postmaster taking CPU as much as possible? Maybe I should ask: how can I make big tables equijoin faster? I have a serveral tables that contain more 2.5 million records, I need to equijoin those tables often. Thanks! Jie Liang -

Re: [SQL] pg_restore cannot restore index

2002-07-11 Thread Jie Liang
; > {"file", 1, NULL, 'f'}, > > {"format", 1, NULL, 'F'}, > > {"function", 1, NULL, 'P'}, > > {"host", 1, NULL, 'h'}, > >

Re: [SQL] pg_restore cannot restore index

2002-07-10 Thread Bruce Momjian
> {"host", 1, NULL, 'h'}, > > {"ignore-version", 0, NULL, 'i'}, > > {"index", 1, NULL, 'I'}, > > So, -i may be mapped wrong, however, -I is illegal option. > > > &

Re: [SQL] pg_restore cannot restore index

2002-07-10 Thread Jie Liang
'P'}, > {"host", 1, NULL, 'h'}, > {"ignore-version", 0, NULL, 'i'}, > {"index", 1, NULL, 'I'}, > So, -i may be mapped wrong, however, -I is illegal option. > >

Re: [SQL] pg_restore cannot restore index

2002-07-09 Thread Bruce Momjian
estore a function: > pg_restore -P myfunction -d mydb2 dbf > won't work, and you need to use: > pg_restore -P "\"myfunction\" (args and type)" -d mydb2 dbf > to make it work! > > > I believe that the man page of pg_restore should be improved. > >

Re: [SQL] pg_restore cannot restore index

2002-07-09 Thread Jie Liang
Another possible bug: pg_restore -i "\"indexname\"" -d mydb mydumpfile msg: pg_restore: connecting to database for restore pg_restore: creating FUNCTION "plpgsql_call_handler" () pg_restore: [archiver (db)] could not execute query: ERROR: function plpgsql_call_handler already exists with same

[SQL] pg_restore cannot restore index

2002-07-09 Thread Jie Liang
t;, 1, NULL, 'P'}, {"host", 1, NULL, 'h'}, {"ignore-version", 0, NULL, 'i'}, {"index", 1, NULL, 'I'}, So, -i may be mapped wrong, however, -I is illegal option. Thanks! Jie Liang

Re: [SQL] pg_restore cannot restore function

2002-07-03 Thread Jie Liang
work! I believe that the man page of pg_restore should be improved. Thanks. Jie Liang -Original Message- From: Jan Wieck [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 11:14 AM To: Jie Liang Cc: 'Bruce Momjian'; '[EMAIL PROTECTED]'; '[EMAIL PROTE

Re: [SQL] pg_restore cannot restore function

2002-07-03 Thread Jie Liang
02 12:52 AM To: Jie Liang Cc: 'Jan Wieck'; 'Bruce Momjian'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: Re: [SQL] pg_restore cannot restore function In the case that you moved your backup to another system where possibly the shared library (.so)

Re: [SQL] pg_restore cannot restore function

2002-07-03 Thread Achilleus Mantzios
In the case that you moved your backup to another system where possibly the shared library (.so) where the function exists is on a different location then thats the problem, in which case you only need to recreate the function (with the same isstrict,iscachable attributes). -- Achilleus Mantzio

Re: [SQL] pg_restore cannot restore function

2002-07-02 Thread Jie Liang
Wieck [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 11:14 AM To: Jie Liang Cc: 'Bruce Momjian'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: Re: [SQL] pg_restore cannot restore function Jie Liang wrote: > > Oops,my OS is FreeBSD4.3 PostgreSQL7.2

Re: [SQL] pg_restore cannot restore function

2002-07-01 Thread Jan Wieck
Sent: Friday, June 28, 2002 1:46 PM > To: 'Jan Wieck' > Cc: 'Bruce Momjian'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' > Subject: RE: [SQL] pg_restore cannot restore function > > No any error msg in the logfile, I didn't see any create funct

[SQL] pg_restore cannot restore function

2002-06-26 Thread Jie Liang
I use pg_dump -Fc mydb > dbf then I create anpther db by: createdb mydb2 I use pg_restore -P myfunction -d mydb2 dbf cannot restore myfunction into mydb2 why?? Jie Liang ---(end of broadcast)--- TIP 3: if posting/reading through Usenet,