前提・実現したいこと
DBサーバを入れ替えることになり、PostgreSQLを9.3から10.0にあげDBを再構築したところ
これまで出なかったエラーが出るようになりました。
発生している問題・エラーメッセージ
message には
Feb 18 14:13:21 xxxxx02 kernel: postmaster[10247]: segfault at 0 ip 0000000000833523 sp 00007ffeb0a54fb0 error 4 in postgres[400000+67b000]
といったエラーが何度も表示され、その時のpostgreSQLのログを見てみると以下のようなログが残っています。
2019-02-18 14:13:21.839 JST [10237] LOG: server process (PID 10247) was terminated by signal 11: Segmentation fault 2019-02-18 14:13:21.839 JST [10237] DETAIL: Failed process was running: SELECT id FROM bibliographies WHERE request_bibliography_flag = false and hs_type = '000' and id in(SELECT bibliography_id FROM materials WHERE organization_id = 1 and status in('120','200','210','230','300','310','320','330','340') and separate_shelf_code in('B','S','R') and ((special_start_datetime <= '201902111052' and special_end_datetime >= '201902111052' and special_library_id in (10) ) or (transfer_start_datetime <= '201902111052' and transfer_end_datetime >= '201902111052' and transfer_library_id in (10) AND ((special_library_id IS NULL) OR (NOT(special_start_datetime <= '201902111052' and special_end_datetime >= '201902111052')) )) or (owner_library_id in (10) AND ((special_library_id IS NULL AND transfer_library_id IS NULL) OR (special_library_id IS NULL AND (NOT(transfer_start_datetime <= '201902111052' and transfer_end_datetime >= '201902111052'))) OR (transfer_library_id IS NULL AND (NOT(special_start_datetime <= '201902111052' and special_end_datetime >= '201902111052'))) OR (NOT(special 2019-02-18 14:13:21.839 JST [10237] LOG: terminating any other active server processes 2019-02-18 14:13:21.839 JST [10243] WARNING: terminating connection because of crash of another server process 2019-02-18 14:13:21.839 JST [10243] 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. 2019-02-18 14:13:21.839 JST [10243] HINT: In a moment you should be able to reconnect to the database and repeat your command. 2019-02-18 14:13:21.839 JST [10334] FATAL: the database system is in recovery mode 2019-02-18 14:13:21.846 JST [10237] LOG: all server processes terminated; reinitializing 2019-02-18 14:13:22.233 JST [10335] LOG: database system was interrupted; last known up at 2019-02-18 14:10:54 JST 2019-02-18 14:13:22.302 JST [10335] LOG: database system was not properly shut down; automatic recovery in progress 2019-02-18 14:13:22.307 JST [10335] LOG: redo starts at 7B/2D1E68F8 2019-02-18 14:13:22.307 JST [10335] LOG: invalid record length at 7B/2D1E6930: wanted 24, got 0 2019-02-18 14:13:22.307 JST [10335] LOG: redo done at 7B/2D1E68F8 2019-02-18 14:13:22.445 JST [10237] LOG: database system is ready to accept connections
日付の部分は都度変わりますがSQL文は同じものです。
試したこと
他にいくつものSQLが流れているのですが、ログに出ているコマンドは必ずエラーになります。
同じコマンドを旧サーバで流してもエラーになりません。
開発業者は、postgreSQL 10.2まではメモリ関係のバグが多く存在しているのでそのせいだろうということで
10.7へのバージョンアップで解決するとの提案が出ているのですが、原因が解明していない状態でアップデートしても
2度手間3度手間になる可能性があり躊躇しています。
補足情報(FW/ツールのバージョンなど)
サーバは
旧サーバ RHEL 6.3
新サーバ RHEL 6.10
です。
何か原因らしきものが分かりますでしょうか。