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 21:31:33
Message-ID: 20111103213133.GA29426@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> I would like to know the ctid's of the -1 rows in the copied table,
> along with the ctid's of the rows they share magic_ids with, and
> the ctid's of the rows with those same magic_ids in the original.
> I'm wondering whether the affected rows are physically clustered ...

i tried:
create table qqq as select cmax as o_cmax, xmax as o_xmax, cmin as
o_cmin, xmin as o_xmin, ctid as o_ctid, * from sssssss.xobjects;

but the resulting table didn't have -1 values:
$ select xobject_id, count(*) from qqq group by 1 having count(*) > 1;
xobject_id | count
------------+-------
(0 rows)

$ select o_cmax,o_xmax,o_cmin,o_xmin,o_ctid, xobject_id, order_id from qqq where xobject_id = -1;
o_cmax | o_xmax | o_cmin | o_xmin | o_ctid | xobject_id | order_id
--------+--------+--------+--------+--------+------------+----------
(0 rows)

i'm checking now something else, but later will try to get better grasp on those bad rows.

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-11-03 22:02:04 Re: Strange problem with create table as select * from table;
Previous Message Tom Lane 2011-11-03 21:28:34 Re: Strange problem with create table as select * from table;

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-11-03 22:02:04 Re: Strange problem with create table as select * from table;
Previous Message Tom Lane 2011-11-03 21:28:34 Re: Strange problem with create table as select * from table;