From: | Brent Tubbs <brent(dot)tubbs(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>, Geoff Tolley <geoff(dot)tolley(at)yougov(dot)com> |
Subject: | Re: unexpected PQresultStatus: 8 with simple logical replication |
Date: | 2015-01-10 18:24:56 |
Message-ID: | CAAOBOv9j0qwWGe-U1-YQ+rqEcXD0LkiN1UFO52NcB3X-F+FANw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
That's working! The blog posts I linked earlier made me think that I had
to explicitly call START_REPLICATION, but I guess that's not necessary?
For anyone else following this thread, I found some better examples at
http://pgci.eisentraut.org/jenkins/job/postgresql_master_world/Documentation/logicaldecoding-example.html
.
On Sat, Jan 10, 2015 at 4:48 AM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:
> On Sat, Jan 10, 2015 at 9:22 AM, Brent Tubbs <brent(dot)tubbs(at)gmail(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Colson | 2015-01-10 18:55:09 | Re: How to analyze a slowdown in 9.3.5? |
Previous Message | Michael Paquier | 2015-01-10 12:48:36 | Re: unexpected PQresultStatus: 8 with simple logical replication |