what is slonik in postgresql

744 Views Asked by At

myfile

#INIT CLUST
cluster name = lol ; 
 node 1 admin conninfo=''; 
 node 2 admin conninfo=''; 

EXECUTE SCRIPT ( 
FILENAME = './sql_statements.sql',
 EVENT NODE = 1
);

Then in a .sh script a line as:

slonik myfile;

What is the meaning of above code ?

2

There are 2 best solutions below

0
kofemann On

Slony is a master-slave replication for earlier versions of postgres as starting from version 9 a similar tool is available out of box.

0
Laurenz Albe On

slonik is the command line interface of Slony-I.

Slony is a trigger-based replication solution from the days before streaming replication and logical replication. It still is useful in more complicated replication scenarios.

This command file will execute the script sql_statements.sql on all nodes in a Slony cluster in a coordinated fashion.