RE: Newly created replication slot may be invalidated by checkpoint - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Newly created replication slot may be invalidated by checkpoint
Date
Msg-id TY7PR01MB1455450692BE259E3E26C9480F597A@TY7PR01MB14554.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: Newly created replication slot may be invalidated by checkpoint  ("Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>)
Responses RE: Newly created replication slot may be invalidated by checkpoint
List pgsql-hackers
Dear Hou,

Thanks for updating the patch. Further comments.

01.
```
+#include "access/xlog.h"
```

I could build without the inclusion because "replication/logical.h" already
includes it. Can we remove or we should retain?

02.
Should we increase checkpoint_timeout for stabilizing tests?

03.
To confirm, you've removed the logic that checks the oldest segment and try
reserving, but it can be removed same as ReplicationSlotReserveWal(), right?
XLogGetOldestSegno() is also not needed anymore because race can't happen if standby have never discarded.

04.
```
$primary->psql('postgres',
    q{SELECT pg_create_logical_replication_slot('failover_slot', 'test_decoding', false, false, true);
     SELECT pg_create_physical_replication_slot('phys_slot');}
);
...
$primary->psql('postgres', "CHECKPOINT");
```

I found two lines use `psql()`, but should be `safe_psql()`.

05.
Per my tests, the issue exists till PG17 and your patch can be backpatched till
it, right?

Best regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH v1] Document pg_get_partition_constraintdef.
Next
From: wenhui qiu
Date:
Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples