Re: Potential bug in pg_dump ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brent Verner <brent(at)rcfile(dot)org>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Potential bug in pg_dump ...
Date: 2002-01-09 23:55:46
Message-ID: 16308.1010620546@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brent Verner <brent(at)rcfile(dot)org> writes:
> [2001-12-17 17:06] Tom Lane said:
> | A possible (partial) solution is for pg_dump to obtain a read-lock on
> | every table in the database as soon as it sees the table mentioned in
> | pg_class, rather than waiting till it's ready to read the contents of
> | the table. However this cure might be worse than the disease,
> | particularly for people running "pg_dump -t table".

> How would this lock-when-seen approach cause problems with '-t'?

Locking the whole DB when you only want to dump one table might be seen
as a denial of service. Also, consider the possibility that you don't
have the right to lock every table in the DB.

If we can arrange to lock only those tables that will end up getting
dumped, then these problems go away. I have not looked to see if that's
a difficult change or not.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brent Verner 2002-01-10 00:19:34 Re: Potential bug in pg_dump ...
Previous Message Brent Verner 2002-01-09 23:48:29 Re: Potential bug in pg_dump ...