Add two missing tests in 035_standby_logical_decoding.pl

Поиск
Список
Период
Сортировка
От Drouvot, Bertrand
Тема Add two missing tests in 035_standby_logical_decoding.pl
Дата
Msg-id 2fefa454-5a70-2174-ddbf-4a0e41537139@gmail.com
обсуждение исходный текст
Ответы Re: Add two missing tests in 035_standby_logical_decoding.pl  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
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  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
hi hackers,

In the logical decoding on standby thread [1], Andres proposed 2 new tests (that I did
not find the time to complete before the finish line):

- Test that we can subscribe to the standby (with the publication created on the primary)
- Verify that invalidated logical slots do not lead to retaining WAL

Please find those 2 missing tests in the patch proposal attached.

A few words about them:

1) Regarding the subscription test:

It modifies wait_for_catchup() to take into account the case where the requesting
node is in recovery mode. Indeed, without that change, wait_for_subscription_sync() was
failing with:

"
error running SQL: 'psql:<stdin>:1: ERROR:  recovery is in progress
HINT:  WAL control functions cannot be executed during recovery.'
while running 'psql -XAtq -d port=61441 host=/tmp/45dt3wqs2p dbname='postgres' -f - -v ON_ERROR_STOP=1' with sql
'SELECTpg_current_wal_lsn()'
 
"

2) Regarding the WAL file not retained test:

As it's not possible to execute pg_switch_wal() and friends on a standby, this is
done on the primary. Also checking that the WAL file (linked to a restart_lsn of an invalidate
slot) has been removed is done directly at the os/directory level.

The attached patch also removes:

"
-log_min_messages = 'debug2'
-log_error_verbosity = verbose
"

as also discussed in [1].

I'm not sure if adding those 2 tests should be considered as an open item. I can add this open item
if we think that makes sense. I'd be happy to do so but it looks like I don't have the privileges
to edit https://wiki.postgresql.org/wiki/PostgreSQL_16_Open_Items

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

[1]: https://www.postgresql.org/message-id/6d801661-e21b-7326-be1b-f90d904da66a%40gmail.com
Вложения

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

Предыдущее
От: David Kimura
Дата:
Сообщение: Re: Unexpected (wrong?) result querying boolean partitioned table with NULL partition
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCH] Allow Postgres to pick an unused port to listen