Re: 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: Re: pg_listener entries deleted under heavy NOTIFY load only on Windows
Date: 2009-01-28 17:34:49
Message-ID: 49809739.6060009@wsi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

*** async.c.8.3.5 2009-01-28 12:25:11.966356419 -0500
--- async.c 2009-01-28 12:26:51.955740151 -0500
***************
*** 101,107 ****
#include "utils/fmgroids.h"
#include "utils/memutils.h"
#include "utils/ps_status.h"
!

/*
* State for pending LISTEN/UNLISTEN actions consists of an ordered list of
--- 101,107 ----
#include "utils/fmgroids.h"
#include "utils/memutils.h"
#include "utils/ps_status.h"
! #include "storage/procarray.h"

/*
* State for pending LISTEN/UNLISTEN actions consists of an ordered list of
***************
*** 628,633 ****
--- 628,634 ----
}
else
{
+ int listenerExists = 1;
if (Trace_notify)
elog(DEBUG1, "AtCommit_Notify: notifying pid %d",
listenerPID);
***************
*** 649,657 ****
* we should just do it for any failure (certainly at least
* for EPERM too...)
*/
! simple_heap_delete(lRel, &lTuple->t_self);
}
! else if (listener->notification == 0)
{
/* Rewrite the tuple with my PID in notification column */
rTuple = heap_modifytuple(lTuple, tdesc, value, nulls, repl);
--- 650,670 ----
* we should just do it for any failure (certainly at least
* for EPERM too...)
*/
! if (IsBackendPid(listenerPID))
! {
! elog(LOG, "kill(%d) SIGUSR2 failed, but process is running: %m",
! listenerPID);
! }
! else
! {
! elog(LOG, "kill(%d) SIGUSR2 failed, process is NOT running: %m",
! listenerPID);
! listenerExists = 0;
! simple_heap_delete(lRel, &lTuple->t_self);
! }
}
!
! if (listenerExists && listener->notification == 0)
{
/* Rewrite the tuple with my PID in notification column */
rTuple = heap_modifytuple(lTuple, tdesc, value, nulls, repl);

Attachment Content-Type Size
unknown_filename text/html 4.9 KB
async.c.notify_patch text/plain 1.8 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-01-28 17:44:20 Re: pg_listener entries deleted under heavy NOTIFY load only on Windows
Previous Message Pavel Stehule 2009-01-28 17:18:01 server crash when tsearch2 function is called from update trigger