Answer the question
In order to leave comments, you need to log in
How to implement load balancing on a PostgreSQL cluster so that read requests go only to the slave?
Good afternoon!
There is a task to distribute queries to the PostgreSQL cluster according to the principle "for writing - to the master, for reading - only to the slave". Is there a solution that will allow you not to change the code of the application itself that sends requests? In the world of MySQL, as far as I remember, Percona ProxySQL can do this, are there analogues for Postgres?
Thank you.
Answer the question
In order to leave comments, you need to log in
But as? Well, in plain text: how is it possible in principle and in theory to do this without the participation of the application?
begin isolation level repeatable read ;
select ... from users;
-- а дальше-то что?
select * from calculate_user_rating(423);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question