Re: TAP test for recovery_end_command

Euler Taveira <euler@eulerto.com>

From: "Euler Taveira" <euler@eulerto.com>
To: "Amul Sul" <sulamul@gmail.com>
Cc: "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-13T15:09:20Z
Lists: 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
EDB   https://www.enterprisedb.com/

Commits

  1. Add TAP test for archive_cleanup_command and recovery_end_command