Fix inappropriate comments in function ReplicationSlotAcquire

Поиск
Список
Период
Сортировка
От Wei Wang (Fujitsu)
Тема Fix inappropriate comments in function ReplicationSlotAcquire
Дата
Msg-id OS3PR01MB6275E3CE4DC15FF8B8B80D3A9E7A2@OS3PR01MB6275.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответы Re: Fix inappropriate comments in function ReplicationSlotAcquire  (Amit Kapila <amit.kapila16@gmail.com>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: jian he
Дата:
Сообщение: Re: remaining sql/json patches
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: speed up a logical replica setup