Question: Is it possible to get the new xlog position after query execution?

Поиск
Список
Период
Сортировка
От Oleg Serov
Тема Question: Is it possible to get the new xlog position after query execution?
Дата
Msg-id CAH2JyMT=UY989a9WNcu_E1OAh7GyM1YDjhKUa-060CAH5uqhuA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question: Is it possible to get the new xlog position after query execution?
Список pgsql-general
We are using a master/slave replication system where we perform writes on master and use replication to offload reads.

However, sometimes we have a replication lag of a few seconds and as a result, after the update, the change is not yet available on the replica. 

Is there a way to get XLOG position to which specific update query will be written? That way we can check if our replica caught up with changes and it is safe to read it from. Can it be done using SQL functions? Can I get that information from query protocol?

Thank you!

--
Oleg,
Software Engineer at Slapdash

В списке pgsql-general по дате отправления:

Предыдущее
От: Philip Semanchuk
Дата:
Сообщение: psql syntax for array of strings in a variable?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: psql syntax for array of strings in a variable?