Re: [patch] Cache invalidation for I/O Workers

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Alexandre Felipe <o(dot)alexandre(dot)felipe(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Subject: Re: [patch] Cache invalidation for I/O Workers
Date: 2026-09-21 14:09:50
Message-ID: CAGRkXqSBhmeBk6tRR-m1wmzKhSSSJrhjJtWgRHqTE9m_U8m23g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Alexandre,

v2 looks right to me, the entries are freed now.

An idle worker sleeps in WaitLatch, so it only sees the messages after
a catchup signal, that is 2048 queued messages. On a quiet system the
stale fds stay, like in the 51 minutes case from the bug report.
Nazir's patch covers that case, yours covers the busy worker. Maybe the
two threads should be merged, CCing Nazir.

LW_SHARED does not work there. SharedInvalBackendInit does
pgprocnos[numProcs++] = MyProcNumber, two backends starting at the same
time would both hold the shared lock and race on numProcs.

Small things: a catchup wakeup is counted in hist_wakeups, the comment
rewrites in smgr.c are unrelated, and shmem.h sorts before sinvaladt.h.

Thanks,
Shihao

>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-09-21 14:11:09 Re: [Patch] New pg_stat_tablespace view
Previous Message Tomas Vondra 2026-09-21 13:58:08 Re: COMMENTS are not being copied in CREATE TABLE LIKE