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 21:49:44
Message-ID: 17092.1320443384@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:
> OK. So based on it all, it looks like for some rows, first two columns got mangled.

Good detective work. So now we at least have a believable theory about
*what* is happening (something is stomping the first 8 data bytes of
these particular rows), if not *why*.

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?

Another thing we probably should ask at this point is whether you have
any nonstandard software loaded into your server, like auto_explain
or pg_stat_statements or some such.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-11-04 21:57:21 Re: Strange problem with create table as select * from table;
Previous Message Adrian Klaver 2011-11-04 20:57:04 Re: Strange problem with create table as select * from table;

Browse pgsql-hackers by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-11-04 21:57:21 Re: Strange problem with create table as select * from table;
Previous Message Adrian Klaver 2011-11-04 20:57:04 Re: Strange problem with create table as select * from table;