"Tom Lane" <tgl@sss.pgh.pa.us> wrote
>
> The cleanest solution seems to be to make the bgwriter create and use a
> ResourceOwner, and probably get rid of the special hack in resowner.c
> that allows CurrentResourceOwner to be NULL.
>
Is that true that every moment the bgwriter just has one buffer pinned? Then
remember that buffer is enough. This could avoid using ResourceOwner but it
may need some hack into pin/unpin.
Regards,
Qingqing