Re: Strange problem with create table as select * from table; - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Strange problem with create table as select * from table;
Date
Msg-id 20111103150130.GA17857@depesz.com
Whole thread Raw
In response to Re: Strange problem with create table as select * from table;  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Strange problem with create table as select * from table;
Next
From: Adrian Klaver
Date:
Subject: Re: Strange problem with create table as select * from table;