| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de> |
| Subject: | Re: aio: worker: Free SMGR objects when idle |
| Date: | 2026-09-21 14:25:12 |
| Message-ID: | CAGRkXqT7Gqv3ehBLAUAicsu0JBn=hT00jMOS0VYtEspr4dvmCw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hannu Krosing | 2026-09-21 15:02:53 | Re: Direct TOAST v2, faster, smaller and no migration needed |
| Previous Message | Andres Freund | 2026-09-21 14:24:21 | Re: [Patch] New pg_stat_tablespace view |