Re: Movement of restart_lsn position movement of logical replication slots is very slow

2021-01-12 Thread Amit Kapila
On Tue, Jan 12, 2021 at 9:15 AM Jammie wrote: > > Hi Amit, > Thanks for the response . > Can you please let me know what pg_current_wal_lsn returns ? > > is this position the LSN of the next log record to be created, or is it the > LSN of the last log record already created and inserted in the lo

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2021-01-11 Thread Jammie
Hi Amit, Thanks for the response . Can you please let me know what pg_current_wal_lsn returns ? is this position the LSN of the next log record to be created, or is it the LSN of the last log record already created and inserted in the log? The document says - it returns current WAL write location

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-24 Thread Amit Kapila
On Thu, Dec 24, 2020 at 7:30 PM Jammie wrote: > > Sorry dont have the debug setup handy. However the sql commands now works > though to move the restart_lsn of the slots in standlone code from psql. > > A few followup questions. > > What is catalog_xmin in the pg_replication_slots ? and how is i

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-24 Thread Jammie
Sorry dont have the debug setup handy. However the sql commands now works though to move the restart_lsn of the slots in standlone code from psql. A few followup questions. What is catalog_xmin in the pg_replication_slots ? and how is it playing role in moving the restart_lsn of the slot. I am

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-23 Thread Amit Kapila
On Wed, Dec 23, 2020 at 7:06 PM Jammie wrote: > > Thanks Amit for the response. > Two things : > 1) In our observation via PSQL the advance command as well do not move the > restart_lsn immediately. It is similar to our approach that use the > confirmed_flush_lsn via stream > 2) I am ok to under

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-23 Thread Jammie
However when the situation comes and that one slot gets behind it never recovers and no way to recover from this situation even after reading using advance ro pg_logical_get_changes sql command. On Wed, Dec 23, 2020 at 7:05 PM Jammie wrote: > Thanks Amit for the response. > Two things : > 1) In

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-23 Thread Jammie
Thanks Amit for the response. Two things : 1) In our observation via PSQL the advance command as well do not move the restart_lsn immediately. It is similar to our approach that use the confirmed_flush_lsn via stream 2) I am ok to understand the point that we are not reading from the stream so we m

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-15 Thread Amit Kapila
On Tue, Dec 15, 2020 at 11:00 AM Jammie wrote: > > Thanks Amit for the response > > We are using pgJDBC sample program here > https://jdbc.postgresql.org/documentation/head/replication.html > > the setFlushLSN is coming from the pgJDBC only. > > git hub for APIs of pgJDBC methods available. > > ht

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-14 Thread Jammie
Thanks Amit for the response We are using pgJDBC sample program here https://jdbc.postgresql.org/documentation/head/replication.html the setFlushLSN is coming from the pgJDBC only. git hub for APIs of pgJDBC methods available. https://github.com/pgjdbc/pgjdbc The second slot refers to "private

Re: Movement of restart_lsn position movement of logical replication slots is very slow

2020-12-14 Thread Amit Kapila
On Mon, Dec 14, 2020 at 9:30 AM Jammie wrote: > > Hello, > > We have two logical replication slots in our postgresql database (version-11) > instance and we are using pgJDBC to stream data from these two slots. > IIUC, you are using some out-of-core outputplugin to stream the data? Are you using