[HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive

Поиск
Список
Период
Сортировка
От Peter van Hardenberg
Тема [HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive
Дата
Msg-id CABTbUpiAOKZ405uArt8cJFtC72RhzthmvWETQK_6Qw0Ad-HquQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Re: [HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Defaulting psql to ON_ERROR_ROLLBACK=interactive  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
All,

Ads and I were talking over breakfast about usability issues and he mentioned transaction cancellation during interactive sessions as a serious pain point.

I suggest we update the default of ON_ERROR_ROLLBACK to interactive for 10.0. 

The last discussion I could find about this subject was in 2011 and while there was concern about setting the default to "on" (as this would tamper with the expected behaviour of scripts), I don't see any identification of a problem that would be caused by setting it to "interactive" by default.


It's quite clear to me that the current default behaviour costs the world serious pain and heart-ache on a daily basis. I myself have made this mistake in the middle of a long transaction (as my former colleague Will describes in the previous thread) and I can only imagine others have as well.

A few preemptive rejoinders to the obvious objections:

- We shouldn't optimize for people who make mistakes.

It may well be that you don't make mistakes, but I do, and I expect I am hardly the less competent person using Postgres, so we should design our system accordingly.

- Anyone who wants this can set it in their .psqlrc already.

Most people won't know about .psqlrc, and even fewer will set it. Worse, by the time you realize you don't have it set, it will be too late to do anything about.

If folks are comfortable with this change, I'll provide a patch for the current commitfest.

--
Peter van Hardenberg
San Francisco, California
"Everything was beautiful, and nothing hurt."—Kurt Vonnegut

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Backend crash on non-exclusive backup cancel
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Partitioned tables and relfilenode