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

Commit7cadaac

Browse files
committed
Refer to replication origin roident as "ID" in user facing messages and docs
The table column that stores this is of type oid, but is actually limitedto uint16 and has a different path for creating new values. Some ofthe documentation already referred to it as an ID, so let's standardizeon that.While at it, most format strings already use %u, so for consintencychange the remaining stragglers using %d.Per suggestions from Tom Lane and Justin PryzbyDiscussion:https://www.postgresql.org/message-id/3437166.1659620465%40sss.pgh.pa.usBackpatch to v15
1 parent522ae01 commit7cadaac

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎doc/src/sgml/replication-origins.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
</para>
2828

2929
<para>
30-
Replication origins have just two properties, a name and anOID. The name,
30+
Replication origins have just two properties, a name and anID. The name,
3131
which is what should be used to refer to the origin across systems, is
3232
free-form <type>text</type>. It should be used in a way that makes conflicts
3333
between replication origins created by different replication solutions
3434
unlikely; e.g., by prefixing the replication solution's name to it.
35-
TheOID is used only to avoid having to store the long version
35+
TheID is used only to avoid having to store the long version
3636
in situations where space efficiency is important. It should never be shared
3737
across systems.
3838
</para>

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ replorigin_create(const char *roname)
316316
if (tuple==NULL)
317317
ereport(ERROR,
318318
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
319-
errmsg("could not find free replication originOID")));
319+
errmsg("could not find free replication originID")));
320320

321321
heap_freetuple(tuple);
322322
returnroident;
@@ -352,7 +352,7 @@ replorigin_drop_guts(Relation rel, RepOriginId roident, bool nowait)
352352
if (nowait)
353353
ereport(ERROR,
354354
(errcode(ERRCODE_OBJECT_IN_USE),
355-
errmsg("could not drop replication origin withOID %d, in use by PID %d",
355+
errmsg("could not drop replication origin withID %u, in use by PID %d",
356356
state->roident,
357357
state->acquired_by)));
358358

@@ -396,7 +396,7 @@ replorigin_drop_guts(Relation rel, RepOriginId roident, bool nowait)
396396
*/
397397
tuple=SearchSysCache1(REPLORIGIDENT,ObjectIdGetDatum(roident));
398398
if (!HeapTupleIsValid(tuple))
399-
elog(ERROR,"cache lookup failed for replication origin withoid %u",
399+
elog(ERROR,"cache lookup failed for replication origin withID %u",
400400
roident);
401401

402402
CatalogTupleDelete(rel,&tuple->t_self);
@@ -473,7 +473,7 @@ replorigin_by_oid(RepOriginId roident, bool missing_ok, char **roname)
473473
if (!missing_ok)
474474
ereport(ERROR,
475475
(errcode(ERRCODE_UNDEFINED_OBJECT),
476-
errmsg("replication origin withOID %u does not exist",
476+
errmsg("replication origin withID %u does not exist",
477477
roident)));
478478

479479
return false;
@@ -925,7 +925,7 @@ replorigin_advance(RepOriginId node,
925925
{
926926
ereport(ERROR,
927927
(errcode(ERRCODE_OBJECT_IN_USE),
928-
errmsg("replication origin withOID %d is already active for PID %d",
928+
errmsg("replication origin withID %u is already active for PID %d",
929929
replication_state->roident,
930930
replication_state->acquired_by)));
931931
}
@@ -936,7 +936,7 @@ replorigin_advance(RepOriginId node,
936936
if (replication_state==NULL&&free_state==NULL)
937937
ereport(ERROR,
938938
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
939-
errmsg("could not find free replication state slot for replication origin withOID %u",
939+
errmsg("could not find free replication state slot for replication origin withID %u",
940940
node),
941941
errhint("Increase max_replication_slots and try again.")));
942942

@@ -1114,7 +1114,7 @@ replorigin_session_setup(RepOriginId node)
11141114
{
11151115
ereport(ERROR,
11161116
(errcode(ERRCODE_OBJECT_IN_USE),
1117-
errmsg("replication origin withOID %d is already active for PID %d",
1117+
errmsg("replication origin withID %u is already active for PID %d",
11181118
curstate->roident,curstate->acquired_by)));
11191119
}
11201120

@@ -1126,7 +1126,7 @@ replorigin_session_setup(RepOriginId node)
11261126
if (session_replication_state==NULL&&free_slot==-1)
11271127
ereport(ERROR,
11281128
(errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
1129-
errmsg("could not find free replication state slot for replication origin withOID %u",
1129+
errmsg("could not find free replication state slot for replication origin withID %u",
11301130
node),
11311131
errhint("Increase max_replication_slots and try again.")));
11321132
elseif (session_replication_state==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp