1

I have old DB server Postgres 8.4 and Slony (slave, to which only a table replicates)

I'm trying to migrate to new server with Postgres 9.x without slony and slony deamon, I would later setup other replication.

My plan is:
1. OLD DB: pg_dumpall -U --clean > dump.sql
2. NEW DB: psql -U < dump.sql
I have some errors during migration, but it looks like errors due to the lack of SLONY on new server.
Is it correct? Can I ignore them?
3. Delete all objects related to SLONY to have a clean database, only with data.
How to do it?

I found this but I am not sure it describes every operation that should be done.

To sum up: I need help how to recover the database so that it is clean, without SLONY objects.

Marco
  • 1,679
  • 3
  • 17
  • 31
  • It's been a long time since I did anything with slony, but if I remember correctly the slony stuff is in a different schema, so you need to figure out how to tell pg_dumpall to skip the slony schema (whatever it is called). – wurtel Nov 06 '19 at 13:21

1 Answers1

0

Slony add schema, but not only..
Slony adds its own sequence as an extra column to tables without a primary key.
To have a clean database, you must remove all these objects.

I found solution: http://lists.slony.info/pipermail/slony1-general/2008-April/007906.html

I was able to migrate to a server without a Slony without errors.

The problem I encountered was the script from the attachment refused to read the name and I had to hardcoded "cluster_name".

UPDATE:

Answer from Slony FAQ: http://slony.info/documentation/1.2/faq.html#AEN6892

SLONIK TABLE ADD KEY / SLONIK TABLE DROP KEY

This command was introduced in Slony-I 1.0

In Slony-I version 2.0, this command is removed as obsolete because triggers are no longer "messed around with" in the system catalogue.