pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrey <parihaaraka@gmail.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: NOTIFY does not work as expected
Date: Wed, 4 Jul 2018 11:30:55 -0700
Message-ID: <20180704183055.hqlqm3ramerybzvd@alap3.anarazel.de> (raw)
In-Reply-To: <CAMkU=1yxjDmqpFGMN04EXz86XoQUufQfh5zTscwbvdCikPosEA@mail.gmail.com>
References: <CAOYf6ec-TmRYjKBXLLaGaB-jrd=mjG1Hzn1a1wufUAR39PQYhw@mail.gmail.com>
	<CAMkU=1ytid9NHkLpOyu9bgLb47L34WX+KQnfU8KmQGAOAFJ_Zg@mail.gmail.com>
	<64711.1530595730@sss.pgh.pa.us>
	<CAMkU=1zXAuV+xW6SVpBc_q6M_h_EFxAQHpi+UFb3k2ZPZ_uO=g@mail.gmail.com>
	<CAMkU=1w68PkRCZLmX+pVc3RdWRyWuRCSw8-g4xvQNwy_1FkVtA@mail.gmail.com>
	<CAMkU=1x5b-JqAp951s8vpSLbwx3DmrVDM_pR1ch79hSmBdoQQA@mail.gmail.com>
	<CAMkU=1yxjDmqpFGMN04EXz86XoQUufQfh5zTscwbvdCikPosEA@mail.gmail.com>

Hi,


On 2018-07-04 08:50:12 -0400, Jeff Janes wrote:
> Reading through the comments touched by the commit, it seems obvious what
> the bug is.  It says "cause the processing to occur just before we next go
> idle", but also says "This is called just *after* waiting for a frontend
> command", which is too late to be "before we next go idle"

I've not looked at this issue in depth yet. So I might be completely off
base.  But I'm confused by your comment - we're doing it *after*,
because we do a non-blocking read. And the latch will notify us
(event.events & WL_LATCH_SET) if there was a read.

Are you arguing that we should also notify in cases where we actually
never become idle? I'm not sure that's particularly meaningful, given
there's no guarantee that that actually works, because we could just
have read multiple commands from the client?

Greetings,

Andres Freund




view thread (24+ messages)  latest in thread

Message-ID: <20180704183055.hqlqm3ramerybzvd@alap3.anarazel.de>
Permalink:  ../20180704183055.hqlqm3ramerybzvd@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20180704183055.hqlqm3ramerybzvd@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, jeff.janes@gmail.com, tgl@sss.pgh.pa.us, parihaaraka@gmail.com
  Subject: Re: NOTIFY does not work as expected
  In-Reply-To: <20180704183055.hqlqm3ramerybzvd@alap3.anarazel.de>
  References: <CAOYf6ec-TmRYjKBXLLaGaB-jrd=mjG1Hzn1a1wufUAR39PQYhw@mail.gmail.com> <CAMkU=1ytid9NHkLpOyu9bgLb47L34WX+KQnfU8KmQGAOAFJ_Zg@mail.gmail.com> <64711.1530595730@sss.pgh.pa.us> <CAMkU=1zXAuV+xW6SVpBc_q6M_h_EFxAQHpi+UFb3k2ZPZ_uO=g@mail.gmail.com> <CAMkU=1w68PkRCZLmX+pVc3RdWRyWuRCSw8-g4xvQNwy_1FkVtA@mail.gmail.com> <CAMkU=1x5b-JqAp951s8vpSLbwx3DmrVDM_pR1ch79hSmBdoQQA@mail.gmail.com> <CAMkU=1yxjDmqpFGMN04EXz86XoQUufQfh5zTscwbvdCikPosEA@mail.gmail.com> <20180704183055.hqlqm3ramerybzvd@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox