Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-16 Thread Alvaro Herrera
Yann Michel wrote: > ... I guiess that the AUTOVACUUM switch only does an automated VACUUM > but no VACUUM FULL? Certainly. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. ---(end of broadcast)

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-16 Thread Yann Michel
Hi, On Wed, Nov 16, 2005 at 10:07:24AM -0500, Tom Lane wrote: > Yann Michel <[EMAIL PROTECTED]> writes: > > Well, now that I'm thinking about, what you've written I think this is > > exactly the point. I think, that there is a VACUUM waiting for the dump > > to finish whereas the INSERTS are waiti

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-16 Thread Yann Michel
Hi Martijn, On Wed, Nov 16, 2005 at 09:47:33AM +0100, Martijn van Oosterhout wrote: > > Ah yes, PostgreSQL doesn't use 2PL, it uses MVCC. quick overview here: > http://linuxgazette.net/issue68/mitchell.html THX! That was interesting! > > Thanks. BTW: Is there anything about locks and their mean

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-16 Thread Tom Lane
Yann Michel <[EMAIL PROTECTED]> writes: > Well, now that I'm thinking about, what you've written I think this is > exactly the point. I think, that there is a VACUUM waiting for the dump > to finish whereas the INSERTS are waiting for the VACUUM to finish. Only if it's a VACUUM FULL ... plain VACU

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-16 Thread Rod Taylor
> I'm asking, because we have a bigger datawarehouse and dump the data for > a backup every night. Unfortunately, the backup now takes realy long. You may want to consider upgrading and using PITR backups instead. They can be much faster to both backup and to restore if something goes wrong. --

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-16 Thread Martijn van Oosterhout
On Wed, Nov 16, 2005 at 09:27:55AM +0100, Yann Michel wrote: > On Wed, Nov 16, 2005 at 08:28:31AM +0100, Martijn van Oosterhout wrote: > > On Wed, Nov 16, 2005 at 08:09:31AM +0100, Yann Michel wrote: > > > Well, thanks for all the answers. Are the locks then released once they > > > are not needed

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-16 Thread Yann Michel
Hi, first of all, thanks to all, that replied! On Wed, Nov 16, 2005 at 08:28:31AM +0100, Martijn van Oosterhout wrote: > On Wed, Nov 16, 2005 at 08:09:31AM +0100, Yann Michel wrote: > > Well, thanks for all the answers. Are the locks then released once they > > are not needed any more like in 2PC

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Michael Paesold
Yann Michel wrote: Hi, On Wed, Nov 16, 2005 at 01:25:43PM +0800, Christopher Kings-Lynne wrote: I belive a lock is acquired on every table including inherited children BEFORE doing ANY dumping. To allow pg_dump to get a consistent dump snapshot. Well, thanks for all the answers. Are the lo

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Martijn van Oosterhout
On Wed, Nov 16, 2005 at 08:09:31AM +0100, Yann Michel wrote: > Well, thanks for all the answers. Are the locks then released once they > are not needed any more like in 2PC? 2PC doesn't release any locks, it can't to maintain integrity. > That should still leaqve the taken snapshot of the release

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Christopher Kings-Lynne
I'm asking, because we have a bigger datawarehouse and dump the data for a backup every night. Unfortunately, the backup now takes realy long. That means, other processes that insert data will have to wait which is sometime really long! I was searching for a way to avoid this. I thought besides th

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Yann Michel
Hi, On Wed, Nov 16, 2005 at 01:25:43PM +0800, Christopher Kings-Lynne wrote: > I belive a lock is acquired on every table including inherited children > BEFORE doing ANY dumping. To allow pg_dump to get a consistent dump > snapshot. Well, thanks for all the answers. Are the locks then released

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Christopher Kings-Lynne
I belive a lock is acquired on every table including inherited children BEFORE doing ANY dumping. To allow pg_dump to get a consistent dump snapshot. Chris Yann Michel wrote: Hi, On Wed, Nov 16, 2005 at 09:59:44AM +0800, Christopher Kings-Lynne wrote: It acquires share locks on EVERY tabl

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Andrew - Supernews
On 2005-11-16, Yann Michel <[EMAIL PROTECTED]> wrote: > Hi, > > On Wed, Nov 16, 2005 at 09:59:44AM +0800, Christopher Kings-Lynne wrote: >> It acquires share locks on EVERY table. > > do you mean on EVERY inherited table once one of them is dumped? Or do > you mean that a share lock is requested(an

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Yann Michel
Hi, On Wed, Nov 16, 2005 at 09:59:44AM +0800, Christopher Kings-Lynne wrote: > It acquires share locks on EVERY table. do you mean on EVERY inherited table once one of them is dumped? Or do you mean that a share lock is requested(and hold) on each of them once one is dumped, i.e., sequentially?

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Christopher Kings-Lynne
It acquires share locks on EVERY table. Yann Michel wrote: Hi all, On Sun, Nov 13, 2005 at 03:22:23AM +0100, Yann Michel wrote: I'm using PG_DUMP for backing up a postgres 7.4 database. As I have seen, the pg_dump aquires a table lock while dump the table's content. What will happen, if I hav

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Alvaro Herrera
Yann Michel wrote: > Hi all, > > On Sun, Nov 13, 2005 at 03:22:23AM +0100, Yann Michel wrote: > > > > I'm using PG_DUMP for backing up a postgres 7.4 database. As I have > > seen, the pg_dump aquires a table lock while dump the table's content. > > What will happen, if I have a basic table and se

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Yann Michel
Hi all, On Sun, Nov 13, 2005 at 03:22:23AM +0100, Yann Michel wrote: > > I'm using PG_DUMP for backing up a postgres 7.4 database. As I have > seen, the pg_dump aquires a table lock while dump the table's content. > What will happen, if I have a basic table and several inherited tables. > Will th

[HACKERS] PG_DUMP and table locking in PG7.4

2005-11-12 Thread Yann Michel
Hi, I'm using PG_DUMP for backing up a postgres 7.4 database. As I have seen, the pg_dump aquires a table lock while dump the table's content. What will happen, if I have a basic table and several inherited tables. Will the PG_DUMP tool only aquire locks on the inherited tables or on the parent-ta