web-dev-qa-db-ja.com

致命的:タイムアウトのためにwalreceiverを終了しています

1 /説明:

  • マシン1(スレーブ):Centos 6.6、x64、インストール済みのPostgreSQL 9.3(ローカル)
  • マシン2(マスター):Centos 6.6、x64、PostgreSQL 9.3(クラウド上)をインストール

マシン1(スレーブ)とマシン2(マスター)はクラスターにあります(ストリーミングレプリケーション)。スレーブログに「致命的:タイムアウトのためにwalreceiverを終了する」と表示されることがあります。

詳細なログは次のとおりです:

スレーブ

2015-03-03 02:01:53 UTC 19693   LOG:  database system is ready to accept read only connections
2015-03-03 02:01:53 UTC 19699   LOG:  started streaming WAL from primary at 0/8000000 on timeline 1
2015-03-03 02:02:15 UTC 19695   LOG:  redo starts at 0/8F04530
2015-03-03 02:39:26 UTC 19699   FATAL:  terminating walreceiver due to timeout
2015-03-03 02:39:26 UTC 19695   LOG:  invalid record length at 0/8F080F8
2015-03-03 02:39:41 UTC 21065   LOG:  started streaming WAL from primary at 0/8000000 on timeline 1
2015-03-03 03:19:12 UTC 21065   FATAL:  terminating walreceiver due to timeout
2015-03-03 03:19:12 UTC 19695   LOG:  invalid record length at 0/9D488F8
2015-03-03 03:19:27 UTC 22489   LOG:  started streaming WAL from primary at 0/9000000 on timeline 1

マスター

2015-03-03 02:02:40 UTC 1718   LOG:  database system is ready to accept connections
2015-03-03 02:02:40 UTC 1724   LOG:  autovacuum launcher started
2015-03-03 02:02:42 UTC 1726 [unknown] [unknown]LOG:  invalid length of startup packet
2015-03-03 02:02:42 UTC 1726 [unknown] [unknown]LOG:  connection failed during start up processing: user= database=
2015-03-03 02:35:45 UTC 1788 pgAdmin III - Query Tool enterprisedbERROR:  column "username" does not exist at character 18
2015-03-03 02:35:45 UTC 1788 pgAdmin III - Query Tool enterprisedbSTATEMENT:
        select datname, username, client_addr, client_port, query from pg_stat_activity;
2015-03-03 02:41:03 UTC 1748 walreceiver enterprisedbLOG:  terminating walsender process due to replication timeout
2015-03-03 02:51:42 UTC 3184 ::1 psql.bin enterprisedbERROR:  unrecognized configuration parameter "replication_timeout"
2015-03-03 02:51:42 UTC 3184 ::1 psql.bin enterprisedbSTATEMENT:  show replication_timeout;
2015-03-03 02:51:54 UTC 3184 ::1 psql.bin enterprisedbERROR:  relation "pg_setting" does not exist at character 15
2015-03-03 02:51:54 UTC 3184 ::1 psql.bin enterprisedbSTATEMENT:  select * from pg_setting;
2015-03-03 02:58:33 UTC 3388 [unknown] [unknown]LOG:  invalid length of startup packet
2015-03-03 02:58:33 UTC 3388 [unknown] [unknown]LOG:  connection failed during start up processing: user= database=
2015-03-03 02:58:57 UTC 3390 [unknown] [unknown]LOG:  incomplete startup packet
2015-03-03 02:58:57 UTC 3390 [unknown] [unknown]LOG:  connection failed during start up processing: user= database=
2015-03-03 03:15:04 UTC 3967 [unknown] enterprisedbFATAL:  database "enterprisedb" does not exist
2015-03-03 03:20:53 UTC 2884 walreceiver enterprisedbLOG:  terminating walsender process due to replication timeout

2 /質問:

「致命的:タイムアウトのためにwalreceiverを終了する」問題とは何ですか?どうすれば修正できますか?

3
Luan Huynh

Wal_receiver_timeoutパラメータをニーズに合わせて調整する必要があります。