Bug 783107 - pg_dump inserts data into the wrong table with the same schema.
Summary: pg_dump inserts data into the wrong table with the same schema.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: postgresql
Version: 6.2
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Tom Lane
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-19 11:30 UTC by Yaniv Lavi
Modified: 2013-07-03 03:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-19 15:37:54 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Yaniv Lavi 2012-01-19 11:30:02 UTC
Description of problem:
I use pg_dump to dump a database with several tables with the same schema. When looking at the data I see it inserted it into the wrong table. 

Version-Release number of selected component (if applicable):
8.4.8

How reproducible:
not sure

Steps to Reproduce:
1. create database with several tables with the same column schema. 
2. pg_dump the database.
3. load it to a new database.
  
Actual results:
the data is not inserted to the right table.

Expected results:
restoration creates the same database.

Additional info:
I can provide the dump (it's very large) and the ip of the database I dumped.

Comment 2 Tom Lane 2012-01-19 14:53:45 UTC
Please provide a concrete test case.  I've never heard of such behavior and cannot duplicate it here.  The test case I tried is

create schema s1;
create table s1.t1 (f1 text);
insert into s1.t1 values ('schema s1');

create schema s2;
create table s2.t1 (f1 text);
insert into s2.t1 values ('schema s2');

create schema s3;
create table s3.t1 (f1 text);
insert into s3.t1 values ('schema s3');

and this dumps and restores just fine.

Comment 3 Yaniv Lavi 2012-01-19 15:37:54 UTC
Found out the difference was due to time zone difference...


Note You need to log in before you can comment on or make changes to this bug.