pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_dump potential bug
4+ messages / 2 participants
[nested] [flat]

* pg_dump potential bug
@ 2001-03-27 09:03 Marcin Kowalski <kowalski@datrix.co.za>
  2001-03-28 07:37 ` Re: pg_dump potential bug Marcin Kowalski <kowalski@datrix.co.za>
  2001-03-28 15:22 ` Re: pg_dump potential bug Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 4+ messages in thread

From: Marcin Kowalski @ 2001-03-27 09:03 UTC (permalink / raw)
  To: pgsql-admin@postgresql.org.pgsql-bugs

Hi All...

I've got a slight problem with pg_dump in Postgres v7.0.3, in basically 
duplicates all the data that it extracts

I do a 
testdatabase>CREATE TABLE bob (number int4,description text);
testdatabase>INSERT INTO TABLE bob VALUES (4453,'This is just a test of 
pg_dump');

then 

kowalski@dagoba > pg_dump -t bob testdatabase 
\connect - kowalski
CREATE TABLE "bob" (
        "number" int4,
        "description" text
);
CREATE TABLE "bob" (
        "number" int4,
        "description" text
);
COPY "bob" FROM stdin;
4453    This is just a test of pg_dump
\.
COPY "bob" FROM stdin;
4453    This is just a test of pg_dump
\.

As you can see the records are duplicated. I discovered this when I tried 
to migrate from 7.0.3 to 7.1 and found performance suddenly took a terrible 
dive. Is there a patch for pg_dump ??

Thanks for any help
MarCin




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump potential bug
  2001-03-27 09:03 pg_dump potential bug Marcin Kowalski <kowalski@datrix.co.za>
@ 2001-03-28 07:37 ` Marcin Kowalski <kowalski@datrix.co.za>
  1 sibling, 0 replies; 4+ messages in thread

From: Marcin Kowalski @ 2001-03-28 07:37 UTC (permalink / raw)
  To: pgsql-admin@postgresql.org

Hi

I would have expected this problem to have been brought up long ago with 
people doing database backups and restores. Anyway below are the details

I am running PostgreSQL v 7.0.3 (upgraded yesterday from 7.0.2) on SuSE 6.3 
with 2.2.17(SMP) kernel with S/W raid patch. 
The actual database is running on a 40 GIG Software RAID0 Ext2fs partition. 
It has approximately 13million records in 9 tables with most of the data 
residing in 2 tables(+- 6Mill Each). The machine is a Dual PII-350 with 256 
meg of Ram. Each table has two indices, both on two fields.

Is it possible that one of the system tables has been corrupted and shows 
multiple entries for the tables?? This makes me a bit worried about system 
integrity. When I do a simple select * from tablename it works fine, what 
does pg_dump do that I don't ???

Thanks in ADvance
MarCin


> Marcin Kowalski <kowalski@datrix.co.za> writes:
> > kowalski@dagoba > pg_dump -t bob testdatabase
> > \connect - kowalski
> > CREATE TABLE "bob" (
> >         "number" int4,
> >         "description" text
> > );
> > CREATE TABLE "bob" (
> >         "number" int4,
> >         "description" text
> > );
> > COPY "bob" FROM stdin;
> > 4453    This is just a test of pg_dump
> > \.
> > COPY "bob" FROM stdin;
> > 4453    This is just a test of pg_dump
> > \.
>
> Strange.  I can't duplicate this (and neither can anyone else, or we'd
> have heard about it long since).  What platform are you on?  How did you
> build or obtain your executables?
>
>                        regards, tom lane


-- 
-----------------------------
     Marcin Kowalski
     Linux/Perl Developer
     Datrix Solutions
     Cel. 082-400-7603
      ***Open Source Kicks Ass***
-----------------------------



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump potential bug
  2001-03-27 09:03 pg_dump potential bug Marcin Kowalski <kowalski@datrix.co.za>
@ 2001-03-28 15:22 ` Tom Lane <tgl@sss.pgh.pa.us>
  2001-03-29 08:13   ` Re: pg_dump potential bug Marcin Kowalski <kowalski@datrix.co.za>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2001-03-28 15:22 UTC (permalink / raw)
  To: kowalski@datrix.co.za; +Cc: pgsql-admin@postgresql.org; pgsql-bugs@postgresql.org

Marcin Kowalski <kowalski@datrix.co.za> writes:
> Is it possible that one of the system tables has been corrupted and shows 
> multiple entries for the tables?

Come to think of it, this is a fairly likely behavior if you have
multiple entries in pg_shadow with the same usesysid.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump potential bug
  2001-03-27 09:03 pg_dump potential bug Marcin Kowalski <kowalski@datrix.co.za>
  2001-03-28 15:22 ` Re: pg_dump potential bug Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-03-29 08:13   ` Marcin Kowalski <kowalski@datrix.co.za>
  0 siblings, 0 replies; 4+ messages in thread

From: Marcin Kowalski @ 2001-03-29 08:13 UTC (permalink / raw)
  To: pgsql-admin@postgresql.org

Hi

Thanks for the help, in fact that is Exactly what is wrong. The pg_shadow 
table has duplicated entries in it, I think I'm going to create a unique 
index on it.
BTW I've migrated the entrie database to PG7.1RC1, running quite a big 
search on the database basically involving a huge amount of selects. 
Currently I'm curising at 1250 selects per second (simple select, no Joins) 
from multiple tables with mutliple data, pretty fast I think. (But I still 
have +- 10 Million to do :-) ).

ANyone have any ideas on how to improve performace, currently have indices 
on key fields and am clustering (vacuum + vacuum analyze done)?? Are there 
any command line parameters I can try to increase performance..??

Thanks in ADvance
MarCIn

Tom Lane wrote:

> Marcin Kowalski <kowalski@datrix.co.za> writes:
>> Is it possible that one of the system tables has been corrupted and shows
>> multiple entries for the tables?
> 
> Come to think of it, this is a fairly likely behavior if you have
> multiple entries in pg_shadow with the same usesysid.
> 
> regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://www.postgresql.org/search.mpl
> 




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2001-03-29 08:13 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-27 09:03 pg_dump potential bug Marcin Kowalski <kowalski@datrix.co.za>
2001-03-28 07:37 ` Marcin Kowalski <kowalski@datrix.co.za>
2001-03-28 15:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-03-29 08:13   ` Marcin Kowalski <kowalski@datrix.co.za>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox