Improve handling of ^C in psql / top-level transaction abort - Mailing list pgsql-hackers

From Jim Nasby
Subject Improve handling of ^C in psql / top-level transaction abort
Date
Msg-id d459f527-7ce1-f2ef-e027-85c629af6c0f@BlueTreble.com
Whole thread Raw
List pgsql-hackers
I recently had a client contact me thinking that a CREATE MATERIALIZED 
VIEW had somehow managed to keep running in the background after being 
^C'd in psql. Turns out this confusion was because their monitoring 
eventually complained about the still open (but now aborted) 
transaction. The user didn't realize that ^C of a command in an open 
transaction would still leave the transaction open.

I'm wondering if there's some way to improve this. One idea is if 
TBLOCK_INPROGRESS could also do some of what CleanupTransaction() does 
but still leave the status in TBLOCK_ABORT. In particular, release 
snapshots. Since there's no substransaction, there's no possibility of 
running further commands. Is there risk to that with portals still open?
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461



pgsql-hackers by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: Bogus ANALYZE results for an otherwise-unique column with many nulls
Next
From: Andres Freund
Date:
Subject: Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)