Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbUza-00084T-3b for psycopg@arkaria.postgresql.org; Fri, 15 Oct 2021 21:43:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mbUzZ-00005v-0W for psycopg@arkaria.postgresql.org; Fri, 15 Oct 2021 21:43:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbUzY-00005l-PF for psycopg@lists.postgresql.org; Fri, 15 Oct 2021 21:43:52 +0000 Received: from mail-ed1-f54.google.com ([209.85.208.54]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mbUzV-0002mT-Fr for psycopg@postgresql.org; Fri, 15 Oct 2021 21:43:52 +0000 Received: by mail-ed1-f54.google.com with SMTP id t16so43112436eds.9 for ; Fri, 15 Oct 2021 14:43:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qUKMvrlwm/gatBF8L09HIRfth10pjtS5eHlh2Ws/XfU=; b=QZQn8SVmmiCJzHdctq6WyfdXUfzf8EyBdvYK0iOfCpoHy2PH2xkt3xFbuMn9usH5PH v3m44k0CUG2H4/mRhSeA41fVEtrnEcO+w2xHdIM3goCLAwrzyCqS0GkOqHsWjgaOcFMX 07maiR8lY6w1rVHRe9QZ8TIc9gKkL0f6mHg6xodHUWdqyxkOp2Pc+4ZelVhTQkxFRwjh DqWbSnxIS+U0S5Uw4Ewzw+JvAymkGOrQP1AY4QMZXMerbCWSJIftoRoPy5smHeAKUTxy PKZeuwrVsRHZJBVynGRe7OpU6vx8xcZaQnSv0oyo+cmyNsVlQmrThWRan9OHpyhKDzs+ QlBw== X-Gm-Message-State: AOAM532q1ZwXqwvsLhBpPvooOgwOmiNLvTToa6VPf9HICSO1fARRxtBq 94fGowIz8xNlIGISztGMGVx0vT+vwpBd1M8Mvxc= X-Google-Smtp-Source: ABdhPJxk4PqGC7oMQCmvRoT/np0NRa2o9n0BN2vnzmHVzbco2VWKGKb/QwfKQ07SMHyevMbMZe9Qt8eennpf1FHBnBg= X-Received: by 2002:a05:6402:2682:: with SMTP id w2mr21137467edd.185.1634334228345; Fri, 15 Oct 2021 14:43:48 -0700 (PDT) MIME-Version: 1.0 References: <9a99d2d110b121542d1ea0a05066858b@paolodestefani.it> <6683df3e65fe961aa478e61db7ad687d@paolodestefani.it> <77e106b39df5f9ce6fe30c4e7be2263e@paolodestefani.it> In-Reply-To: <77e106b39df5f9ce6fe30c4e7be2263e@paolodestefani.it> From: Daniel Fortunov Date: Fri, 15 Oct 2021 22:43:37 +0100 Message-ID: Subject: Re: psycopg3 transactions To: Daniele Varrazzo Cc: Psycopg , Paolo De Stefani Content-Type: multipart/alternative; boundary="0000000000001ff6cd05ce6b179e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001ff6cd05ce6b179e Content-Type: text/plain; charset="UTF-8" Looks good to me too. I like the progression from basic use, to connection context, to transaction context. Really nice logical progression into progressive levels of granular control. One thing I didn't understand was the wording of this suggestion: > > - > > use an autocommit connection: conn.autocommit = True, eventually as > connect() parameter too; > > Is this meant to convey: > > - > > use an autocommit connection: Set conn.autocommit = True (or you can > provide this as a connect() parameter); > > Or have I misunderstood? Dani On Fri, 15 Oct 2021 at 21:59, Paolo De Stefani wrote: > It seems much clearer to me now > This makes me think that maybe it's worth trying to use an autocommit > connection... > > Il 15/10/2021 12:56 Daniele Varrazzo ha scritto: > > On Wed, 13 Oct 2021 at 19:28, Daniele Varrazzo > > wrote: > > > >> Pretty much everyone comes from psycopg2, so we should definitely > >> improve the docs :D > > > > I have expanded the documentation about transaction behaviour. > > Feedback is welcome. > > > > https://www.psycopg.org/psycopg3/docs/basic/transactions.html > > > > Paolo, Daniel: I am especially keen to have your feedback as one > > newcomer and the other pretty much the authority in transaction > > management :) > > > > Cheers, > > > > -- Daniele > > -- > Paolo De Stefani > > > --0000000000001ff6cd05ce6b179e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Looks good to me too.

= I like the progression from basic use, to connection context, to transactio= n context. Really nice logical progression into progressive=C2=A0levels of = granular control.

One thing I didn't understan= d was the wording of this suggestion:
  • use an autocommit connection:= =C2=A0conn= .autocommit=C2=A0=3D=C2=A0True, eventually as=C2=A0connect()=C2=A0parameter too;


Is this meant to convey:
  • use an autocommit connect= ion: Set=C2=A0conn.autocommit=C2=A0=3D=C2=A0True=C2=A0(or you can provide this as= a=C2=A0connect()=C2=A0parameter);

    <= /li>

Or have I misunderstood?

Dani

On Fri, 15 Oct 2021 at 21:59, Paolo De Ste= fani <paolo@paolodestefani.it= > wrote:
= It seems much clearer to me now
This makes me think that maybe it's worth trying to use an autocommit <= br> connection...

Il 15/10/2021 12:56 Daniele Varrazzo ha scritto:
> On Wed, 13 Oct 2021 at 19:28, Daniele Varrazzo
> <da= niele.varrazzo@gmail.com> wrote:
>
>> Pretty much everyone comes from psycopg2, so we should definitely<= br> >> improve the docs :D
>
> I have expanded the documentation about transaction behaviour.
> Feedback is welcome.
>
> https://www.psycopg.org/psycopg3/d= ocs/basic/transactions.html
>
> Paolo, Daniel: I am especially keen to have your feedback as one
> newcomer and the other pretty much the authority in transaction
> management :)
>
> Cheers,
>
> -- Daniele

--
Paolo De Stefani


--0000000000001ff6cd05ce6b179e--