Re: aio: worker: Free SMGR objects when idle - Mailing list pgsql-hackers

From shihao zhong
Subject Re: aio: worker: Free SMGR objects when idle
Date
Msg-id CAGRkXqTy5+rzTKwOo24rpF-nRWXUjmum__vTaCkdpMgQymXhkw@mail.gmail.com
Whole thread
In response to Re: aio: worker: Free SMGR objects when idle  (Alexandre Felipe <o.alexandre.felipe@gmail.com>)
Responses Re: aio: worker: Free SMGR objects when idle
List pgsql-hackers
Hi Alexandre,

I don't think this patch needs the LRU. Backends already call
smgrdestroyall() at transaction end, and bgwriter and checkpointer do it
after each checkpoint, so the IO worker is the one process that never
cleans up, and v3 bounds it with the entry cap and the idle cleanup.

Touching an LRU and calling FirstCallSinceLastCheckpoint() on every IO
puts work back in the hot path, which is what Andres objected to as well.

Thanks,
Shihao


pgsql-hackers by date:

Previous
From: shihao zhong
Date:
Subject: Re: [PATCH] Refactor remaining zero-fill relation extensions to use smgrzeroextend()
Next
From: Tom Lane
Date:
Subject: Re: remove_useless_joins vs. bug #19560