Re: unexpected PQresultStatus: 8 with simple logical replication

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: unexpected PQresultStatus: 8 with simple logical replication
Дата
Msg-id CAB7nPqT_MEzATE-i4U12Hw8-WHf=8fEcearNvWhnVAJVYYiCOQ@mail.gmail.com
обсуждение исходный текст
Ответ на unexpected PQresultStatus: 8 with simple logical replication  (Brent Tubbs <brent.tubbs@gmail.com>)
Ответы Re: unexpected PQresultStatus: 8 with simple logical replication  (Brent Tubbs <brent.tubbs@gmail.com>)
Список pgsql-general
On Sat, Jan 10, 2015 at 9:22 AM, Brent Tubbs <brent.tubbs@gmail.com> wrote:
> psql "dbname=postgres replication=database user=postgres" -c
> "START_REPLICATION SLOT foobar LOGICAL 0/D9C59A28"
> unexpected PQresultStatus: 8
psql is not smart enough to understand that with a replication connection..

> Advice?
You should use pg_logical_slot_peek_changes or
pg_logical_slot_get_changes to grab changes from a replication slot
using psql. If you are looking at something at a lower level, have a
look at pg_recvlogical as an example of logical change receiver. It is
a good start point as well if your goal is to implement your own
receiver.

In any case, the documentation provides some examples:
http://www.postgresql.org/docs/current/static/logicaldecoding-example.html
--
Michael


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: How to analyze a slowdown in 9.3.5?
Следующее
От: Brent Tubbs
Дата:
Сообщение: Re: unexpected PQresultStatus: 8 with simple logical replication