N
N
nhk2016-11-02 11:04:44
linux
nhk, 2016-11-02 11:04:44

postgres. How to create a READ/WRITE table on a Slave machine (Replication)?

Hello! I set up a replica of the postgres database according to the instructions https://www.8host.com/blog/replikaciya-baz-dannyx-...
Now it became necessary to create a table on the Slave machine in the same database, into which the slave could make inserts. How is this possible? When I try to create a table, I get an error:

ERROR: cannot execute CREATE TABLE in a read-only transaction

PS This table should not be transferred to the master server. It is only needed locally on the slave machine.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-11-02
@dmtrrr

This cannot be done on a slave.

D
Dmitry Shitskov, 2016-11-02
@Zarom

This cannot be done on a slave.

Because it is a slave base.
You will have to create an additional database on the slave, in which the Slave will write.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question