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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)com
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-04 23:04:34
Message-ID: 18546.1320447874@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

hubert depesz lubaczewski <depesz(at)depesz(dot)com> writes:
> On Fri, Nov 04, 2011 at 05:49:44PM -0400, Tom Lane wrote:
>> You said that pg_dump does not show the corruption. That could be
>> because the data is coming out through the COPY code path instead of
>> the SELECT code path. Could you try a pg_dump with --inserts (which
>> will fetch the data with SELECTs) and see if it shows corrupt data?

> i'm running the pg_dump (it will take some time, so don't hold your
> breath), but at the same time - I can select these rows, correctly, with
> normal SELECT from table (xobjects table). Doesn't it disprove this
> theory?

Well, we don't know what the triggering condition is for the corruption,
so it's premature to draw conclusions on what will or won't cause it.
I was wondering if selecting the entire table was necessary.

A different line of thought is that there's something about these
specific source rows, and only these rows, that makes them vulnerable to
corruption during INSERT/SELECT. Do they by any chance contain any
values that are unusual elsewhere in your table? One thing I'm
wondering about right now is the nulls bitmap --- so do these rows have
nulls (or not-nulls) in any place that's unusual elsewhere?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-11-05 00:06:35 Re: Strange problem with create table as select * from table;
Previous Message hubert depesz lubaczewski 2011-11-04 22:43:48 Re: Strange problem with create table as select * from table;

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrian Klaver 2011-11-05 00:06:35 Re: Strange problem with create table as select * from table;
Previous Message hubert depesz lubaczewski 2011-11-04 22:43:48 Re: Strange problem with create table as select * from table;