Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
Cc: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?
Date: 2023-02-19 00:43:00
Message-ID: 01B79A01-67D0-4D0B-A30F-9B9C2348342E@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Feb 18, 2023, at 15:49, Bryn Llewellyn <bryn(at)yugabyte(dot)com> wrote:
>
> Or is it done server-side?

It's done server-side. Note that what really happens is that, when a statement begins execution and there is no open transaction, a snapshot is taken and then released when the statement finishes (just as happens in READ COMMITTED mode). No piece of code literally injects a BEGIN and a COMMIT statement to make it happen.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 2023-02-19 00:51:33 Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?
Previous Message Julien Rouhaud 2023-02-19 00:35:27 Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?