Re: pg_xlogfile_name_offset() et al and recovery
| От | Amit Langote |
|---|---|
| Тема | Re: pg_xlogfile_name_offset() et al and recovery |
| Дата | |
| Msg-id | b1d81f71-faf6-5fa2-b647-aa9097f94428@lab.ntt.co.jp обсуждение исходный текст |
| Ответ на | pg_xlogfile_name_offset() et al and recovery (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
| Ответы |
Re: pg_xlogfile_name_offset() et al and recovery
|
| Список | pgsql-hackers |
On 2016/05/19 17:34, Amit Langote wrote:
> Currently in HEAD and 9.6, one can issue a non-exclusive backup on
> standby, so this is OK:
>
> select pg_is_in_recovery();
> pg_is_in_recovery
> -------------------
> t
> (1 row)
>
> select pg_start_backup('sby-bkp-test', 'f', 'f');
> pg_start_backup
> -----------------
> 0/5000220
> (1 row)
>
> However the following happens:
>
> select pg_xlogfile_name_offset(pg_start_backup('sby-bkp-test', 'f', 'f'));
> ERROR: recovery is in progress
> HINT: pg_xlogfile_name_offset() cannot be executed during recovery.
>
> Should this restriction be relaxed or am I missing something?
Answering my own question:
While reading the thread "BUG #14230: Wrong timeline returned by
pg_stop_backup on a standby", I came to know that ThisTimelineId is
invalid on standby. And because pg_xlogfile_name_offset() uses the same
to compute its result, it makes sense to prevent it from being used on a
standby.
Thanks,
Amit
В списке pgsql-hackers по дате отправления: