From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, Joe Conway <mail(at)joeconway(dot)com> |
Subject: | pg_control_recovery() return value when not in recovery |
Date: | 2017-09-18 04:50:28 |
Message-ID: | 20170918045028.vlzr4x3nf5lzyk7t@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Just noticed that we're returning the underlying values for
pg_control_recovery() without any checks:
postgres[14388][1]=# SELECT * FROM pg_control_recovery();
┌──────────────────────┬───────────────────────────┬──────────────────┬────────────────┬───────────────────────────────┐
│ min_recovery_end_lsn │ min_recovery_end_timeline │ backup_start_lsn │ backup_end_lsn │ end_of_backup_record_required │
├──────────────────────┼───────────────────────────┼──────────────────┼────────────────┼───────────────────────────────┤
│ 0/0 │ 0 │ 0/0 │ 0/0 │ f │
└──────────────────────┴───────────────────────────┴──────────────────┴────────────────┴───────────────────────────────┘
(1 row)
postgres[14388][1]=# SELECT pg_is_in_recovery();
┌───────────────────┐
│ pg_is_in_recovery │
├───────────────────┤
│ f │
└───────────────────┘
(1 row)
Wouldn't it be more accurate to return NULLs here?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2017-09-18 04:53:18 | Re: Proposal: Improve bitmap costing for lossy pages |
Previous Message | Rafia Sabih | 2017-09-18 04:48:24 | Re: Partition-wise join for join between (declaratively) partitioned tables |