Re: BUG #15598: PostgreSQL Error Code is not reported when connectionterminated due to idle-in-transaction timeout

Поиск
Список
Период
Сортировка
От Marcin Barczyński
Тема Re: BUG #15598: PostgreSQL Error Code is not reported when connectionterminated due to idle-in-transaction timeout
Дата
Msg-id CAP3o3PdzM0BLmNBELA5wV6YoN_1yYBVdoOvz9kYbOuK-YQGFAw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15598: PostgreSQL Error Code is not reported when connection terminated due to idle-in-transaction timeout  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #15598: PostgreSQL Error Code is not reported when connection terminated due to idle-in-transaction timeout  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-bugs
On Fri, Jan 18, 2019 at 5:45 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> This is not the default appearance of psql error reports.
> I'd venture that you are setting VERBOSITY=verbose in your
> environment, perhaps in ~/.psqlrc.  If you want the same
> behavior on your Windows machine, you need to do that there too.

Unfortunately, it's not the problem of verbosity.
The error code is printed properly in case of duplicate key violation. It seems that something is wrong with idle-in-transaction timeout on Windows:

postgres=# \set VERBOSITY verbose
postgres=# SET idle_in_transaction_session_timeout=500;
SET
postgres=# BEGIN;
BEGIN
postgres=# SELECT * FROM pg_class;
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
postgres=# CREATE TABLE demo (key BIGINT PRIMARY KEY);
CREATE TABLE
postgres=# INSERT INTO demo VALUES (1);
INSERT 0 1
postgres=# INSERT INTO demo VALUES (1);
ERROR:  23505: duplicate key value violates unique constraint "demo_pkey"
DETAIL:  Key (key)=(1) already exists.
SCHEMA NAME:  public
TABLE NAME:  demo
CONSTRAINT NAME:  demo_pkey
LOCATION:  _bt_check_unique, nbtinsert.c:433


Best regards,
Marcin

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: BUG #15598: PostgreSQL Error Code is not reported when connection terminated due to idle-in-transaction timeout