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 1tpUNa-006NhW-7o for pgsql-general@arkaria.postgresql.org; Tue, 04 Mar 2025 15:40:22 +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 1tpUNZ-000l5a-18 for pgsql-general@arkaria.postgresql.org; Tue, 04 Mar 2025 15:40: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 1tpULV-000eIx-71 for pgsql-general@lists.postgresql.org; Tue, 04 Mar 2025 15:38:13 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tpULR-000vKA-0P for pgsql-general@lists.postgresql.org; Tue, 04 Mar 2025 15:38:12 +0000 Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-726819aa3fcso3275122a34.0 for ; Tue, 04 Mar 2025 07:38:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741102688; x=1741707488; 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=EscQRTiJJasVRPfQ2nWAAnkFEoLZh/RA35qhnDyFTag=; b=lZNi05LNQosAnUQYthBNPPq9Kv3FhpDnwErOJq/Rv/36nMct8e3XE0SHdeTJJAdciE bIyaWSt/dEWl5j4oLjYiOir+aV1RkGrF77aUOImKDMaO0ie9MrUpymcRuNOtrIwX4QKc DWWSDARdo94yyN6/QXZVJ0QEYnON6+26bplOeD9MUON8FdBFP3vANU8dX3PvJgts8jAc +Pa5VFt4XnF3j36UI6HDN++iBL4S+cfP8zEmq0zu/RRbSXsmXnOA4Lc2f2V30q7uXKIo 5SOi2TIM1J7ttL0Vfkx/fiu12eC4fjuIyqqawWRFMoagx8PYKQ8uXw414J3J1MhHQQau obEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741102688; x=1741707488; 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=EscQRTiJJasVRPfQ2nWAAnkFEoLZh/RA35qhnDyFTag=; b=uhWIxLrHro00ttTPjVsyCj0f1iZxAlt5PADLk19k14Xhjntn9f9q+L3aAwTH7WzTc4 hZp1g826Q0I96dhnUHtOtDu02yb7Z8jACRBtTmXu48zEGvr+ZNmyMJ9Mz7L3q/0IM3hv cIZ3YvJUXHPKXJ64xzmjJZBtH+Wt5KKtOsHYESfg/mlmaKnMyTwEfOGP6PZg7Np2RHFN FYbVTXiKmqsjox9vIVAkFkO9B9Kh+3vrEOdQQZ9BEXbtw7adEurKWtC7k1Y934B9FQT0 /Y16AZCarXGT/bNfTW6S/udOSjGev3rtsUgWGPx9hBZrzpKLfp91kVZ/IHAyys6QBJQP xAgg== X-Forwarded-Encrypted: i=1; AJvYcCXYSKF+VZQm9obnvb7UwjmiL7aZhmaCHe1h/NzoAmYlzGrlw0qk15jUj+m224iXpFcbPh8fD+Y/adi8phx8@lists.postgresql.org X-Gm-Message-State: AOJu0Yxczz00qaR0JE6DTL8PYebHxVyPa2H/UiRhk//yIGvlCeSJkt6O kzXoCUSqdstpsNuK4KQevip4A18A5CXrBM7WBzuzdPLsEQrIoVZ77xxylRRB9R8UsduVP70gIyi aVMhE83v4FmBU7aYJvy6+zryv+3U= X-Gm-Gg: ASbGnct53/fY3pcUGuGj903DsBgNb5u3FfvGxCV+KVpP0+ks//AvcwBaNqLWlT9siQT v/gQJUQR8H6PRsp9J23t7NUrcNnEDU//GihTMGc3ip5WngZzFaqsXeu+iHGpd1EiEpz8o5gt9Bg wzBRq/eEPPk461Fz4ew8mF1p1h X-Google-Smtp-Source: AGHT+IE5AswJ843CFVHMAIZF5rWWvlfObZaZfvW7ulAqrPYTfVC4Zu2gnispGudiHgJH1z9rpSxhoFzzE5sphjL9NyI= X-Received: by 2002:a05:6830:6f09:b0:727:23ec:c3d8 with SMTP id 46e09a7af769-728b82ab87emr11070266a34.16.1741102688456; Tue, 04 Mar 2025 07:38:08 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ac9:7a88:0:b0:589:13f9:e937 with HTTP; Tue, 4 Mar 2025 07:38:07 -0800 (PST) In-Reply-To: References: From: "David G. Johnston" Date: Tue, 4 Mar 2025 08:38:07 -0700 X-Gm-Features: AQ5f1JqVbjyPEVURAGqKOPI-cE_we1AaUSpRPHzXF6uo8mIf2VTdNRXxVv8mxsQ Message-ID: Subject: Re: Review my steps for rollback to restore point To: chandan Kumar Cc: Laurenz Albe , "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000435ad4062f860f92" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000435ad4062f860f92 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, March 4, 2025, chandan Kumar wrote: > Thank you for your time and clarification. > Does PITR recreate database internally ? can i say it is not the same as > pg_restore or it is same as pg_restore plus applying WAL on top of it. = I > am asking because can we revern DDL operations without PITR in streaming > replication > PostgreSQL doesn=E2=80=99t have a concept of =E2=80=9Crevert=E2=80=9D. PITR just deals with raw bytes on disk for an entire cluster. If a new file appears in the WAL that file is created. That file can be a directory for a database. You cannot mix physical and logical images of the database so applying WAL on top of pg_restore is technically invalid - but it does effective convey the idea. It=E2=80=99s like saying pg_dump and pg_basebackup are similar. = Sure, in some ways that is true - but the logical vs. physical distinction cannot be ignored fully. David J. --000000000000435ad4062f860f92 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, March 4, 2025, chandan Kumar <chandan.issyoga@gmail.com> wrote:
Thank you for your time and clarification.= =C2=A0
Does PITR recreate database internally ?=C2=A0 can i say it is n= ot the same as pg_restore=C2=A0 or it is same as pg_restore plus applying W= AL on top of it.=C2=A0 I am asking because can we revern DDL operations wit= hout PITR in streaming replication

<= div>PostgreSQL doesn=E2=80=99t have a concept of =E2=80=9Crevert=E2=80=9D.<= /div>

PITR just deals with raw bytes on disk for an enti= re cluster.=C2=A0 If a new file appears in the WAL that file is created.=C2= =A0 That file can be a directory for a database.

Y= ou cannot mix physical and logical images of the database so applying WAL o= n top of pg_restore is technically invalid - but it does effective convey t= he idea.=C2=A0 It=E2=80=99s like saying pg_dump and pg_basebackup are simil= ar.=C2=A0 Sure, in some ways that is true - but the logical vs. physical di= stinction cannot be ignored fully.

David J.
<= div>
--000000000000435ad4062f860f92--