Improve tests for recovery_target_timeline GUC.

Commit fd7d7b71913 added regression tests to verify recovery_target_timeline
settings. To confirm that invalid values are rejected, those tests started the
server with an invalid setting and then verified that startup failed. While
functionally correct, this approach was expensive because it required
setting up and starting the server for each test case.

This commit updates the tests for recovery_target_timeline to use
the simpler approach introduced by commit bffd7130 for recovery_target_xid,
using ALTER SYSTEM SET to verify that invalid settings are rejected.
This avoids the need to set up and start the server when checking invalid
recovery_target_timeline values.

Author: David Steele <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: 
https://postgr.es/m/CAHGQGwG44vZbSoBmg076G+xkR6n=Tj2=q+fvkfp7yesyf1d...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2007df43332b7c4d153bcd2153e32d5a76f7e3ac

Modified Files
--------------
src/test/recovery/t/003_recovery_targets.pl | 68 +++++++++--------------------
1 file changed, 20 insertions(+), 48 deletions(-)

Reply via email to