Re: [patch] Cache invalidation for I/O Workers - Mailing list pgsql-hackers

From shihao zhong
Subject Re: [patch] Cache invalidation for I/O Workers
Date
Msg-id CAGRkXqSBhmeBk6tRR-m1wmzKhSSSJrhjJtWgRHqTE9m_U8m23g@mail.gmail.com
Whole thread
In response to Re: [patch] Cache invalidation for I/O Workers  (Alexandre Felipe <o.alexandre.felipe@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE
Next
From: shihao zhong
Date:
Subject: Re: [Patch] New pg_stat_tablespace view