Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5d0c2d5

Browse files
committed
Remove logical_read_local_xlog_page
It devolved into a content-less wrapper over read_local_xlog_page, withnothing to add, plus it's easily confused with walsender'slogical_read_xlog_page. There doesn't seem to be any reason for it tostay.src/include/replication/logicalfuncs.h becomes empty, so remove it too.The prototypes it initially had were absorbed by generated fmgrprotos.h.Discussion:https://postgr.es/m/20191115214102.GA15616@alvherre.pgsql
1 parentbcd1c36 commit5d0c2d5

File tree

4 files changed

+5
-34
lines changed

4 files changed

+5
-34
lines changed

‎src/backend/replication/logical/logicalfuncs.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include"nodes/makefuncs.h"
2929
#include"replication/decode.h"
3030
#include"replication/logical.h"
31-
#include"replication/logicalfuncs.h"
3231
#include"replication/message.h"
3332
#include"storage/fd.h"
3433
#include"utils/array.h"
@@ -105,14 +104,6 @@ check_permissions(void)
105104
errmsg("must be superuser or replication role to use replication slots")));
106105
}
107106

108-
int
109-
logical_read_local_xlog_page(XLogReaderState*state,XLogRecPtrtargetPagePtr,
110-
intreqLen,XLogRecPtrtargetRecPtr,char*cur_page)
111-
{
112-
returnread_local_xlog_page(state,targetPagePtr,reqLen,
113-
targetRecPtr,cur_page);
114-
}
115-
116107
/*
117108
* Helper function for the various SQL callable logical decoding functions.
118109
*/
@@ -242,7 +233,7 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo fcinfo, bool confirm, bool bin
242233
ctx=CreateDecodingContext(InvalidXLogRecPtr,
243234
options,
244235
false,
245-
logical_read_local_xlog_page,
236+
read_local_xlog_page,
246237
LogicalOutputPrepareWrite,
247238
LogicalOutputWrite,NULL);
248239

‎src/backend/replication/slotfuncs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
#include"access/htup_details.h"
1616
#include"access/xlog_internal.h"
17+
#include"access/xlogutils.h"
1718
#include"funcapi.h"
1819
#include"miscadmin.h"
1920
#include"replication/decode.h"
2021
#include"replication/logical.h"
21-
#include"replication/logicalfuncs.h"
2222
#include"replication/slot.h"
2323
#include"utils/builtins.h"
2424
#include"utils/inval.h"
@@ -152,7 +152,7 @@ create_logical_replication_slot(char *name, char *plugin,
152152
ctx=CreateInitDecodingContext(plugin,NIL,
153153
false,/* just catalogs is OK */
154154
restart_lsn,
155-
logical_read_local_xlog_page,NULL,NULL,
155+
read_local_xlog_page,NULL,NULL,
156156
NULL);
157157

158158
/*
@@ -424,7 +424,7 @@ pg_logical_replication_slot_advance(XLogRecPtr moveto)
424424
ctx=CreateDecodingContext(InvalidXLogRecPtr,
425425
NIL,
426426
true,/* fast_forward */
427-
logical_read_local_xlog_page,
427+
read_local_xlog_page,
428428
NULL,NULL,NULL);
429429

430430
/*

‎src/backend/replication/walsender.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
#include"replication/basebackup.h"
7171
#include"replication/decode.h"
7272
#include"replication/logical.h"
73-
#include"replication/logicalfuncs.h"
7473
#include"replication/slot.h"
7574
#include"replication/snapbuild.h"
7675
#include"replication/syncrep.h"
@@ -759,7 +758,7 @@ StartReplication(StartReplicationCmd *cmd)
759758
/*
760759
* read_page callback for logical decoding contexts, as a walsender process.
761760
*
762-
* Inside the walsender we can do better thanlogical_read_local_xlog_page,
761+
* Inside the walsender we can do better thanread_local_xlog_page,
763762
* which has to do a plain sleep/busy loop, because the walsender's latch gets
764763
* set every time WAL is flushed.
765764
*/

‎src/include/replication/logicalfuncs.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp