Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s35pz-009L0Q-Bf for pgsql-general@arkaria.postgresql.org; Sat, 04 May 2024 03:13:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s35pw-00EPCX-G7 for pgsql-general@arkaria.postgresql.org; Sat, 04 May 2024 03:13:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s35pw-00EPCO-5Z for pgsql-general@lists.postgresql.org; Sat, 04 May 2024 03:13:21 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s35pu-001RRm-Cb for pgsql-general@lists.postgresql.org; Sat, 04 May 2024 03:13:20 +0000 Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6ee2fda66easo148344a34.3 for ; Fri, 03 May 2024 20:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714792397; x=1715397197; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=A7+sC8cwY2EkA2xlLqv96MPIbQbC/ro6GDT8D9UIbEo=; b=c7dPe3WKoqrXJlP7cs60psZp68F0Aab+MYPkV8iApzh79wx6tDMD/3KX9IqFAaqCim S9UKOkbNlgzSCfOxBDInf7+lsgKMw82BVuuriJB5G4TiEbr45r/yO81VPx72vyErNroo x1+wVYhi3TjamWuJcuNIMmSgkSDSR1MW8uPomo09LplsMUUydpe7i5oJhPLtL/Pr0DZk d7drt4euQEwBkSc0cdp6D8ywgPkBXKL4/kuDefwpsZzz2I/LCBi7+FAKcxQYKc6BUg31 /QqL5fc6rYuOHcVEZ6KCreeT90RhqAMtIC6/4pJ/3igXGh5UA8a1D3Jrz6yz4h2uI+WD bs3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714792397; x=1715397197; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A7+sC8cwY2EkA2xlLqv96MPIbQbC/ro6GDT8D9UIbEo=; b=pr9fGiS3zvv6X5SKwvTowfi82q+a3ULD9Helrdvh7hr2dORR0i/yyOm2DH57zntVfI /KHliCriZqAoKOBE7u8+yRmPMDTccSd0uU/IWIQU7kh2w78ieSLxOiu+sU9SB0rELUqe 0yMqMIEH9K9rxz0zzWqBQ+/21g8kf5xdAZsPNYs4ZYQtinbLdJ/kmMkaz+5uf9CJ+D5P MKUAssLchrnkUsl1IUjmIjLGIuig3oBu8CglPjg/ay0k8rE1ObnG6bvDcdAZksQoft/4 M5YwQd1e/L8k+I45OwfyIu00mzTYWBx8Ha1AXYFsqXc3GLPrCP7x6r64msKUQYbVHQeO 3Qtw== X-Gm-Message-State: AOJu0Ywzo8BDiQfA84Ulcq607/vu7d6dbOiL5a6bNBPwkXgqzNSa75bB gm2yiS8zVJR6zurMPyKZbZIEbrOdNoKqW1p9Y/z9gYWv2ouVsrzvwDWgElx5MC/79/Wfr44hE18 MkVb+GvhNJpdAhVzkvIp21ltwTI4ARg== X-Google-Smtp-Source: AGHT+IGYi94iIFvTatYPxlTQun4TazGcRDZc5M2ubu3sVq6s2Dd0eC/VjJFnTSoiV1xhhn0TihmltcTjA5OdJ/J48DQ= X-Received: by 2002:a05:6830:2059:b0:6ee:2326:1b48 with SMTP id f25-20020a056830205900b006ee23261b48mr5054800otp.37.1714792396798; Fri, 03 May 2024 20:13:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:5f0a:0:b0:52a:9016:8503 with HTTP; Fri, 3 May 2024 20:13:16 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Fri, 3 May 2024 20:13:16 -0700 Message-ID: Subject: Re: Question regarding how databases support atomicity To: Siddharth Jain Cc: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000acc45306179837c2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000acc45306179837c2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Friday, May 3, 2024, David G. Johnston wrote: > On Friday, May 3, 2024, Siddharth Jain wrote: > >> >> >> On Fri, May 3, 2024 at 8:00=E2=80=AFPM Siddharth Jain wrote: >> >>> >>> >>> The way I understand this is that if there is a failure in-between, we >>> start undoing and reverting the previous operations one by one. >>> >> > You need to ensure a =E2=80=9Cbegin=E2=80=9D happens before Step 1 and a = =E2=80=9Ccommit=E2=80=9D after > Step 3. > As described in our documentation. https://www.postgresql.org/docs/current/tutorial-transactions.html David J. --000000000000acc45306179837c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Friday, May 3, 2024, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Friday, May 3, 2024, Siddharth Jain <siddhsql@gmail.com> wrote:=


On Fri, May 3, 2024= at 8:00=E2=80=AFPM Siddharth Jain <siddhsql@gmail.com> wrote:


<= div>The way I understand this is that if there is a failure in-between, we = start undoing and reverting the previous operations one by one.
=

You need to ensure a = =E2=80=9Cbegin=E2=80=9D happens before Step 1 and a =E2=80=9Ccommit=E2=80= =9D after Step 3.

As described in= our documentation.


D= avid J.
--000000000000acc45306179837c2--