Re: Add two missing tests in 035_standby_logical_decoding.pl

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Add two missing tests in 035_standby_logical_decoding.pl
Дата
Msg-id CAA4eK1JeAZ9MUf3qPAOA5t9=e_vPJSEi6nZ3OygDYi-913eO+Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add two missing tests in 035_standby_logical_decoding.pl  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Add two missing tests in 035_standby_logical_decoding.pl  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Список pgsql-hackers
On Mon, Apr 24, 2023 at 11:54 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Mon, Apr 24, 2023 at 11:24 AM Drouvot, Bertrand
> <bertranddrouvot.pg@gmail.com> wrote:
> >
>
> Few comments:
> ============
>

+# We can not test if the WAL file still exists immediately.
+# We need to let some time to the standby to actually "remove" it.
+my $i = 0;
+while (1)
+{
+ last if !-f $standby_walfile;
+ if ($i++ == 10 * $default_timeout)
+ {
+ die
+   "could not determine if WAL file has been retained or not, can't continue";
+ }
+ usleep(100_000);
+}

Is this adhoc wait required because we can't guarantee that the
checkpoint is complete on standby even after using wait_for_catchup?
Is there a guarantee that it can never fail on some slower machines?

BTW, for the second test is it necessary that we first ensure that the
WAL file has not been retained on the primary?

--
With Regards,
Amit Kapila.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: duplicate function declaration in multirangetypes_selfuncs.c
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert