From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor query cancellation code into src/fe_utils/
Date: Mon, 02 Dec 2019 02:21:05 +0000
Message-ID: <E1ibbKj-00048D-JM@gemulon.postgresql.org> (raw)
Refactor query cancellation code into src/fe_utils/
Originally, this code was duplicated in src/bin/psql/ and
src/bin/scripts/, but it can be useful for other frontend applications,
like pgbench. This refactoring offers the possibility to setup a custom
callback which would get called in the signal handler for SIGINT or when
the interruption console events happen on Windows.
Author: Fabien Coelho, with contributions from Michael Paquier
Reviewed-by: Álvaro Herrera, Ibrar Ahmed
Discussion: https://postgr.es/m/alpine.DEB.2.21.1910311939430.27369@lancre
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/a4fd3aa719e8f97299dfcf1a8f79b3017e2b8d8b
Modified Files
--------------
src/bin/psql/command.c | 1 +
src/bin/psql/common.c | 187 +++++------------------------------
src/bin/psql/common.h | 5 +-
src/bin/psql/large_obj.c | 7 +-
src/bin/psql/startup.c | 2 +-
src/bin/scripts/clusterdb.c | 2 +-
src/bin/scripts/common.c | 147 ---------------------------
src/bin/scripts/common.h | 7 +-
src/bin/scripts/reindexdb.c | 2 +-
src/bin/scripts/vacuumdb.c | 2 +-
src/fe_utils/Makefile | 1 +
src/fe_utils/cancel.c | 225 ++++++++++++++++++++++++++++++++++++++++++
src/include/fe_utils/cancel.h | 30 ++++++
src/tools/msvc/Mkvcbuild.pm | 2 +-
14 files changed, 294 insertions(+), 326 deletions(-)
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-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Refactor query cancellation code into src/fe_utils/
In-Reply-To: <E1ibbKj-00048D-JM@gemulon.postgresql.org>
References: <E1ibbKj-00048D-JM@gemulon.postgresql.org>
* 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