@@ -92,7 +92,7 @@ typedef struct ReplicationState
92
92
/*
93
93
* Lock protecting remote_lsn and local_lsn.
94
94
*/
95
- LWLock lock ;
95
+ /* LWLock lock;*/
96
96
} ReplicationState ;
97
97
98
98
static ReplicationState * session_replication_state = NULL ;
@@ -375,10 +375,8 @@ replorigin_session_get_progress(bool flush)
375
375
376
376
Assert (session_replication_state != NULL );
377
377
378
- LWLockAcquire (& session_replication_state -> lock , LW_SHARED );
379
378
remote_lsn = session_replication_state -> remote_lsn ;
380
379
local_lsn = session_replication_state -> local_lsn ;
381
- LWLockRelease (& session_replication_state -> lock );
382
380
383
381
if (flush && local_lsn != InvalidXLogRecPtr )
384
382
XLogFlush (local_lsn );
@@ -457,12 +455,10 @@ replorigin_session_advance(XLogRecPtr remote_commit, XLogRecPtr local_commit)
457
455
Assert (session_replication_state != NULL );
458
456
Assert (session_replication_state -> roident != InvalidRepOriginId );
459
457
460
- LWLockAcquire (& session_replication_state -> lock , LW_EXCLUSIVE );
461
458
if (session_replication_state -> local_lsn < local_commit )
462
459
session_replication_state -> local_lsn = local_commit ;
463
460
if (session_replication_state -> remote_lsn < remote_commit )
464
461
session_replication_state -> remote_lsn = remote_commit ;
465
- LWLockRelease (& session_replication_state -> lock );
466
462
467
463
replorigin_advance (session_replication_state -> roident , remote_commit ,
468
464
local_commit , false, true);
0 commit comments