Re: TAP test for recovery_end_command - Mailing list pgsql-hackers

From Euler Taveira
Subject Re: TAP test for recovery_end_command
Date
Msg-id 23f5e16b-4a7b-4663-8709-023a4fc60da7@www.fastmail.com
Whole thread Raw
In response to Re: TAP test for recovery_end_command  (Amul Sul <sulamul@gmail.com>)
Responses Re: TAP test for recovery_end_command
List pgsql-hackers
On Mon, Sep 13, 2021, at 10:09 AM, Amul Sul wrote:
Yeah, added that test too. I triggered the restartpoint via a
CHECKPOINT command in the attached version.
+# archive_cleanup_command executed with every restart points
+ok( !-f "$archive_cleanup_command_file",
+ 'archive_cleanup_command not executed yet');

Why are you including a test whose result is known? Fresh cluster does
not contain archive_cleanup_command.done or recovery_end_command.done.

+# Checkpoint will trigger restart point on standby.
+$standby3->safe_psql('postgres', q{CHECKPOINT});
+ok(-f "$archive_cleanup_command_file",
+ 'archive_cleanup_command executed on checkpoint');

Is this test reliable?


--
Euler Taveira

pgsql-hackers by date:

Previous
From: Nitin Jadhav
Date:
Subject: Re: when the startup process doesn't (logging startup delays)
Next
From: Masahiko Sawada
Date:
Subject: Re: Skipping logical replication transactions on subscriber side