Re: [HACKERS] pg_control_recovery() return value when not in recovery
От | Andres Freund |
---|---|
Тема | Re: [HACKERS] pg_control_recovery() return value when not in recovery |
Дата | |
Msg-id | 20170918062931.m7rkmaxvwhkts2rs@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: [HACKERS] pg_control_recovery() return value when not in recovery (Simon Riggs <simon@2ndquadrant.com>) |
Ответы |
Re: [HACKERS] pg_control_recovery() return value when not in recovery
Re: [HACKERS] pg_control_recovery() return value when not in recovery Re: [HACKERS] pg_control_recovery() return value when not in recovery |
Список | pgsql-hackers |
On 2017-09-18 07:24:43 +0100, Simon Riggs wrote: > On 18 September 2017 at 05:50, Andres Freund <andres@anarazel.de> wrote: > > 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) > > Yes, that would have made sense for these to be NULL Yea, that's what I think was well. Joe, IIRC that's your code, do you agree as well? > > postgres[14388][1]=# SELECT pg_is_in_recovery(); > > ┌───────────────────┐ > > │ pg_is_in_recovery │ > > ├───────────────────┤ > > │ f │ > > └───────────────────┘ > > (1 row) > > But not this, since it is a boolean and the answer is known. Oh, that was just for reference, to show that the cluster isn't in recovery... - Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: