Re: [HACKERS] Issues with logical replication - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] Issues with logical replication
Date
Msg-id 20180103174710.lwutjgidhoqbzgay@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] Issues with logical replication  (Stas Kelvich <s.kelvich@postgrespro.ru>)
Responses Re: [HACKERS] Issues with logical replication
List pgsql-hackers
Stas Kelvich wrote:

> Seems that having busy loop is the best idea out of several discussed.
> 
> I thought about small sleep at the bottom of that loop if we reached topmost
> transaction, but taking into account low probability of that event may be
> it is faster to do just busy wait.

In other locations where we do similar things we have 1ms sleeps.  I
agree with the need for a comment here.

Proposed patch attached.  I tried your reload.pgb test case in 9.4
(after changing pgoutput to test_decoding and removing the 3rd arg to a
function call) and the crash takes about 3 seconds without patch in my
machine.  No crash with this patch.

Will push this shortly after lunch.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] eval_const_expresisions and ScalarArrayOpExpr
Next
From: Bruce Momjian
Date:
Subject: Re: Speeding up pg_upgrade