Re: Statement-level rollback

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Cc: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, MauMau <maumau307(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Statement-level rollback
Date: 2017-11-02 06:16:26
Message-ID: CAMsr+YFu+NXmXCX6BJOx=NKmVOOTNawc0RHTyUDXZG0fp6puXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On 2 November 2017 at 13:59, Vladimir Sitnikov
<sitnikov(dot)vladimir(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2017-11-02 06:16:44 Re: Statement-level rollback
Previous Message Satyanarayana Narlapuram 2017-11-02 06:02:43 Client Connection redirection support for PostgreSQL

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2017-11-02 06:16:44 Re: Statement-level rollback
Previous Message Vladimir Sitnikov 2017-11-02 05:59:31 Re: Statement-level rollback