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 CAGRkXqT7Gqv3ehBLAUAicsu0JBn=hT00jMOS0VYtEspr4dvmCw@mail.gmail.com
Whole thread
In response to aio: worker: Free SMGR objects when idle  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Responses Re: aio: worker: Free SMGR objects when idle
List pgsql-hackers
Hi Nazir,

Thanks for the patch. This is the same problem as BUG #19622, and
Alexandre has a sinval based patch for it in [1].

I read v1, the placement looks good to me.

For the never idle case you named, the check could go after the
if/else, next to CHECK_FOR_INTERRUPTS(). Every iteration passes there,
and the SMGRRELEASE barrier already calls smgrreleaseall() at that
point, so it is a safe place. It only matters for a worker that sees
no empty queue for a whole checkpoint cycle, so it is a small thing.

For 18 the idle branch looks different, so the backpatch needs its own
version.

Thanks,
Shihao

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [Patch] New pg_stat_tablespace view
Next
From: Hannu Krosing
Date:
Subject: Re: Direct TOAST v2, faster, smaller and no migration needed