5

I have two PostgreSQL database servers. One is the master and another is a slave server which is in read only mode. I have written a few functions that CREATE TEMPORARY TABLE within the function. Now my question: is it possible to run all of those functions in slave server? If it is possible, then how?

1 Answer 1

3

See the manuals.

All such connections are strictly read-only; not even temporary tables may be written

You will want something like slony or bucardo doing trigger-based replication if you want the replica to support write operations.


Edit: or, nowadays you can use logical replication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.