Re: [BDR] Best practice to automatically abort a DDL operation when one node is down
В списке pgsql-general по дате отправления:
| От | Sylvain MARECHAL |
|---|---|
| Тема | Re: [BDR] Best practice to automatically abort a DDL operation when one node is down |
| Дата | |
| Msg-id | 569CA2BE.9040406@gmail.com обсуждение исходный текст |
| Ответ на | Re: [BDR] Best practice to automatically abort a DDL operation when one node is down (Craig Ringer <craig@2ndquadrant.com>) |
| Список | pgsql-general |
What is the best practice to make sure the DDL operation will fail, possibly after a timeout, if one of the node is down?statement_timeout
I could check the state of the node before issuing the DDL operation, but this solution is far from being perfect as the node may fail right after this.Correct, but it's still useful to do.I'd check to see all nodes are connected in pg_stat_replication then I'd issue the DDL with a statement_timeout set.
bdr.bdr_test_remote_connectback(peer_dsn, local_dsn), getting the dsn from the bdr.bdr_nodes table; but using the pg_stat_replication table is problably quicker and simpler.В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера