Improve handling of ^C in psql / top-level transaction abort

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Improve handling of ^C in psql / top-level transaction abort
Дата
Msg-id d459f527-7ce1-f2ef-e027-85c629af6c0f@BlueTreble.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Bogus ANALYZE results for an otherwise-unique column with many nulls
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)