Postgresql: SQL запрос вызывает падение сервера

a.gogolev

New member
Сообщения
4
#1
Проблема точно такая же, как и в этом посте: https://forum.astralinux.ru/threads/2063/
Astra SE 1.6, установлен postgresql 9.6 (стандартный астровский), все конфиги тоже из коробки.
Выполняю SQL запрос к базе:
SQL:
COPY (SELECT * FROM event_2021_11) TO '/tmp/csv.csv' WITH HEADER CSV;
Падает сервер и получаю ошибку:
сервер неожиданно закрыл соединение
Скорее всего сервер прекратил работу из-за сбоя
до или в процессе выполнения запроса.
Подключение к серверу потеряно. Попытка восстановления неудачна.
В логах postgresql:
2021-11-04 16:22:47 MSK [11046-6] LOG: server process (PID 11195) was terminated by signal 11: Segmentation fault
2021-11-04 16:22:47 MSK [11046-7] DETAIL: Failed process was running: COPY (SELECT * FROM event_2021_11) TO '/tmp/csv.csv' WITH HEADER CSV;
2021-11-04 16:22:47 MSK [11046-8] LOG: terminating any other active server processes
2021-11-04 16:22:47 MSK [11234-1] postgres@vdi WARNING: terminating connection because of crash of another server process
2021-11-04 16:22:47 MSK [11234-2] postgres@vdi DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2021-11-04 16:22:47 MSK [11234-3] postgres@vdi HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-11-04 16:22:47 MSK [11197-1] vdi@vdi WARNING: terminating connection because of crash of another server process
2021-11-04 16:22:47 MSK [11197-2] vdi@vdi DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2021-11-04 16:22:47 MSK [11197-3] vdi@vdi HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-11-04 16:22:47 MSK [11231-1] vdi@vdi WARNING: terminating connection because of crash of another server process
2021-11-04 16:22:47 MSK [11231-2] vdi@vdi DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2021-11-04 16:22:47 MSK [11231-3] vdi@vdi HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-11-04 16:22:47 MSK [11052-2] WARNING: terminating connection because of crash of another server process
2021-11-04 16:22:47 MSK [11052-3] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2021-11-04 16:22:47 MSK [11052-4] HINT: In a moment you should be able to reconnect to the database and repeat your command.
2021-11-04 16:22:47 MSK [11046-9] LOG: all server processes terminated; reinitializing
2021-11-04 16:22:47 MSK [11235-1] LOG: database system was interrupted; last known up at 2021-11-04 16:21:16 MSK
2021-11-04 16:22:47 MSK [11235-2] LOG: database system was not properly shut down; automatic recovery in progress
2021-11-04 16:22:47 MSK [11235-3] LOG: redo starts at 0/173E820
2021-11-04 16:22:47 MSK [11235-4] LOG: invalid record length at 0/1791E98: wanted 24, got 0
2021-11-04 16:22:47 MSK [11235-5] LOG: redo done at 0/1791E60
2021-11-04 16:22:47 MSK [11235-6] LOG: last completed transaction was at log time 2021-11-04 16:21:46.882926+03
2021-11-04 16:22:47 MSK [11235-7] LOG: MultiXact member wraparound protections are now enabled
2021-11-04 16:22:47 MSK [11046-10] LOG: database system is ready to accept connections
2021-11-04 16:22:47 MSK [11239-1] LOG: autovacuum launcher started
Проводил диагностику через GDB - проблема та же, что и в выше упомянутом посте - pgac_chmac()

Подскажите, куда копать? На ubuntu/debian таких проблем не наблюдается...

P.S. при этом, если использовать в запросе имя таблицы, то ошибки не возникает:
SQL:
COPY table_name TO ...
 
Последнее редактирование: