Re: Strange problem with create table as select * from table;

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Strange problem with create table as select * from table;
Date: 2011-11-03 15:01:30
Message-ID: 20111103150130.GA17857@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, Nov 03, 2011 at 10:55:20AM -0400, Tom Lane wrote:
> > index on xobject_id might be corrupted, but it doesn't explain that I
> > don't see duplicates with group_by/having query on xobjects, which uses
> > seqscan:
> I was just going to ask you to check that. Weird as can be.
> Does plain old "SELECT COUNT(*)" show a difference between the two
> tables?

yes. the xobjects table is written to quite a lot and turning it off is
not an option.

> Do you get similar misbehavior if you break the CREATE TABLE AS into a
> CREATE and an INSERT/SELECT? Also, please note the rowcount returned
> by INSERT/SELECT and see how it matches up with the tables afterwards.
>
> Does turning synchronize_seqscans off affect the behavior?

interesting. will test and let you know. the test will take couple of
hours, though.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mario Weilguni 2011-11-03 15:02:07 Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!
Previous Message Tom Lane 2011-11-03 14:55:20 Re: Strange problem with create table as select * from table;

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrian Klaver 2011-11-03 15:04:19 Re: Strange problem with create table as select * from table;
Previous Message Tom Lane 2011-11-03 14:55:20 Re: Strange problem with create table as select * from table;