Specifying both recovery_target_xid and recovery_target_time

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Specifying both recovery_target_xid and recovery_target_time
Дата
Msg-id 52CD70D8.5000605@vmware.com
обсуждение исходный текст
Ответы Re: Specifying both recovery_target_xid and recovery_target_time  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Specifying both recovery_target_xid and recovery_target_time  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
The docs say:

> At most one of recovery_target_time, recovery_target_name or recovery_target_xid can be specified

However, the code actually allows them all to be specified at the same time:

>         else if (strcmp(item->name, "recovery_target_name") == 0)
>         {
>             /*
>              * if recovery_target_xid specified, then this overrides
>              * recovery_target_name
>              */
>             if (recoveryTarget == RECOVERY_TARGET_XID)
>                 continue;
>             recoveryTarget = RECOVERY_TARGET_NAME;

The precedence is XID, time, name.

I think the documented behavior would make more sense, ie. throw an 
error if you try to specify multiple targets. Anyone remember if that 
was intentional? Any objections to change the code to match the docs, in 
master?

- Heikki



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Bug in visibility map WAL-logging
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Specifying both recovery_target_xid and recovery_target_time