RE: persist logical slots to disk during shutdown checkpoint

Поиск
Список
Период
Сортировка
От Hayato Kuroda (Fujitsu)
Тема RE: persist logical slots to disk during shutdown checkpoint
Дата
Msg-id TYAPR01MB586612783A24C51A16831713F5E0A@TYAPR01MB5866.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: persist logical slots to disk during shutdown checkpoint  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
Dear hackers,

I also tested for logical slots on the physical standby. PSA the script.
confirmed_flush_lsn for such slots were successfully persisted.

# Topology

In this test nodes are connected each other.

node1 --(physical replication)-->node2--(logical replication)-->node3

# Test method

An attached script did following steps

1. constructed above configurations
2. Inserted data on node1
3. read confirmed_flush_lsn on node2 (a)
4. restarted node2
5. read confirmed_flush_lsn again on node2 (b)
6. compare (a) and (b)

# result

Before patching, (a) and (b) were different value, which meant that logical
slots on physical standby were not saved at shutdown.

```
slot_name | confirmed_flush_lsn 
-----------+---------------------
 sub       | 0/30003E8
(1 row)

waiting for server to shut down.... done
server stopped
waiting for server to start.... done
server started
 slot_name | confirmed_flush_lsn 
-----------+---------------------
 sub       | 0/30000D8
(1 row)
```

After patching, (a) and (b) became the same value. The v4 patch worked well even
if the node is physical standby.

```
slot_name | confirmed_flush_lsn 
-----------+---------------------
 sub       | 0/30003E8
(1 row)

waiting for server to shut down.... done
server stopped
waiting for server to start.... done
server started
 slot_name | confirmed_flush_lsn 
-----------+---------------------
 sub       | 0/30003E8
(1 row)
```

Best Regards,
Hayato Kuroda
FUJITSU LIMITED


Вложения

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

Предыдущее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [PATCH v1] PQputCopyEnd never returns 0, fix the inaccurate comment
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: psql: show current user in prompt