This is a discussion on Re: pg_dump, pg_restore, insert vs copy within the pgsql Admins forums, part of the PostgreSQL category; --> OK, here is what I see: from top: 17718 postgres 25 0 293M 293M 292M R 22.2 7.6 28:26 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| OK, here is what I see: from top: 17718 postgres 25 0 293M 293M 292M R 22.2 7.6 28:26 2 postgres: postgres mydb 127.0.0.1:41972 INSERT MY OS command is: pg_restore -v -t mytable -d mydb -U postgres -R my.dmp SQL from database: mydb=# select datname, procpid, current_query mydb-# from pg_stat_activity mydb-# where current_query != '<IDLE>'; datname | procpid | current_query ---------+---------+---------------------------------------------------- ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------- mydb | 17718 | INSERT INTO mytable VALUES (... (1 row) Thanks, -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Thursday, March 24, 2005 8:52 AM To: Lee Wu Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] pg_dump, pg_restore, insert vs copy "Lee Wu" <Lwu@mxlogic.com> writes: > When I use pg_dump to back up the whole database and then pg_restore an > individual table, > pg_restore uses COPY. Great. > When I use pg_dump to back up an individual table and pg_restore it, > pg_restore uses INSERT. Not for me... That decision is fixed at pg_dump time; it's not possible for pg_restore to change it, because the data is already that way (or not) in the dump file. Maybe you misinterpreted what you saw? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org |
| ||||
| "Lee Wu" <Lwu@mxlogic.com> writes: > MY OS command is: > pg_restore -v -t mytable -d mydb -U postgres -R my.dmp That doesn't prove a thing; the question is what you typed at pg_dump. Thinking about it, I wonder if you did "pg_dump -d mydb ..." -d means something different to pg_dump than pg_restore. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings |