Generate the valid snapshot during creation of for the purpose of taking pg_dump with --snapshot option

From: Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org, pgsql-in-general(at)postgresql(dot)org, Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Koichi Suzuki <koichi(dot)dbms(at)gmail(dot)com>
Subject: Generate the valid snapshot during creation of for the purpose of taking pg_dump with --snapshot option
Date: 2024-09-15 11:44:58
Message-ID: CAJCZko+_R35ss00YjSaTqqk++UOvmMqbmEn63kGTDzFs0W81gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-in-general

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

Browse pgsql-general by date

  From Date Subject
Next Message Durgamahesh Manne 2024-09-15 16:43:13 Regarding snapshot generation during creation of logical slot in pgsql14
Previous Message Alban Hertroys 2024-09-15 11:22:41 Re: re-novice coming back to pgsql: porting an SQLite update statement to postgres

Browse pgsql-in-general by date

  From Date Subject
Next Message Durgamahesh Manne 2024-09-15 16:43:13 Regarding snapshot generation during creation of logical slot in pgsql14
Previous Message Durgamahesh Manne 2024-09-12 20:04:40 pglogical selective child replication between different partition interval tables