473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Synchronize unicode data using copy or pg_dump

Hi,

I need to synchronize some tables from a database (master) to another
one (slave).
Both servers are running Debian Woody with PostgreSQL 7.2.1 (postgresql
7.2.1-2woody4).
The databases are in unicode and doesn't contain any binary data.
The tables have primary/foreign key constraints, sequences and indexes,
but no triggers/rules. There are OIDs but these are different on the 2
databases. In fact they are not used by the application.

I need to do that ASAP, and hopefully only once (there are already some
kind of home-made replication scripts, that are not the origin of my
problem).
Later I would like to set up pgreplication or something... any advice on
that is welcomed too ;-)
What would be the fastest way to achieve that?

On the master:
For each table, use COPY TO or pg_dump?

On the slave:
- delete everything from these tables
- drop the FK constraints
- (drop indexes?)
- vacuum (or later?)
- import from files (using COPY FROM or pg_restore)
- recreate the FK constraints
- update the sequences
- reindex (or recreate them)

Does that sound good?
Thanks for you help,
Pascal Polleunus

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #1
0 1628

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bernd Lambertz | last post by:
I have a problem with bcp and format files. We changed our databases from varchar to nvarchar to support unicode. No problems so fare with that. It is working fine. But now I need a format...
2
by: David Lutz | last post by:
Hello, I want to convert an existing database with SQL_ASCII encoding to UNICODE encoding. (postgresql ver 7.3.2) I thought that it might be as easy as: pg_dump mydatabase > dump.sql...
0
by: news.paradise.net.nz | last post by:
My database appears to be a little corrupted, so far it's running along 99% ok, but i am getting some strange results. Primarily i can't back it up because of the following error. Similar errors...
1
by: Rajesh Kumar Mallah | last post by:
Hi , my current database in 7.3.4 is SQL_ASCII are there any benifits of coverting it to UNICODE encoding in 7.4 ? If so what is the process. Regds Mallah.
2
by: Pascal Polleunus | last post by:
Hi, I need to synchronize some tables from a database (master) to another one (slave). Both servers are running Debian Woody with PostgreSQL 7.2.1 (postgresql 7.2.1-2woody4). The databases are...
14
by: David Suela Fernández | last post by:
Hi! Is it possible to copy/migrate one database from one postgres server to other copying just the files in /var/lib/postgres/data/ ? I can't use pg_dump because it give me an error. I think...
0
by: Jason Tesser | last post by:
I have a database in sql_ascii that I need to convert to Unicode. I tried using pg_dump -Fc .. but it fails on certain characters. like this one "è" How can I get the data transferred? ...
1
by: Sally Ruggero | last post by:
I need advice on archiving data from our production database. Each night I would like to save and remove a day's data from two weeks ago, from all the tables. I know how to delete the...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
1
by: Mudcat | last post by:
In short what I'm trying to do is read a document using an xml parser and then upload that data back into a database. I've got the code more or less completed using xml.etree.ElementTree for the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.