Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-03-14 Thread Craig Ringer
On 11 March 2016 at 22:24, Petr Jelinek wrote: > On 02/03/16 08:05, Craig Ringer wrote: > >> On 1 March 2016 at 05:30, Petr Jelinek > > wrote: >> > > >> >> I wonder if it would be acceptable to create new info flag

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-03-11 Thread Petr Jelinek
On 02/03/16 08:05, Craig Ringer wrote: On 1 March 2016 at 05:30, Petr Jelinek > wrote: On 29/02/16 03:23, Craig Ringer wrote: Sound reasonable? I wonder if it would be acceptable to create new info flag for RM_SEQ_ID

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-03-01 Thread Craig Ringer
On 1 March 2016 at 05:30, Petr Jelinek wrote: > > On 29/02/16 03:23, Craig Ringer wrote: >> >> > Sound reasonable? >> > > I wonder if it would be acceptable to create new info flag for RM_SEQ_ID > that would behave just like XLOG_SEQ_LOG but would be used only for the >

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-02-29 Thread Alvaro Herrera
Petr Jelinek wrote: > I wonder if it would be acceptable to create new info flag for RM_SEQ_ID > that would behave just like XLOG_SEQ_LOG but would be used only for the > nontransactional updates (nextval) so that decoding could easily > differentiate between transactional and non-transactional

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-02-29 Thread Petr Jelinek
On 29/02/16 03:23, Craig Ringer wrote: On 17 December 2015 at 10:08, Craig Ringer > wrote: On 15 December 2015 at 20:17, Andres Freund > wrote: I think this is quite the wrong

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-02-28 Thread Craig Ringer
On 17 December 2015 at 10:08, Craig Ringer wrote: > On 15 December 2015 at 20:17, Andres Freund wrote: >> >> >> I think this is quite the wrong approach. You're calling the logical >> decoding callback directly from decode.c, circumventing >>

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2015-12-16 Thread Craig Ringer
On 15 December 2015 at 20:17, Andres Freund wrote: > > > I think this is quite the wrong approach. You're calling the logical > decoding callback directly from decode.c, circumventing > reorderbuffer.c. While you don't need the actual reordering, you *do* > need the snapshot

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2015-12-15 Thread Petr Jelinek
On 2015-12-15 13:51, Andres Freund wrote: On 2015-12-15 13:46:29 +0100, Petr Jelinek wrote: I don't think that approach alone is good enough. It might be ok for selective replication where the replication is driven by tables anyway, but in general and especially for failover it's not good

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2015-12-15 Thread Andres Freund
On 2015-12-14 16:19:33 +0800, Craig Ringer wrote: > On 14 December 2015 at 11:28, Craig Ringer wrote: > > > Hi all > > > > Attached is a patch against 9.6 to add support for informing logical > > decoding plugins of the new sequence last_value when sequence advance WAL > >

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2015-12-15 Thread Andres Freund
On 2015-12-15 13:46:29 +0100, Petr Jelinek wrote: > I don't think that approach alone is good enough. It might be ok for > selective replication where the replication is driven by tables anyway, but > in general and especially for failover it's not good enough to tell user > that we handle some

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2015-12-15 Thread Petr Jelinek
On 2015-12-15 13:17, Andres Freund wrote: On 2015-12-14 16:19:33 +0800, Craig Ringer wrote: Needed to make logical replication based failover possible. While it'll make it easier, I think it's certainly quite possible to do so without this feature if you accept some sane restrictions. If you

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2015-12-14 Thread Craig Ringer
On 14 December 2015 at 16:19, Craig Ringer wrote: > Attached a slightly updated version. It just has less spam in the > regression tests, by adding a new option to test_decoding to show > sequences, which it doesn't enable except in sequence specific tests. > Whoops, the

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2015-12-14 Thread Craig Ringer
On 14 December 2015 at 11:28, Craig Ringer wrote: > Hi all > > Attached is a patch against 9.6 to add support for informing logical > decoding plugins of the new sequence last_value when sequence advance WAL > records are processed during decoding. > Attached a slightly