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 1spneB-004Sep-IE for pgsql-in-general@arkaria.postgresql.org; Sun, 15 Sep 2024 11:42:32 +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 1spneA-00Gsh3-JN for pgsql-in-general@arkaria.postgresql.org; Sun, 15 Sep 2024 11:42:30 +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 1spneA-00Gsgv-CJ for pgsql-in-general@lists.postgresql.org; Sun, 15 Sep 2024 11:42:30 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1spne3-001IzF-4I for pgsql-in-general@postgresql.org; Sun, 15 Sep 2024 11:42:29 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5c42c3aac99so1125310a12.1 for ; Sun, 15 Sep 2024 04:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726400542; x=1727005342; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=MOSEfwnzEnUpuWJFdiuNFpMLOvyDVgojSr3VyZzYMII=; b=eon4jZTn5Ew5Kkz5CwbPxKbrCnyH9NYAwAWas3zi9b9m/0vOsGQWfvP1nX0Jl42E9d S6P39+yhw7Bw0efCgt1BJNBbYAgYakd6G37PxSMb0AieG2ihLf55Hnc8+Dg2/icURHNq /RZHgBPqL3jtzamSlR3wHnjVE3Ki/AM4guXwKXPGMBX8x1sd7HQ1FlP0+gYljwRkBlsg Y5URzVvPHO1uW+QlhVIZJn5G9OVbzAx5OAvPdU6jqxQHGrWenzTCfcuL8jzDhPUOa8oL FEY1KCJRRSu8hbuJzk1ahwmBLULfkJB5wJ+FDOsC+ch6zyr+lEqocr89Eo2Mglmj3qI7 3Lkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726400542; x=1727005342; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=MOSEfwnzEnUpuWJFdiuNFpMLOvyDVgojSr3VyZzYMII=; b=EercsNJ336HKvK6rYn6tqfMERjhOfivSGEsdAMGcfGM6TXoS/HyKdbiE/vVIQFascJ t0TsN9rerKsUNuEZF+le/6fvYpzHxoPzIQFqnh/wY4OClzj2K5n+ycY0a0SFzKIVluqS GLjrec5gZ9Wv9Kagz0WxDd6so5XSmaDWCWoU7A8BxMgHcL92BJdLqT0N6s/LTD2XZeQO JRcroCac7szPXePrJoRaOezkYx01ID92yxp+mkBzWRcK0pQUoTlzcwyFHDh8BJankJGx RUsl4lLFhDTSMSUKrL/lKW+1gMvbXGPAaSQEDIpMUC0Rz8/3yLHABKEvRMvLJA+FqtXB cdhQ== X-Forwarded-Encrypted: i=1; AJvYcCXc/ThrIFK0YYhFxW0tLVKWMDGAPWr7mnelmFyibn7oRMoPINJcB2KleedFkkdxJENfVeVxeGdf7UxmLcqCiT92@postgresql.org X-Gm-Message-State: AOJu0YwiHXpG5kPA6wUberDD+A3SBEbzVzJGqBsOxIw6XmzRJ45z8yM2 5lwN78oBnbPDVRfyri6I0/tkXZSazU1JVrMZDPjPpqfM2q95FaWWDBW4nip8Kwox5sbvwjvBarc CEYZvbxl55P6j1JUxgG8dciZqhcM= X-Google-Smtp-Source: AGHT+IEvkUaBERG9FS/IW85KEcFKrXfv7bHnWXuc1k2bdisKFzmcgSqE8SUtBkhBHomOJCwUxkQyPDTAFmxfd4FnhtM= X-Received: by 2002:a05:6402:901:b0:5c2:5f43:3e8 with SMTP id 4fb4d7f45d1cf-5c41e0968f3mr12410592a12.9.1726400541963; Sun, 15 Sep 2024 04:42:21 -0700 (PDT) MIME-Version: 1.0 From: Durgamahesh Manne Date: Sun, 15 Sep 2024 17:14:58 +0530 Message-ID: Subject: Generate the valid snapshot during creation of for the purpose of taking pg_dump with --snapshot option To: pgsql-general@lists.postgresql.org, pgsql-in-general@postgresql.org, Greg Sabino Mullane , Koichi Suzuki Content-Type: multipart/alternative; boundary="0000000000000b3b27062226f35b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000000b3b27062226f35b Content-Type: text/plain; charset="UTF-8" Hi pgdg team How to generate snapshot_name for required slot on latest versions of postgresql Below is the generated slot and snapshot info on postgres 10 osdb_lsr=# CREATE_REPLICATION_SLOT lsr_sync_01 LOGICAL pgoutput; slot_name | consistent_point | snapshot_name | output_plugin -------------+------------------+---------------------+--------------- lsr_sync_01 | 0/C000110 | 00000003-00000002-1 | pgoutput (1 row) But the same way i could not able to generate on pgsql 14 Here archiving=> select pg_create_logical_replication_slot('pgsql','pgoutput'); pg_create_logical_replication_slot ------------------------------------ (pgsql,3080/12DD6468) archiving=> select pg_export_snapshot(); pg_export_snapshot --------------------- 000000C7-015658E6-1 (1 row) in this case pg_dump fails with invalid snapshot identifier when i use it as --snapshot= 000000C7-015658E6-1 in pg_dump command line Need to generate valid snapshot for required slot in order to take backup Regards, Durga Mahesh --0000000000000b3b27062226f35b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi pgdg team

How to generate snapshot_n= ame for required slot on latest=C2=A0versions of postgresql=C2=A0

Below is the generated slot and snapshot info on postgres 1= 0
osdb_lsr=3D# CREATE_REPLICATION_SLOT lsr_sync_01 LOGICAL pgo= utput; slot_name | consistent_point | snapshot_name | output_plugin -------------+------------------+---------------------+--------------- lsr_sync_01 | 0/C000110 | 00000003-00000002-1 | pgoutput (1 row) But the same way i could not able to generate on pgsql 14=C2=A0
Here archiving=3D> select pg_create_logical_replication_slot('= pgsql','pgoutput');
=C2=A0pg_create_logical_replication_sl= ot
------------------------------------
=C2=A0(pgsql,3080/12DD6468)

archiving=3D> select pg_export_snapshot();
=C2= =A0pg_export_snapshot
---------------------
=C2=A0000000C7-015658E6-1=
(1 row)=C2=A0
in this case pg_dump fails with invalid snapshot ident= ifier when i use it as=C2=A0--snapshot=3D=C2=A0000000C7-015658E6-= 1 in pg_dump command line=C2=A0

Need to generate v= alid snapshot for required slot in order to take backup=C2=A0
Regards,
Durga Mahesh=C2=A0
--0000000000000b3b27062226f35b--