1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-14 08:21:07 +03:00
Files
postgres/src/backend/access
Peter Eisentraut 21f428ebde Don't call data type input functions in GUC check hooks
Instead of calling pg_lsn_in() in check_recovery_target_lsn and
timestamptz_in() in check_recovery_target_time, reorganize the
respective code so that we don't raise any errors in the check hooks.
The previous code tried to use PG_TRY/PG_CATCH to handle errors in a
way that is not safe, so now the code contains no ereport() calls and
can operate safely within the GUC error handling system.

Moreover, since the interpretation of the recovery_target_time string
may depend on the time zone, we cannot do the final processing of that
string until all the GUC processing is done.  Instead,
check_recovery_target_time() now does some parsing for syntax
checking, but the actual conversion to a timestamptz value is done
later in the recovery code that uses it.

Reported-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/flat/20190611061115.njjwkagvxp4qujhp%40alap3.anarazel.de
2019-06-30 10:27:43 +02:00
..
2019-05-22 13:04:48 -04:00
2019-06-03 13:44:03 +09:00
2019-06-27 15:57:14 +02:00
2019-06-23 22:19:59 +12:00
2019-05-22 12:55:34 -04:00
2019-06-19 14:59:26 +02:00
2019-05-22 13:04:48 -04:00