pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Muehlhausen <jgm@jgm.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
Date: Mon, 20 Apr 2020 15:42:00 -0400
Message-ID: <14161.1587411720@sss.pgh.pa.us> (raw)
In-Reply-To: <CACk8hr6qGF78Vo7i7+mvgXqy3AMoOXAkxbCMbGwxwNOf9dpw2Q@mail.gmail.com>
References: <CACk8hr6At5fr7Qscy8LWT+oBs-_SYw1QvonsAU-6srYHsKuywg@mail.gmail.com>
	<CAKFQuwb4OS74dBshrvB9Zu9V5ik5W2+5ja-tD0ieEK7LwZKWRQ@mail.gmail.com>
	<CACk8hr6qGF78Vo7i7+mvgXqy3AMoOXAkxbCMbGwxwNOf9dpw2Q@mail.gmail.com>

John Muehlhausen <jgm@jgm.org> writes:
> Wrapping the notify in a transaction does not fix it.  Shouldn't the notify
> be available as soon as the containing transaction is committed?

A notify message will be sent to the client when the backend is
(a) idle (*not* in the middle of processing a transaction string) and
(b) not in an open transaction.

You appear to be unhappy with point (a), but I think changing that
would break more clients than it fixes.  It's intentional that
we don't send notifies mid-command, and this sure looks like a
variant of mid-command from here.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <14161.1587411720@sss.pgh.pa.us>
Permalink:  ../14161.1587411720@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14161.1587411720@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jgm@jgm.org, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
  In-Reply-To: <14161.1587411720@sss.pgh.pa.us>

* 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