pg_xlogfile_name_offset() et al and recovery

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_xlogfile_name_offset() et al and recovery
Date: 2016-05-19 08:34:53
Message-ID: 573D7AAD.2060101@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Thanks,
Amit

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Johansson 2016-05-19 09:53:01 PostgreSQL and inherits
Previous Message Tsunakawa, Takayuki 2016-05-19 06:08:29 Re: foreign table batch inserts