Nothing is using StrategyNotifyBgWriter() anymore

Started by Jim Nasbyover 3 years ago2 messages
#1Jim Nasby
nasbyj@amazon.com

While browsing through some of the clock-sweep code I noticed that the
only place StrategyNotifyBgWriter() is called now is in
BackgroundWriterMain()[1]. Presumably this isn't what's desired. If
nothing else, it means the function's description comment is wrong, as
are comments in BackgroundWriterMain(). This isn't new; 9.2 shows the
same thing and that's when the function was added. I'm not sure what the
right fix here is, since ISTM joggling bgwriter for every call to
BufferAlloc() would be overkill.

1:
https://doxygen.postgresql.org/freelist_8c.html#aabbd7d3891afc1d8531c3871d08d4b28

#2Nasby, Jim
nasbyj@amazon.com
In reply to: Jim Nasby (#1)
Re: Nothing is using StrategyNotifyBgWriter() anymore

Answering my own question... I now see that the wakeup does in fact happen in StrategyGetBuffer(). Sorry for the noise.

On 6/16/22, 5:32 PM, "Jim Nasby" <nasbyj@amazon.com> wrote:

While browsing through some of the clock-sweep code I noticed that the
only place StrategyNotifyBgWriter() is called now is in
BackgroundWriterMain()[1]. Presumably this isn't what's desired. If
nothing else, it means the function's description comment is wrong, as
are comments in BackgroundWriterMain(). This isn't new; 9.2 shows the
same thing and that's when the function was added. I'm not sure what the
right fix here is, since ISTM joggling bgwriter for every call to
BufferAlloc() would be overkill.

1:
https://doxygen.postgresql.org/freelist_8c.html#aabbd7d3891afc1d8531c3871d08d4b28