Re: [HACKERS] psql - add special variable to reflect the last query status

Поиск
Список
Период
Сортировка
Искать
От
Pavel Stehule
Тема
Re: [HACKERS] psql - add special variable to reflect the last query status
Дата
Msg-id
CAFj8pRDKxFqGWjFr+UJjUsJ4R8kA2i8vB_TymxdPozB6tew+jg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Re: [HACKERS] psql - add special variable to reflect the last query status Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] psql - add special variable to reflect the last querystatus Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] psql - add special variable to reflect the last querystatus Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] psql - add special variable to reflect the last query status Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] psql - add special variable to reflect the last query status Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] psql - add special variable to reflect the last query status Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] psql - add special variable to reflect the last query status Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] psql - add special variable to reflect the last querystatus Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] psql - add special variable to reflect the last query status Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] psql - add special variable to reflect the last querystatus Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] psql - add special variable to reflect the last querystatus Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] psql - add special variable to reflect the last query status Pavel Stehule <pavel.stehule@gmail.com>
Re: [HACKERS] psql - add special variable to reflect the last query status Pavel Stehule <pavel.stehule@gmail.com>
Hi

2017-09-06 11:14 GMT+02:00 Fabien COELHO <coelho@cri.ensmp.fr>:

Here is a version 6.

Small v7 update, sorry for the noise.

Add testing the initial state of all variables.

Fix typos in a comment in tests.

Fix the documentation wrt the current implementation behavior.

I rechecked last patch

There is not any issue with patching. All regress tests passed

I checked performance - the most fast queries are execution of simple prepared statement

prepare x as select 1;
-- 1000000 x
execute x;
execute x;
execute x;
execute x;

## patched
[pavel@nemesis postgresql]$ time psql -At -1 postgres -f ~/xxx.sql > /dev/null

real 0m44,887s
user 0m11,703s
sys 0m6,942s

This is probably the most worst case, what is possible and see some slowdown - in this case there is about 10% slowdown - 

but it is pretty untypical - the one query was less than 50 microsec. When there will be any IO activity or network usage, than this patch doesn't create any significant overhead.

I'll mark this patch as ready for commiter

Regards

Pavel
 


--
Fabien.

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Pavel Stehule
Дата:
FAQ