7
I created two tables with primary key and needed to replicate them, database but all on the same machine. How should I do this?
The tables created are these:
CREATE TABLE cities1 (
city varchar(80) primary key,
location point
);
CREATE TABLE weather10 (
city varchar(80) references cities1(city),
temp_lo int,
temp_hi int,
prcp real,
date date
)
INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');//insere uma linha na tabela com os dados
INSERT INTO cities VALUES ('San Francisco', '(-194.0, 53.0)');
What kind of replication do you want? Master-master, master-slave, synchronous, asynchronous?
– Vinícius Gobbo A. de Oliveira
So I’d like to simply replicate these tables that I created for another bank, all on the same machine.
– user3769812
There are several types of replication. Each of them allows you to access the data in one way. Without knowing how you want to use the data, there is no way to indicate the most appropriate replication. Therefore, I will indicate the Postgresql documentation on replication: http://www.postgresql.org/docs/9.3/static/high-availability.html
– Vinícius Gobbo A. de Oliveira