pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF 5+ messages / 1 participants [nested] [flat]
* pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF @ 2019-11-24 19:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2019-11-24 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. This patch ensures that, if any notify messages were received during a just-finished transaction, they get sent to the frontend just before not just after the ReadyForQuery message. With libpq and other client libraries that act similarly, this guarantees that the client will see the notify messages as available as soon as it thinks the transaction is done. This probably makes no difference in practice, since in realistic use-cases the application would have to cope with asynchronous arrival of notify events anyhow. However, it makes it a lot easier to build cross-session-notify test cases with stable behavior. I'm a bit surprised now that we've not seen any buildfarm instability with the test cases added by commit b10f40bf0. Tests that I intend to add in an upcoming bug fix are definitely unstable without this. Back-patch to 9.6, which is as far back as we can do NOTIFY testing with the isolationtester infrastructure. Discussion: https://postgr.es/m/13881.1574557302@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7900269724424b6deca516eba3dd8e4bf6621bea Modified Files -------------- src/backend/commands/async.c | 12 +++++++----- src/backend/tcop/postgres.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF @ 2019-11-24 19:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2019-11-24 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. This patch ensures that, if any notify messages were received during a just-finished transaction, they get sent to the frontend just before not just after the ReadyForQuery message. With libpq and other client libraries that act similarly, this guarantees that the client will see the notify messages as available as soon as it thinks the transaction is done. This probably makes no difference in practice, since in realistic use-cases the application would have to cope with asynchronous arrival of notify events anyhow. However, it makes it a lot easier to build cross-session-notify test cases with stable behavior. I'm a bit surprised now that we've not seen any buildfarm instability with the test cases added by commit b10f40bf0. Tests that I intend to add in an upcoming bug fix are definitely unstable without this. Back-patch to 9.6, which is as far back as we can do NOTIFY testing with the isolationtester infrastructure. Discussion: https://postgr.es/m/13881.1574557302@sss.pgh.pa.us Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c47f498c93f9ebbb44cd03cf82f817da15761350 Modified Files -------------- src/backend/commands/async.c | 12 +++++++----- src/backend/tcop/postgres.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF @ 2019-11-24 19:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2019-11-24 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. This patch ensures that, if any notify messages were received during a just-finished transaction, they get sent to the frontend just before not just after the ReadyForQuery message. With libpq and other client libraries that act similarly, this guarantees that the client will see the notify messages as available as soon as it thinks the transaction is done. This probably makes no difference in practice, since in realistic use-cases the application would have to cope with asynchronous arrival of notify events anyhow. However, it makes it a lot easier to build cross-session-notify test cases with stable behavior. I'm a bit surprised now that we've not seen any buildfarm instability with the test cases added by commit b10f40bf0. Tests that I intend to add in an upcoming bug fix are definitely unstable without this. Back-patch to 9.6, which is as far back as we can do NOTIFY testing with the isolationtester infrastructure. Discussion: https://postgr.es/m/13881.1574557302@sss.pgh.pa.us Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/377d1b95bfeb969c0525f4949868005051dcd511 Modified Files -------------- src/backend/commands/async.c | 12 +++++++----- src/backend/tcop/postgres.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF @ 2019-11-24 19:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2019-11-24 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. This patch ensures that, if any notify messages were received during a just-finished transaction, they get sent to the frontend just before not just after the ReadyForQuery message. With libpq and other client libraries that act similarly, this guarantees that the client will see the notify messages as available as soon as it thinks the transaction is done. This probably makes no difference in practice, since in realistic use-cases the application would have to cope with asynchronous arrival of notify events anyhow. However, it makes it a lot easier to build cross-session-notify test cases with stable behavior. I'm a bit surprised now that we've not seen any buildfarm instability with the test cases added by commit b10f40bf0. Tests that I intend to add in an upcoming bug fix are definitely unstable without this. Back-patch to 9.6, which is as far back as we can do NOTIFY testing with the isolationtester infrastructure. Discussion: https://postgr.es/m/13881.1574557302@sss.pgh.pa.us Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dbe15524becb0d1366e9421aabdf85f538001942 Modified Files -------------- src/backend/commands/async.c | 12 +++++++----- src/backend/tcop/postgres.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF @ 2019-11-24 19:43 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2019-11-24 19:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. This patch ensures that, if any notify messages were received during a just-finished transaction, they get sent to the frontend just before not just after the ReadyForQuery message. With libpq and other client libraries that act similarly, this guarantees that the client will see the notify messages as available as soon as it thinks the transaction is done. This probably makes no difference in practice, since in realistic use-cases the application would have to cope with asynchronous arrival of notify events anyhow. However, it makes it a lot easier to build cross-session-notify test cases with stable behavior. I'm a bit surprised now that we've not seen any buildfarm instability with the test cases added by commit b10f40bf0. Tests that I intend to add in an upcoming bug fix are definitely unstable without this. Back-patch to 9.6, which is as far back as we can do NOTIFY testing with the isolationtester infrastructure. Discussion: https://postgr.es/m/13881.1574557302@sss.pgh.pa.us Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/111298aa65339a91c513c42ac2ea3eb6d343d0ea Modified Files -------------- src/backend/commands/async.c | 12 +++++++----- src/backend/tcop/postgres.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2019-11-24 19:43 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-11-24 19:43 pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF Tom Lane <tgl@sss.pgh.pa.us> 2019-11-24 19:43 pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF Tom Lane <tgl@sss.pgh.pa.us> 2019-11-24 19:43 pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF Tom Lane <tgl@sss.pgh.pa.us> 2019-11-24 19:43 pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF Tom Lane <tgl@sss.pgh.pa.us> 2019-11-24 19:43 pgsql: Stabilize NOTIFY behavior by transmitting notifies before ReadyF Tom Lane <tgl@sss.pgh.pa.us>
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