Re: Merging two database dumps

2018-06-13 Thread Alex O'Ree
Thanks for the clarification On Wed, Jun 13, 2018 at 9:32 AM, Adrian Klaver wrote: > On 06/13/2018 06:21 AM, Alex O'Ree wrote: > >> Desired behavior is to just log the error and continue the import using >> pgdump based copy commands >> > > Each COPY is atomic so if any part of it fails the whol

Re: Merging two database dumps

2018-06-13 Thread Adrian Klaver
On 06/13/2018 06:21 AM, Alex O'Ree wrote: Desired behavior is to just log the error and continue the import using pgdump based copy commands Each COPY is atomic so if any part of it fails the whole thing fails, so you will not be able to achieve what you want that way. The servers are not

Re: Merging two database dumps

2018-06-13 Thread Alex O'Ree
Desired behavior is to just log the error and continue the import using pgdump based copy commands The servers are not on the same network. Sneaker net is the only way On Wed, Jun 13, 2018, 7:42 AM Andreas Kretschmer wrote: > > > Am 13.06.2018 um 13:17 schrieb Alex O'Ree: > > I have a situatio

Re: [External] Merging two database dumps

2018-06-13 Thread pavan95
Yes Vijay, It might work, but I'm thinking it will be a performance overhead in case of complex data. Regards, Pavan -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Merging two database dumps

2018-06-13 Thread Andreas Kretschmer
Am 13.06.2018 um 13:17 schrieb Alex O'Ree: I have a situation with multiple postgres servers running all with the same databases and table structure. I need to periodically export the data from each of there then merge them all into a single server. On  occasion, it's feasible for the same r

Re: [External] Merging two database dumps

2018-06-13 Thread Vijaykumar Jain
select * from( select * from server1.table1 union select * from server2.table1 union select * from server3.table1) a; something 😊 Thanks, Vijay From: Alex O'Ree Date: Wednesday, June 13, 2018 at 4:47 PM To: "pgsql-general@lists.postgresql.org" Subject: [External] Merging two da

Re: Merging two database dumps

2018-06-13 Thread Pavan Teja
Hi Alex, For storing duplicate rows, dropping primary and unique indexes is the only way. One alternative is create a column with timestamp which updates on every insert/update so that timestamp will be primary. Hope it helps. Regards, Pavan On Wed, Jun 13, 2018, 4:47 PM Alex O'Ree wrote: > I

Merging two database dumps

2018-06-13 Thread Alex O'Ree
I have a situation with multiple postgres servers running all with the same databases and table structure. I need to periodically export the data from each of there then merge them all into a single server. On occasion, it's feasible for the same record (primary key) to be stored in two or more se