From: | "Wei Wang (Fujitsu)" <wangw(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Fix inappropriate comments in function ReplicationSlotAcquire |
Date: | 2024-01-25 09:26:42 |
Message-ID: | OS3PR01MB6275E3CE4DC15FF8B8B80D3A9E7A2@OS3PR01MB6275.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
In the function ReplicationSlotAcquire(), I found there is a missing in the
below comments:
```
/*
* Search for the slot with the specified name if the slot to acquire is
* not given. If the slot is not found, we either return -1 or error out.
*/
s = SearchNamedReplicationSlot(name, false);
if (s == NULL || !s->in_use)
{
LWLockRelease(ReplicationSlotControlLock);
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("replication slot \"%s\" does not exist",
name)));
}
```
It seems that when the slot is not found, we will only error out and will not
return -1. Attach the patch to remove the inappropriate description of return
value.
Regards,
Wang Wei
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Fix-inappropriate-comments-in-function-Replicatio.patch | application/octet-stream | 987 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-01-25 09:27:21 | Re: speed up a logical replica setup |
Previous Message | jian he | 2024-01-25 09:20:00 | Re: remaining sql/json patches |