From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timeline following for logical slots |
Date: | 2016-05-03 18:06:58 |
Message-ID: | 20160503180658.GA59498@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Craig Ringer wrote:
> With this patch pg_recvlogical takes a new --endpos LSN argument, and will
> exit if either:
>
> * it receives an XLogData message with dataStart >= endpos; or
> * it receives a keepalive with walEnd >= endpos
>
> The latter allows it to work without needing a dummy transaction to make it
> see a data message after endpos. If there's nothing to read on the socket
> until a keepalive we know that the server has nothing to send us, and if
> walend has passed endpos we know nothing can have committed before endpos.
Here's a slightly revised version of this patch, for later
consideration.
Changes:
- added -E as short form of --endpos (consistent with -I as --startpos)
- refactored some repetitive code in two auxilliary functions
- allow --endpos to work with --create-slot.
- revert some unrelated changes, such as message additions in verbose
mode and changes to existing messages
- documentation reworked.
I didn't spot any bugs in Craig's patch, but it needs more testing.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
pg_recvlogical.patch | text/x-diff | 9.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2016-05-03 18:09:00 | Re: pg_upgrade and toasted pg_largeobject |
Previous Message | Robert Haas | 2016-05-03 17:58:39 | Re: pg_upgrade and toasted pg_largeobject |