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

Commitcfddb5d

Browse files
committed
Improve errhint() about replication slot naming restrictions.
The existing hint talked about "may only contain letters", but theactual requirement is more strict: only lower case letters are allowed.Reported-By: Rushabh LathiaAuthor: Rushabh LathiaDiscussion: AGPqQf2x50qcwbYOBKzb4x75sO_V3g81ZsA8+Ji9iN5t_khFhQ@mail.gmail.comBackpatch: 9.4-, where replication slots were added
1 parent7285d66 commitcfddb5d

File tree

2 files changed

+2
-2
lines changed
  • contrib/test_decoding/expected
  • src/backend/replication

2 files changed

+2
-2
lines changed

‎contrib/test_decoding/expected/ddl.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ERROR: replication slot "regression_slot" already exists
1212
-- fail because of an invalid name
1313
SELECT 'init' FROM pg_create_logical_replication_slot('Invalid Name', 'test_decoding');
1414
ERROR: replication slot name "Invalid Name" contains invalid character
15-
HINT: Replication slot names may only contain letters, numbers, and the underscore character.
15+
HINT: Replication slot names may only containlower caseletters, numbers, and the underscore character.
1616
-- fail twice because of an invalid parameter values
1717
SELECT 'init' FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', 'frakbar');
1818
ERROR: could not parse value "frakbar" for parameter "include-xids"

‎src/backend/replication/slot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ ReplicationSlotValidateName(const char *name, int elevel)
195195
(errcode(ERRCODE_INVALID_NAME),
196196
errmsg("replication slot name \"%s\" contains invalid character",
197197
name),
198-
errhint("Replication slot names may only contain letters, numbers, and the underscore character.")));
198+
errhint("Replication slot names may only containlower caseletters, numbers, and the underscore character.")));
199199
return false;
200200
}
201201
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp