Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-26 Thread Alvaro Herrera
Pushed this to 9.4 - master after some more tinkering. It occurred to me that it might be better to have ReorderBufferSetBaseSnapshot do the IncrRefCount instead of expecting caller to do it. But I wouldn't backpatch that change, so I refrained. Thanks for the patch. -- Álvaro Herrera

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-26 Thread Arseny Sher
Alvaro Herrera writes: > I'm struggling with this assert. I find that test_decoding passes tests > with this assertion in branch master, but fails in 9.4 - 10. Maybe I'm > running the tests wrong (no assertions in master?) but I don't see it. > It *should* fail ... Your v3 patch fails for me

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-26 Thread Alvaro Herrera
On 2018-Jun-26, Arseny Sher wrote: > Alvaro Herrera writes: > > * I'm a bit unsure about the comment atop ReorderBufferSetBaseSnapshot. > > Obviously, the bit within the #if 0/#endif I'm going to remove before > > push. > > It looks like you've started editing that bit and didn't finish. Y

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-26 Thread Arseny Sher
Alvaro Herrera writes: > Firstly -- this is top-notch detective work, kudos and thanks for the > patch and test cases. (I verified that both fail before the code fix.) Thank you! > Here's a v3. I applied a lot of makeup in order to try to understand > what's going on. I *think* I have a gr

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-25 Thread Alvaro Herrera
Hello Firstly -- this is top-notch detective work, kudos and thanks for the patch and test cases. (I verified that both fail before the code fix.) Here's a v3. I applied a lot of makeup in order to try to understand what's going on. I *think* I have a grasp on the original code and your bugfix

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-21 Thread Arseny Sher
3f88fccf Mon Sep 17 00:00:00 2001 From: Arseny Sher Date: Thu, 21 Jun 2018 10:29:07 +0300 Subject: [PATCH] Fix slot's xmin advancement and subxact's lost snapshots in decoding There are two in some way related bugs here. First, xmin of logical slots was advanced too early. During xl_r

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-18 Thread Alvaro Herrera
On 2018-Jun-11, Antonin Houska wrote: > Arseny Sher wrote: > > Please see detailed description of the issues, tests which reproduce > > them and fixes in the attached patch. > > I've played with your tests and gdb for a while, both w/o and with your > patch. I think I can understand both problem

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-06-11 Thread Antonin Houska
Arseny Sher wrote: > Please see detailed description of the issues, tests which reproduce > them and fixes in the attached patch. I've played with your tests and gdb for a while, both w/o and with your patch. I think I can understand both problems. I could not invent simpler way to fix them. One

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-05-25 Thread Arseny Sher
Michael Paquier writes: > but for now I would recommend to register this patch to the next > commit fest under the category "Bug Fixes" so as it does not fall into > the cracks: https://commitfest.postgresql.org/18/ > > I have added an entry to the open items in the section for older bugs: > htt

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-04-16 Thread Michael Paquier
On Sun, Apr 08, 2018 at 08:46:04AM +0300, Arseny Sher wrote: > I've discovered a couple of bugs in logical decoding code, both leading > to incorrect decoding results in somewhat rare cases. First, xmin of > slots is advanced too early. This affects the results only when > interlocking allows to pe

Re: Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-04-16 Thread Arseny Sher
(delicate ping)

Fix slot's xmin advancement and subxact's lost snapshots in decoding.

2018-04-07 Thread Arseny Sher
r Postgres Professional: http://www.postgrespro.com The Russian Postgres Company >From 0d03ef172a29ce64a6c5c26f484f0f3186895125 Mon Sep 17 00:00:00 2001 From: Arseny Sher Date: Sat, 7 Apr 2018 08:22:30 +0300 Subject: [PATCH] Fix slot's xmin advancement and subxact's lost snapshots in deco