| From: | Anthony Hsu <erwaman(at)gmail(dot)com> |
|---|---|
| To: | Xuneng Zhou <xunengzhou(at)gmail(dot)com> |
| Cc: | João Rito <joaovictor(dot)rito(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Dmytro Astapov <dastapov(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Subject: | Re: Set 1s WaitLatch timeout if standby limit has expired in ResolveRecoveryConflictWithBufferPin |
| Date: | 2026-11-27 02:33:47 |
| Message-ID: | CALQc50g9CA=33o5-jdKUfNMqH=ULAKiPbeK9x1Mg8-1VTU8jLw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Xuneng,
Thanks for the review and pointing out the possible race. I attached a new
v5 patch where I removed the $log_location assignment as you suggested.
Also added "Reviewed-by: Xuneng Zhou <xunengzhou(at)gmail(dot)com>" to the commit
message.
Thanks,
Anthony
On Mon, Nov 23, 2026 at 7:40 PM Xuneng Zhou <xunengzhou(at)gmail(dot)com> wrote:
> Hi Anthony,
>
> v4 seems good to me.
>
> Just one minor comment for the test:
>
> +$log_location = -s $node_standby->logfile;
> +
> +# Kill the ClientWrite client so its backend drops its buffer pin, leaving
> +# only the second session's pin behind.
>
> I think we could drop the log_location assignment after the fetch in here.
> There could be a race where session 2 logs its conflict before the test
> reads the file size, so later check conlict log fails unexpectly.
>
> --
> Regards,
> Xuneng Zhou
> HighGo Software Co., Ltd.
>
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-Set-1s-WaitLatch-timeout-if-standby-limit-has-exp.patch | application/octet-stream | 7.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-11-27 02:42:01 | Re: Fix deparsing of SUBSTRING SIMILAR with an operator as first argument |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-11-27 02:31:25 | RE: Wrong relation in apply worker "not updatable" errors PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>for partitions; relcache leak in check_and_init_gencol() |