From: Kartyshov Ivan <i.kartyshov@postgrespro.ru>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: aekorotkov@gmail.com
Cc: hlinnaka@iki.fi
Cc: alvherre@alvh.no-ip.org
Cc: pashkin.elfe@gmail.com
Cc: bharath.rupireddyforpostgres@gmail.com
Cc: euler@eulerto.com
Cc: thomas.munro@gmail.com
Cc: peter@eisentraut.org
Cc: amit.kapila16@gmail.com
Cc: dilipbalaut@gmail.com
Cc: smithpb2250@gmail.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
Date: Wed, 10 Jul 2024 07:58:23 +0300
Message-ID: <50b33ec2bede8aea567557a7e78c6864@postgrespro.ru> (raw)
In-Reply-To: <8d0286f9f0c2f9fc29794dda6b5f4600@postgrespro.ru>
References: <ca85a3c56e3c26cc29d1df14021845f6@postgrespro.ru>
<CAPpHfdvGRssjqwX1+idm5Tu-eWsTcx6DthB2LhGqA1tZ29jJaw@mail.gmail.com>
<CAPpHfdvDjrM6=XxDiuZBa+bg2qL34jwafa3uXf0Zsxm2PKOChg@mail.gmail.com>
<20240620.173045.1163445432733259320.horikyota.ntt@gmail.com>
<8d0286f9f0c2f9fc29794dda6b5f4600@postgrespro.ru>
>> I think the race condition you mentioned refers to the inconsistency
>> between the inHeap flag and the pairing heap caused by a race
>> condition between timeout and wakeup (or perhaps other combinations?
>> I'm not sure which version of the patch the mentioned race condition
>> refers to). However, I imagine it is difficult to reliably reproduce
>> this condition. In that regard, in the latest patch, the coherence
>> between the inHeap flag and the pairing heap is protected by LWLock,
>> so I believe we no longer need that test.
>
> No, Alexandre means that Heikki point on race condition just before
> LWLock. But injection point we can inject and stepin on backend, and
> WaitLSNSetLatches is used from Recovery process. But I have trouble
> to wakeup injection point on server.
One more thing. I want to point, when you move injection point to
contrib dir and do the same test (044_wal_replay_wait_injection_test.pl)
step by step with hands, wakeup works well.
--
Ivan Kartyshov
Postgres Professional: www.postgrespro.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: i.kartyshov@postgrespro.ru, horikyota.ntt@gmail.com, aekorotkov@gmail.com, hlinnaka@iki.fi, alvherre@alvh.no-ip.org, pashkin.elfe@gmail.com, bharath.rupireddyforpostgres@gmail.com, euler@eulerto.com, thomas.munro@gmail.com, peter@eisentraut.org, amit.kapila16@gmail.com, dilipbalaut@gmail.com, smithpb2250@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
In-Reply-To: <50b33ec2bede8aea567557a7e78c6864@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox