Bug 783107

Summary: pg_dump inserts data into the wrong table with the same schema.
Product: Red Hat Enterprise Linux 6 Reporter: Yaniv Lavi <ylavi>
Component: postgresqlAssignee: Tom Lane <tgl>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.2CC: hhorak, sgrinber, ylavi
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-19 15:37:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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...