Fix a test case in 035_standby_logical_decoding.pl

Поиск
Список
Период
Сортировка
От Yu Shi (Fujitsu)
Тема Fix a test case in 035_standby_logical_decoding.pl
Дата
Msg-id OSZPR01MB6310B0A507A0F2A2D379F38CFD6A9@OSZPR01MB6310.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответы Re: Fix a test case in 035_standby_logical_decoding.pl  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Список pgsql-hackers
Hi hackers,

In 035_standby_logical_decoding.pl, I think that the check in the following test
case should be performed on the standby node, instead of the primary node, as
the slot is created on the standby node. The test currently passes because it
only checks the return value of psql. It might be more appropriate to check the
error message. Please see the attached patch.

```
$node_primary->safe_psql('postgres', 'CREATE DATABASE otherdb');

is( $node_primary->psql(
        'otherdb',
        "SELECT lsn FROM pg_logical_slot_peek_changes('behaves_ok_activeslot', NULL, NULL) ORDER BY lsn DESC LIMIT 1;"
    ),
    3,
    'replaying logical slot from another database fails');
```

The regress log:
psql:<stdin>:1: ERROR:  replication slot "behaves_ok_activeslot" does not exist
[11:23:21.859](0.086s) ok 8 - replaying logical slot from another database fails

Regards,
Shi Yu

Вложения

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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: pg_upgrade and logical replication
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Fix a test case in 035_standby_logical_decoding.pl