Re: [HACKERS] \set AUTOROLLBACK ON

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: [HACKERS] \set AUTOROLLBACK ON
Дата
Msg-id CAASwCXeVPiJnkKJTqDtyQAKw2EW+=5Gy+DAAdB9ZhyjJa=zVhw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] \set AUTOROLLBACK ON  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On Mon, Jun 26, 2017 at 9:35 PM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> We already have SET TRANSACTION READ ONLY.

But in my use-case I am OK with the query doing write operations,
since sometimes you need to test something in prod (that cannot be
tested easily locally) but you want to ROLLBACK the query as quickly
as possible to avoid locking things longer than necessary. Currently
I'm just manually appending "; rollback;" to the query to make sure
its rollbacked.

The best thing I can do today is to map some button on the keyboard to
automatically type "; rollback; [enter]" instead of hitting [enter] to
fire-off the query, but it would be nice if it was built-in psql so
you could never commit something by mistake unless you explicitly exit
the AUTOROLLBACK mode.



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Pluggable storage
Следующее
От: Albe Laurenz
Дата:
Сообщение: [HACKERS] Typo in comment in postgres_fdw.c