Re: Minimal logical decoding on standbys
От | Drouvot, Bertrand |
---|---|
Тема | Re: Minimal logical decoding on standbys |
Дата | |
Msg-id | afed6c6d-1c77-75bf-d0f2-8500ddc56780@gmail.com обсуждение исходный текст |
Ответ на | Re: Minimal logical decoding on standbys (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: Minimal logical decoding on standbys
|
Список | pgsql-hackers |
Hi, On 4/1/23 6:50 AM, Amit Kapila wrote: > On Fri, Mar 31, 2023 at 7:14 PM Drouvot, Bertrand > <bertranddrouvot.pg@gmail.com> wrote: >> >> That sounds like a good idea. We could imagine creating a LogicalWalSndWakeup() >> doing the Walsender(s) triage based on a new variable (as you suggest). >> >> But, it looks to me that we: >> >> - would need to go through the list of all the walsenders to do the triage >> - could wake up some logical walsender(s) unnecessary >> > > Why it could wake up unnecessarily? I was thinking that, if a new LogicalWalSndWakeup() replaces "ConditionVariableBroadcast(&XLogRecoveryCtl->replayedCV);" in ApplyWalRecord() then, it could be possible that some walsender(s) are requested to wake up while they are actually doing decoding (but I might be wrong). > >> This extra work would occur during each replay. >> >> while with the CV, only the ones in the CV wait queue would be waked up. >> > > Currently, we wake up walsenders only after writing some WAL records > at the time of flush, so won't it be better to wake up only after > applying some WAL records rather than after applying each record? Yeah that would be better. Do you have any idea about how (and where) we could define the "some WAL records replayed"? Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: