Postgres共享内存错误

时间:2018-08-09 11:40:53

标签: postgresql postgresql-9.5

我无法在Windows上重新启动Postgres(9.5)数据库。

首先是背景-大约一周前,我收到一个操作系统错误警告,指出PostGres所在的光盘已满。我删节了几张桌子,释放了一些空间,一切恢复了正常(据我当时所知)。我没有重新启动,并且继续使用数据库而没有明显的错误。

最近我掉电了,计算机重新启动了。不幸的是,postgres数据库没有建立。

Windows事件查看器实际上并没有说太多,只是“检查应用程序日志”。

我可以找到的最新/相关日志是postgressql-Wed.log。日志结尾显示为...。

2018-08-08 11:07:11 BST [7404]: [1-1] user=,db=,app=,client= LOG:  database system was shut down at 2018-08-07 15:54:31 BST
2018-08-08 11:07:12 BST [7404]: [2-1] user=,db=,app=,client= LOG:  MultiXact member wraparound protections are now enabled
2018-08-08 11:07:12 BST [7796]: [3-1] user=,db=,app=,client= LOG:  database system is ready to accept connections
2018-08-08 11:07:12 BST [7844]: [1-1] user=,db=,app=,client= LOG:  autovacuum launcher started
2018-08-08 11:12:12 BST [7684]: [1-1] user=,db=,app=,client= LOG:  checkpoint starting: time
2018-08-08 11:12:13 BST [7684]: [2-1] user=,db=,app=,client= LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.000 s, total=1.578 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=0 kB
2018-08-08 11:17:12 BST [7684]: [3-1] user=,db=,app=,client= LOG:  checkpoint starting: time
2018-08-08 11:17:13 BST [7684]: [4-1] user=,db=,app=,client= LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.000 s, total=0.475 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=0 kB
FATAL:  ShmemIndex entry size is wrong for data structure "XLOG Ctl": expected 273328, actual 16804528
FATAL:  ShmemIndex entry size is wrong for data structure "XLOG Ctl": expected 273328, actual 16804528
2018-08-08 11:19:12 BST [7796]: [4-1] user=,db=,app=,client= LOG:  could not open file "postmaster.pid": No such file or directory
2018-08-08 11:19:12 BST [7796]: [5-1] user=,db=,app=,client= LOG:  performing immediate shutdown because data directory lock file is invalid
2018-08-08 11:19:12 BST [7796]: [6-1] user=,db=,app=,client= LOG:  received immediate shutdown request
FATAL:  ShmemIndex entry size is wrong for data structure "XLOG Ctl": expected 273328, actual 16804528
2018-08-08 11:19:12 BST [7844]: [2-1] user=,db=,app=,client= WARNING:  terminating connection because of crash of another server process
2018-08-08 11:19:12 BST [7844]: [3-1] user=,db=,app=,client= 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.
2018-08-08 11:19:12 BST [7844]: [4-1] user=,db=,app=,client= HINT:  In a moment you should be able to reconnect to the database and repeat your command.

注意-该日志来自昨天,我找不到任何有关最近尝试重新启动的错误提及的日志。

我今天尝试过几次重新启动(从Windows工具栏开始,使用'postgreSQL'/'Start PostgresSQL 9.5'),以管理员身份运行。每次我尝试重新启动时,都会在一些日志文件(node.log,bigsql.pgdevops-stderr.2018-08-09.log和commons-daemon.2018-08-08.log)中添加一些额外的行,其中包括没有错误/警告,只是声称某些进程已成功启动。

上面的日志文件表明存在共享内存问题,但是我找不到关于此主题的任何有用的帖子。

有什么想法吗?

谢谢

更新-postmaster.pid错误未列为致命错误,并且其他地方的帖子建议只要没有运行postgres会话,就可以删除此文件。

0 个答案:

没有答案