From: | Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: tablesync patch broke the assumption that logical rep depends on? |
Date: | 2017-04-21 14:11:36 |
Message-ID: | 5db1c1ae-9880-999e-cc7c-80b5efb33f72@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 21/04/17 16:09, Peter Eisentraut wrote:
> On 4/20/17 14:29, Petr Jelinek wrote:
>> + /* Find unused worker slot. */
>> + if (!w->in_use)
>> {
>> - worker = &LogicalRepCtx->workers[slot];
>> - break;
>> + worker = w;
>> + slot = i;
>> + }
>
> Doesn't this still need a break? Otherwise it always picks the last slot.
>
Yes it will pick the last slot, does that matter though, is the first
one better somehow?
We can't break because we also need to continue the counter (I think the
issue that the counter solves is probably just theoretical, but still).
Hmm actually, maybe the if (!w->in_use) should be if (worker == NULL &&
!w->in_use)?
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-04-21 14:15:20 | Re: subscription worker doesn't start immediately on eabled |
Previous Message | Peter Eisentraut | 2017-04-21 14:09:54 | Re: tablesync patch broke the assumption that logical rep depends on? |