server-11.0.alpha20240611-x86-64 обновленный до Sisyphus Версии: postgresql15-pgpool-II-4.2.19-alt1.x86_64 postgresql15-15.8-alt3.x86_64 postgresql-common-1.0-alt9.noarch postgresql15-server-15.8-alt3.x86_64 Шаги воспроизведения: 1. Настроить pgpool. Например, 2 ноды - primary и standy. Убедиться, что они корректно запущены и статус ОК: # pcp_node_info -n 0 -U postgres -h localhost --verbose Password: Hostname : <host0-ip> Port : 5432 Status : 2 Weight : 0.500000 Status Name : up Role : primary Replication Delay : 0 Replication State : Replication Sync State : Last Status Change : 2024-10-17 15:02:17 # pcp_node_info -n 1 -U postgres -h localhost --verbose Password: Hostname : <host1-ip> Port : 5432 Status : 2 Weight : 0.500000 Status Name : up Role : standby Replication Delay : 27007272 Replication State : Replication Sync State : Last Status Change : 2024-10-17 15:02:17 2. Создать базу для репликации: # psql -U postgres -p 9999 -c "CREATE DATABASE test_db;" 3. Попытаться добавить таблицу в созданную базу test_db: # psql -U postgres -p 9999 -d test_db -c "CREATE TABLE test_table (id int, name varchar);" Ожидаемый результат: таблица добавилась успешно Реальный результат: # psql -U postgres -p 9999 -d test_db -c "CREATE TABLE test_table (id int, name varchar);" psql: ошибка: подключиться к серверу через сокет "/tmp/.s.PGSQL.9999" не удалось: ERROR: unable to read message kind ПОДРОБНОСТИ: kind does not match between main(53) slot[1] (45) В journalctl: окт 17 15:13:21 server-11-0-alpha20240611-x86-64-minimal-20241017.localdomain pgpool[8245]: 2024-10-17 15:13:21: pid 8245: LOG: pool_read_kind: error message from 1 th backend:база данных "test_db" не существует окт 17 15:13:21 server-11-0-alpha20240611-x86-64-minimal-20241017.localdomain pgpool[8245]: 2024-10-17 15:13:21: pid 8245: ERROR: unable to read message kind окт 17 15:13:21 server-11-0-alpha20240611-x86-64-minimal-20241017.localdomain pgpool[8245]: 2024-10-17 15:13:21: pid 8245: DETAIL: kind does not match between main(53) slot[1] (45) При этом фактически БД существует: # psql -p 9999 -U postgres -l | grep test_db test_db | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | Доп: аналогичное поведение и с другими версиями postgress postgresql1*-pgpool-II
Можете привести описание процедуры развертывания pgpool по которой вы следовали?
Проверил на конфигурации postgresql15-15.8-alt1.x86_64 postgresql15-pgpool-II-4.5.4-alt1.x86_64 postgresql15-server-15.8-alt1.x86_64 стенд из отдельной виртуалки с pgpool и двумя нодами с postgres с репликацией между ними. После поднятия репликации и настройки pgpool такая картина. нода с pgpool: psql -U postgres -h localhost -p 9999 postgres Пароль пользователя postgres: psql (15.8) Введите "help", чтобы получить справку. postgres=# create database test; CREATE DATABASE postgres=# \c test Вы подключены к базе данных "test" как пользователь "postgres". test=# create table t (f1 int); CREATE TABLE test=# \dt Список отношений Схема | Имя | Тип | Владелец --------+-----+---------+---------- public | t | таблица | postgres (1 строка) test=# insert into t values (1); INSERT 0 1 test=# insert into t values (2); INSERT 0 1 test=# insert into t values (3); INSERT 0 1 test=# select * from t; f1 ---- 1 2 3 (3 строки) test=# нода мастер pg-node1: # psql -U postgres -l Пароль пользователя postgres: Список баз данных Имя | Владелец | Кодировка | LC_COLLATE | LC_CTYPE | локаль ICU | Провайдер локали | Права дос тупа -----------+----------+-----------+-------------+-------------+------------+------------------+-------------- --------- postgres | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | template0 | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | =c/postgres + | | | | | | | postgres=CTc/ postgres template1 | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | =c/postgres + | | | | | | | postgres=CTc/ postgres test | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | (4 строки) [root@pg-node1 base]# psql -U postgres test Пароль пользователя postgres: psql (15.8) Введите "help", чтобы получить справку. test=# \dt Список отношений Схема | Имя | Тип | Владелец --------+-----+---------+---------- public | t | таблица | postgres (1 строка) test=# select * from t; f1 ---- 1 2 3 (3 строки) test=# нода реплика pg-node2: # psql -U postgres -l Пароль пользователя postgres: Список баз данных Имя | Владелец | Кодировка | LC_COLLATE | LC_CTYPE | локаль ICU | Провайдер локали | Права дос тупа -----------+----------+-----------+-------------+-------------+------------+------------------+-------------- --------- postgres | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | template0 | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | =c/postgres + | | | | | | | postgres=CTc/ postgres template1 | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | =c/postgres + | | | | | | | postgres=CTc/ postgres test | postgres | UTF8 | ru_RU.UTF-8 | ru_RU.UTF-8 | | libc | (4 строки) [root@pg-node2 base]# psql -U postgres test Пароль пользователя postgres: psql (15.8) Введите "help", чтобы получить справку. test=# \dt Список отношений Схема | Имя | Тип | Владелец --------+-----+---------+---------- public | t | таблица | postgres (1 строка) test=# select * from t; f1 ---- 1 2 3 (3 строки) test=# Похоже, что по какой-то причине у вас не работает репликация между мастером и репликой, что непосредственно к pgpool отношения не имеет.