Generate the valid snapshot during creation of for the purpose of taking pg_dump with --snapshot option - Mailing list pgsql-general

From Durgamahesh Manne
Subject Generate the valid snapshot during creation of for the purpose of taking pg_dump with --snapshot option
Date
Msg-id CAJCZko+_R35ss00YjSaTqqk++UOvmMqbmEn63kGTDzFs0W81gw@mail.gmail.com
Whole thread Raw
List pgsql-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 

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: re-novice coming back to pgsql: porting an SQLite update statement to postgres
Next
From: Durgamahesh Manne
Date:
Subject: Regarding snapshot generation during creation of logical slot in pgsql14