Re: [HACKERS] Statement-level rollback - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] Statement-level rollback
Date
Msg-id CAMsr+YFu+NXmXCX6BJOx=NKmVOOTNawc0RHTyUDXZG0fp6puXw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Statement-level rollback  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-hackers
On 2 November 2017 at 13:59, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:

> The performance overhead for "SELECT" statement (no columns, just select)
> statement over localhost is 36±4 us vs 38±3 us (savepoint is pipelined along
> with user-provided query). That is network overhead is close to negligible.

Yep. Not for psqlODBC or other libpq-based drives that can't pipeline
queries though.

> In other words, "savepoint; insert;savepoint; insert;savepoint;
> insert;savepoint; insert;savepoint; insert;" would allocate xids and might
> blow up backend's memory.

RELEASE SAVEPOINT, like psqlODBC does.

> Adding protocol messages would blow pgbouncer, etc things, so it makes sense
> to refrain from new messages unless it is absolutely required.

Yeah, it'd affect proxies, true. But it'd let us get rid of a lot of
very ugly log spam too. And unlike some of the prior protocol tweaks
I've been interested in, it'd be client-initiated so it should be
pretty safe.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Satyanarayana Narlapuram
Date:
Subject: [HACKERS] Client Connection redirection support for PostgreSQL
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [HACKERS] Statement-level rollback