Re: psql \watch versus \timing - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: psql \watch versus \timing
Date
Msg-id CAHGQGwFkww0P6g0nr7MdYa5hzvERRjDiaRfniwqXnxjman54nQ@mail.gmail.com
Whole thread Raw
In response to Re: psql \watch versus \timing  (Greg Stark <stark@mit.edu>)
Responses Re: psql \watch versus \timing
List pgsql-hackers
On Wed, Sep 3, 2014 at 10:56 PM, Greg Stark <stark@mit.edu> wrote:
> On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> OK, then as all the comments are basically addressed, here is an
>> updated patch correcting the comment problems mentioned by Heikki.

Thanks a lot!

> I just tried this and found it doesn't cooperate well with AUTOCOMMIT
> = 'off' and ON_ERROR_ROLLBACK = 'on'. Previously \watch would leave
> the transaction in a normal state after C-c but now it leaves the
> transaction in an aborted state. I assume it previously did a
> savepoint around each execution and now it's not doing that at all.

No. Previously \watch used PSQLexec and it doesn't use savepoint.
If you enter Ctrl-C while \watch is waiting for the query to end,
\watch would leave the transaction in an aborted state whether
the patch has been applied or not. OTOH, if you enter Ctrl-C while
\watch is sleeping, the transaction remains in normal state.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Alexey Klyukin
Date:
Subject: Re: Enable WAL archiving even in standby
Next
From: Robert Haas
Date:
Subject: Re: RLS Design