pg_listener entries deleted under heavy NOTIFY load only on Windows

From: "Marshall, Steve" <smarshall(at)wsi(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_listener entries deleted under heavy NOTIFY load only on Windows
Date: 2009-01-15 22:33:11
Message-ID: 496FB9A7.4080209@wsi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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. I cannot reproduce under Linux.
PostgreSQL version: 8.3.4
Operating System: Windows XP

I have provided some shell script that can reproduce the problem. It
helps to use three psql sessions.

First start a session that listens for two events ("first" and
"second"), then periodically polls for notifications:
check_for_events | psql -h windows_server -U postgres postgres

Second, start an interactive session and execute the command "SELECT *
from pg_listener". You should see the events "first" and "second" listed.

Third, start a session to do repeated notification. The script produces
"NOTIFY first" and "NOTIFY second" in separate transactions repeatedly.
generate_events | psql -h windows_server -U postgres postgres

Continue to check the pg_listener table in the interactive session.
Very quickly one of the two events will disappear from the table.

Strangely, when I execute the same scripts against a database server on
a CentOS Linux system, this problem does not occur.

Attachment Content-Type Size
check_for_events text/plain 235 bytes
generate_events text/plain 573 bytes

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2009-01-15 23:54:03 Re: BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION
Previous Message Francis Dupont 2009-01-15 21:50:27 Re: Installation problem "...The database cluster initialization failed.."