Re: pg_dump -a strangeness/bug? (7.1beta5)

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Antoine Reid <antoiner(at)hansonpublications(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dump -a strangeness/bug? (7.1beta5)
Date: 2001-03-06 05:09:24
Message-ID: 3.0.5.32.20010306160924.03b19a30@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

At 17:52 1/03/01 -0500, Antoine Reid wrote:
>
>Can someone confirm whether this is a bug?

It is a bug. It's fixed in CVS.

>If someone goes there and fixes the code, maybe the code could be optimized
>not to put any COPY at all for a table if it is empty?

Maybe for 7.2.

> Either issue a
>SELECT COUNT(*) FROM foo before, or just checking if it got an empty
>recordset when fetching the data?

Probably use 'select Exists(Select * from foo)', since count is very slow -
it does a sequential scan.

>It seems to me we could spare disabling
>triggers, creating a temp table, doing an empty copy and re-enabling
>triggers.. Comments?

This may be less of a problem for normal dumps, since the triggers are now
only disabled for data-only dumps.

Hope this helps,

Philip Warner.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Justin Clift 2001-03-06 07:13:07 Irony bug
Previous Message Tom Lane 2001-03-05 21:53:34 Re: 7.1Beta 4&5 - clean build problem with '--with-perl'