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 1pTXg5-0007Lv-6n for pgsql-general@arkaria.postgresql.org; Sun, 19 Feb 2023 00:35:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pTXg2-0008Da-KG for pgsql-general@arkaria.postgresql.org; Sun, 19 Feb 2023 00:35:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pTXg1-0008Ce-Uu for pgsql-general@lists.postgresql.org; Sun, 19 Feb 2023 00:35:38 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pTXfv-0003wj-F3 for pgsql-general@lists.postgresql.org; Sun, 19 Feb 2023 00:35:36 +0000 Received: by mail-pj1-x1029.google.com with SMTP id qe12-20020a17090b4f8c00b002349579949aso1633281pjb.5 for ; Sat, 18 Feb 2023 16:35:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aIgiqVndCm9Sb8FvAHq8AVxnrJGp0QNu1TTU6mokLw4=; b=JrMPiFA5DwhV7t+u+r5xsrL5OIw9r57c7Svx4LRlIqeaC5ENT5ZmQRd9pPJYqKGV3G RrEto8T71wX8Ppaa5ENxLxYHd5CS1wwWMifWXAgMcv/iKFY6+ZyovZ5eAuhhKWscj0So AIuP83SylBlH6MILb9U9TidvIhWHZcAZczgWQWH+kVkwfwk6FOXz8CO4devXRZOnsoIz QWa/58Kl7Vd6w1ay+GQ5suqm8etU4/96X+p+Hia8eHDblwuvE8+58QUqGiwIQfxxWPX4 ip85SDRvspj9Hs6kDPTHiYLWS67+Qb35hV06GdmPbUoEVhfy5bYfpw7FV58QVKHzSodi T7bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aIgiqVndCm9Sb8FvAHq8AVxnrJGp0QNu1TTU6mokLw4=; b=xAe585gC+zrLEG6Su4SD5dw81OKHq/BgnH/FWDBIH1lRe6+sR26PYl9PFV2xiS3NUa iF8htK1EY0TYxBa++DCEDnFqmdYAkoeB5a4oPP/p4Mm4vaZH3UBrAbrdBbx+DzOD4CWv l8RxJQVN3ez6diSvQCJAPzTZ11AzqSPbPemo/y/vGTo76PwIQOZ6Rel5TP7dFXAtDG76 1ioS2hJMbdL+ubfxUIbXOg6fLc+J005EsORck2ESeP3o/2eXYjmunWGOb01h2FIEwQmh s13j48gh4WhB3Pz8BmI6nSbatdAFB3ko/f0zQgvflaPT2SgJDi/woGibevJMrKa1lkNx 7AGA== X-Gm-Message-State: AO0yUKWhdmTnpAUkffbnl7Ik3SlXfSIF8txRfVW+bM5bQkbj7KLAQWwb PrFq39BRRnw0FFmmmoevN5U= X-Google-Smtp-Source: AK7set9KZVLDWjaog6FJzt7YHU3sGZqtTU/d0LDtjaOgJEPvqVqTikfFhXPgajCYxTgOOl+EU5vbxQ== X-Received: by 2002:a17:903:228d:b0:19b:33c0:4091 with SMTP id b13-20020a170903228d00b0019b33c04091mr2413775plh.52.1676766930341; Sat, 18 Feb 2023 16:35:30 -0800 (PST) Received: from jrouhaud (2001-b011-1006-f543-2d15-7e56-08b9-e3b1.dynamic-ip6.hinet.net. [2001:b011:1006:f543:2d15:7e56:8b9:e3b1]) by smtp.gmail.com with ESMTPSA id 17-20020a170902c21100b00199190b00efsm5199772pll.97.2023.02.18.16.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Feb 2023 16:35:29 -0800 (PST) Date: Sun, 19 Feb 2023 08:35:27 +0800 From: Julien Rouhaud To: Bryn Llewellyn Cc: pgsql-general list Subject: Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode? Message-ID: <20230219003527.wbcpbsmupnyfzedq@jrouhaud> References: <954ABE4C-C17B-4269-ACAD-DE47E696515E@yugabyte.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <954ABE4C-C17B-4269-ACAD-DE47E696515E@yugabyte.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Sat, Feb 18, 2023 at 03:49:26PM -0800, Bryn Llewellyn wrote: > > But it's not clear who actually implements the opening "start transaction" > and the closing "commit" around every submitted SQL statement when autocommit > is "on". > > Is this done in client-side code (maybe implying three round trips per > intended SQL statement)? Or is it done server-side? It's always done on the client side, postgres itself doesn't know about this feature.