Skip site navigation (1) Skip section navigation (2)

Re: UNLISTEN bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: UNLISTEN bug
Date: 2010-09-23 21:04:35
Message-ID: 3808.1285275875@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> The bug is pretty simple: ProcessIncomingNotify() is called in a tight
> loop in EnableNotifyInterrupt() while notifyInterruptOccurred is true.
> EnableNotifyInterrupt() is assuming that ProcessIncomingNotify() will
> unset it, but it has an early return that's triggered by my UNLISTEN.

> Simply adding an additional "notifyInterruptOccurred = 0" in the early
> return path (patch attached) seems to work. I added it there rather than
> moving the whole line up, because I wasn't sure if it's safe to do that
> before DisableCatchupInterrupt().

Hm.  AFAICS just moving the flag reset up to the top is safe, and the
cleanest way to fix it.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Peter EisentrautDate: 2010-09-23 22:41:39
Subject: Re: libpq: system-wide root.crt
Previous:From: Tom LaneDate: 2010-09-23 20:19:46
Subject: Re: Feature request - pg_dump - -W specify pwd in command line

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group