Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

postgresql - Postgres log file contains: missing chunk number 0 for toast value 815441 in pg_toast_2619

Below log message is available in postgres log file several thousand times. How to resolve.

missing chunk number 0 for toast value 815441 in pg_toast_2619.

pg_toast_2619 is the pg_statistic table. it (pg_statistic) contains duplicated records also. How to resolve this situation. What is the reason behind this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Something went wrong with you server. Server crashed? Disk failure? Anyway you could do:

  1. Stop your server and make a physical copy of your data directory to a secure place;
  2. Since pg_statistic is populated by ANALYZE, just clean it DELETE FROM pg_catalog.pg_statistic; and issue an ANALYZE afterwards.

If the error persists:

  1. Enable allow_system_table_mods and then restart your server: ALTER SYSTEM SET allow_system_table_mods = ON; (Postgres 9.4+)
  2. Truncate pg_statistic of the database you're getting the error: TRUNCATE TABLE pg_catalog.pg_statistic;
  3. Analyze entire database again: ANALYZE VERBOSE;
  4. Disable allow_system_table_mods: ALTER SYSTEM RESET allow_system_table_mods;

You may need to REINDEX SYSTEM after doing this.

More info about allow_system_table_mods here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...