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
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers