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

Commitfdf81c9

Browse files
committed
pg_recvlogical.c code review.
Several comments still referred to 'initiating', 'freeing', 'stopping'replication slots. These were terms used during different phases ofthe development of logical decoding, but are no long accurate.Also rename StreamLog() to StreamLogicalLog() and add 'void' to theprototype.Author: Michael Paquier, with some editing by me.Backpatch to 9.4 where pg_recvlogical was introduced.
1 parent5fa6c81 commitfdf81c9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎src/bin/pg_basebackup/pg_recvlogical.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static XLogRecPtr output_written_lsn = InvalidXLogRecPtr;
5656
staticXLogRecPtroutput_fsync_lsn=InvalidXLogRecPtr;
5757

5858
staticvoidusage(void);
59-
staticvoidStreamLog();
59+
staticvoidStreamLogicalLog(void);
6060
staticvoiddisconnect_and_exit(intcode);
6161

6262
staticvoid
@@ -194,7 +194,7 @@ OutputFsync(int64 now)
194194
* Start the log streaming
195195
*/
196196
staticvoid
197-
StreamLog(void)
197+
StreamLogicalLog(void)
198198
{
199199
PGresult*res;
200200
char*copybuf=NULL;
@@ -868,15 +868,15 @@ main(int argc, char **argv)
868868

869869

870870
/*
871-
*stop a replication slot
871+
*drop a replication slot
872872
*/
873873
if (do_drop_slot)
874874
{
875875
charquery[256];
876876

877877
if (verbose)
878878
fprintf(stderr,
879-
_("%s:freeing replication slot \"%s\"\n"),
879+
_("%s:dropping replication slot \"%s\"\n"),
880880
progname,replication_slot);
881881

882882
snprintf(query,sizeof(query),"DROP_REPLICATION_SLOT \"%s\"",
@@ -892,8 +892,8 @@ main(int argc, char **argv)
892892
if (PQntuples(res)!=0||PQnfields(res)!=0)
893893
{
894894
fprintf(stderr,
895-
_("%s: could notstop logicalreplication: got %d rows and %d fields, expected %d rows and %d fields\n"),
896-
progname,PQntuples(res),PQnfields(res),0,0);
895+
_("%s: could notdropreplication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields\n"),
896+
progname,replication_slot,PQntuples(res),PQnfields(res),0,0);
897897
disconnect_and_exit(1);
898898
}
899899

@@ -902,15 +902,15 @@ main(int argc, char **argv)
902902
}
903903

904904
/*
905-
*init a replication slot
905+
*create a replication slot
906906
*/
907907
if (do_create_slot)
908908
{
909909
charquery[256];
910910

911911
if (verbose)
912912
fprintf(stderr,
913-
_("%s:initializing replication slot \"%s\"\n"),
913+
_("%s:creating replication slot \"%s\"\n"),
914914
progname,replication_slot);
915915

916916
snprintf(query,sizeof(query),"CREATE_REPLICATION_SLOT \"%s\" LOGICAL \"%s\"",
@@ -927,8 +927,8 @@ main(int argc, char **argv)
927927
if (PQntuples(res)!=1||PQnfields(res)!=4)
928928
{
929929
fprintf(stderr,
930-
_("%s: could notinit logicalreplication: got %d rows and %d fields, expected %d rows and %d fields\n"),
931-
progname,PQntuples(res),PQnfields(res),1,4);
930+
_("%s: could notcreatereplication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields\n"),
931+
progname,replication_slot,PQntuples(res),PQnfields(res),1,4);
932932
disconnect_and_exit(1);
933933
}
934934

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp