From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Marc G(dot) Fournier" <scrappy(at)hub(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_dump bug ... or not? |
Date: | 2002-01-09 23:13:24 |
Message-ID: | 16005.1010618004@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
> Did I ever send in a bug report about pg_dump 'crashing' while dumping a
> database where one of the tables gets drop'd while the pg_dump is running?
> Not the easiest thing to reproduce, mind you, cause its a matter of that
> one in a million timing thing ... but, if you run pg_dump against a
> database where one of the tables yet to be dump gets drop'd, the pg_dump
> will crash, as opposed to just skipping it and continue with those tables
> that still exist ...
I'd be inclined to fix this by having pg_dump issue a LOCK IN ACCESS
SHARE MODE against each table as it reads the table name from pg_class.
Not by allowing tables to disappear from under us after the dump starts.
The idea of pg_dump is to produce a consistent snapshot, no?
Even that is not *perfectly* secure since the locking phase will take
more than zero time, but it seems close enough.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-01-09 23:20:49 | Re: Does getopt() return "-1", or "EOF", at end? |
Previous Message | Doug Royer | 2002-01-09 22:59:20 | Re: Does getopt() return "-1", or "EOF", at end? |