Re: pg_listener entries deleted under heavy NOTIFY load only on Windows - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_listener entries deleted under heavy NOTIFY load only on Windows
Date
Msg-id 27010.1232076276@sss.pgh.pa.us
Whole thread Raw
In response to pg_listener entries deleted under heavy NOTIFY load only on Windows  ("Marshall, Steve" <smarshall@wsi.com>)
Responses Re: pg_listener entries deleted under heavy NOTIFY load only on Windows
List pgsql-bugs
"Marshall, Steve" <smarshall@wsi.com> writes:
> Under a heavy load of NOTIFY events, entries in the pg_listener table
> for some events are deleted, effectively acting as though UNLISTEN were
> called.

> I have only been able to make this occur on a PostgreSQL server running
> on Windows.

AFAICS the most likely explanation for this is that Send_Notify() gets
an error from kill() and concludes that the listening process has died
without removing its pg_listener entry; whereupon it removes it itself.
Looking at pgkill(), that theory implies that CallNamedPipe() failed
when under sufficient stress.  I'm not sure what the "timeout" parameter
we use with CallNamedPipe actually limits, but maybe it's too small?
(Microsoft's doc suggests that the timeout only matters if the pipe
doesn't already exist, so I'm not sure I believe this theory; though
certainly the doc is vague enough that that reading could be wrong.)

Theory B is that you've got some broken antivirus code on there that
is arbitrarily interfering with the pipe access.  The lack of any
similar previous reports suggests that there's some local issue
contributing ,,,

            regards, tom lane

pgsql-bugs by date:

Previous
From: Fujii Masao
Date:
Subject: Re: BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION
Next
From: "Hiroshi Saito"
Date:
Subject: BUG #4619: pg_ctl reports strange error message when be executed on non executable directory