Re: TAP test for recovery_end_command

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "Amul Sul" <sulamul(at)gmail(dot)com>
Cc: "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: TAP test for recovery_end_command
Date: 2021-09-13 15:09:20
Message-ID: 23f5e16b-4a7b-4663-8709-023a4fc60da7@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-09-13 15:43:09 Re: Skipping logical replication transactions on subscriber side
Previous Message Nitin Jadhav 2021-09-13 15:02:54 Re: when the startup process doesn't (logging startup delays)