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

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

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Strange problem with create table as select * from table;
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: Strange problem with create table as select * from table;