{"id":21456,"date":"2024-01-02T09:41:22","date_gmt":"2024-01-02T09:41:22","guid":{"rendered":"https:\/\/server.hk\/blog\/21456\/"},"modified":"2024-11-14T10:34:02","modified_gmt":"2024-11-14T02:34:02","slug":"how-to-fix-postgresql-error-code-57p01-admin_shutdown","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21456\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9 PostgreSQL \u932f\u8aa4\u4ee3\u78bc: 57P01 &#8211; admin_shutdown"},"content":{"rendered":"<h1 id=\"how-to-fix-postgresql-error-code-57p01-admin_shutdown-XWBWrqHekO\">\u5982\u4f55\u4fee\u5fa9 PostgreSQL \u932f\u8aa4\u4ee3\u78bc: 57P01 &#8211; admin_shutdown<\/h1>\n<p>PostgreSQL \u662f\u4e00\u500b\u529f\u80fd\u5f37\u5927\u7684\u958b\u6e90\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u5168\u7403\u7684\u4f01\u696d\u548c\u7d44\u7e54\u3002\u7136\u800c\uff0c\u8207\u4efb\u4f55\u8edf\u4ef6\u4e00\u6a23\uff0cPostgreSQL \u4e5f\u53ef\u80fd\u9047\u5230\u4e00\u4e9b\u932f\u8aa4\uff0c\u5f71\u97ff\u5176\u6b63\u5e38\u904b\u4f5c\u3002\u5176\u4e2d\u4e00\u500b\u932f\u8aa4\u662f &#8220;57P01 &#8211; admin_shutdown&#8221; \u932f\u8aa4\u4ee3\u78bc\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u6b64\u932f\u8aa4\u7684\u542b\u7fa9\uff0c\u4e26\u63d0\u4f9b\u89e3\u6c7a\u6b65\u9a5f\u3002<\/p>\n<h2 id=\"understanding-the-error-XWBWrqHekO\">\u7406\u89e3\u6b64\u932f\u8aa4<\/h2>\n<p>PostgreSQL \u4e2d\u7684 &#8220;57P01 &#8211; admin_shutdown&#8221; \u932f\u8aa4\u4ee3\u78bc\u8868\u660e\u6578\u64da\u5eab\u4f3a\u670d\u5668\u5df2\u88ab\u7ba1\u7406\u54e1\u95dc\u9589\u3002\u9019\u53ef\u80fd\u662f\u7531\u65bc\u5404\u7a2e\u539f\u56e0\u9020\u6210\u7684\uff0c\u5982\u7dad\u8b77\u5de5\u4f5c\u3001\u7cfb\u7d71\u5347\u7d1a\u6216\u624b\u52d5\u5e72\u9810\u3002\u7576\u6b64\u932f\u8aa4\u767c\u751f\u6642\uff0c\u7528\u6236\u5c07\u7121\u6cd5\u9023\u63a5\u5230\u6578\u64da\u5eab\u4f3a\u670d\u5668\uff0c\u4e14\u5728\u4f3a\u670d\u5668\u91cd\u65b0\u555f\u52d5\u4e4b\u524d\u7121\u6cd5\u9032\u884c\u4efb\u4f55\u64cd\u4f5c\u3002<\/p>\n<h2 id=\"steps-to-fix-the-error-XWBWrqHekO\">\u89e3\u6c7a\u6b64\u932f\u8aa4\u7684\u6b65\u9a5f<\/h2>\n<p>\u4ee5\u4e0b\u662f\u89e3\u6c7a PostgreSQL \u4e2d &#8220;57P01 &#8211; admin_shutdown&#8221; \u932f\u8aa4\u7684\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-check-for-planned-maintenance-XWBWrqHekO\">1. \u6aa2\u67e5\u8a08\u5283\u4e2d\u7684\u7dad\u8b77<\/h3>\n<p>\u5982\u679c\u60a8\u9047\u5230\u6b64\u932f\u8aa4\uff0c\u9996\u5148\u8981\u6aa2\u67e5\u6578\u64da\u5eab\u4f3a\u670d\u5668\u662f\u5426\u6709\u8a08\u5283\u4e2d\u7684\u7dad\u8b77\u6216\u7cfb\u7d71\u5347\u7d1a\u3002\u7ba1\u7406\u54e1\u901a\u5e38\u6703\u66ab\u6642\u95dc\u9589\u4f3a\u670d\u5668\u4ee5\u57f7\u884c\u5fc5\u8981\u7684\u4efb\u52d9\u3002\u5728\u9019\u7a2e\u60c5\u6cc1\u4e0b\uff0c\u60a8\u9700\u8981\u7b49\u5f85\u7dad\u8b77\u5b8c\u6210\u4e26\u4e14\u4f3a\u670d\u5668\u91cd\u65b0\u555f\u52d5\u3002<\/p>\n<h3 id=\"2-restart-the-postgresql-service-XWBWrqHekO\">2. \u91cd\u65b0\u555f\u52d5 PostgreSQL \u670d\u52d9<\/h3>\n<p>\u5982\u679c\u6c92\u6709\u8a08\u5283\u4e2d\u7684\u7dad\u8b77\u6216\u7cfb\u7d71\u5347\u7d1a\uff0c\u60a8\u53ef\u4ee5\u5617\u8a66\u624b\u52d5\u91cd\u65b0\u555f\u52d5 PostgreSQL \u670d\u52d9\u3002\u53ef\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>sudo service postgresql restart<\/code><\/pre>\n<p>\u91cd\u65b0\u555f\u52d5\u670d\u52d9\u5c07\u6703\u9032\u884c PostgreSQL \u4f3a\u670d\u5668\u7684\u5e72\u6de8\u95dc\u9589\u548c\u555f\u52d5\uff0c\u9019\u53ef\u4ee5\u5728\u8a31\u591a\u60c5\u6cc1\u4e0b\u89e3\u6c7a &#8220;57P01 &#8211; admin_shutdown&#8221; \u932f\u8aa4\u3002<\/p>\n<h3 id=\"3-check-postgresql-log-files-XWBWrqHekO\">3. \u6aa2\u67e5 PostgreSQL \u65e5\u8a8c\u6a94\u6848<\/h3>\n<p>\u5982\u679c\u91cd\u65b0\u555f\u52d5\u670d\u52d9\u5f8c\u932f\u8aa4\u4ecd\u7136\u5b58\u5728\uff0c\u5efa\u8b70\u60a8\u6aa2\u67e5 PostgreSQL \u7684\u65e5\u8a8c\u6a94\u6848\uff0c\u4ee5\u5c0b\u627e\u4efb\u4f55\u95dc\u65bc\u95dc\u9589\u539f\u56e0\u7684\u7dda\u7d22\u3002\u65e5\u8a8c\u6a94\u6848\u901a\u5e38\u4f4d\u65bc PostgreSQL \u6578\u64da\u76ee\u9304\u4e2d\u7684 &#8220;pg_log&#8221; \u76ee\u9304\u4e2d\u3002<\/p>\n<p>\u6253\u958b\u65e5\u8a8c\u6a94\u6848\uff0c\u67e5\u770b\u662f\u5426\u6709\u4efb\u4f55\u932f\u8aa4\u6d88\u606f\u6216\u8b66\u544a\uff0c\u9019\u4e9b\u53ef\u80fd\u8868\u660e\u95dc\u9589\u7684\u539f\u56e0\u3002\u5e38\u898b\u539f\u56e0\u5305\u62ec\u786c\u4ef6\u6545\u969c\u3001\u8cc7\u6e90\u67af\u7aed\u6216\u914d\u7f6e\u554f\u984c\u3002\u4e00\u65e6\u78ba\u5b9a\u6839\u672c\u554f\u984c\uff0c\u60a8\u53ef\u4ee5\u63a1\u53d6\u76f8\u61c9\u7684\u63aa\u65bd\u4f86\u89e3\u6c7a\u5b83\u3002<\/p>\n<h3 id=\"4-seek-professional-assistance-XWBWrqHekO\">4. \u5c0b\u6c42\u5c08\u696d\u5354\u52a9<\/h3>\n<p>\u5982\u679c\u60a8\u7121\u6cd5\u81ea\u884c\u89e3\u6c7a &#8220;57P01 &#8211; admin_shutdown&#8221; \u932f\u8aa4\uff0c\u5efa\u8b70\u5c0b\u6c42\u5c08\u696d\u5354\u52a9\u3002\u806f\u7e6b\u60a8\u7684 VPS \u8a17\u7ba1\u4f9b\u61c9\u5546\u7684\u652f\u6301\u5718\u968a\uff0c\u4f8b\u5982 Server.HK\uff0c\u7372\u5f97\u5c08\u5bb6\u6307\u5c0e\u548c\u5354\u52a9\uff0c\u4ee5\u6392\u9664\u4e26\u4fee\u5fa9\u6b64\u932f\u8aa4\u3002<\/p>\n<h2 id=\"summary-XWBWrqHekO\">\u7e3d\u7d50<\/h2>\n<p>\u7e3d\u7d50\u4f86\u8aaa\uff0cPostgreSQL \u4e2d\u7684 &#8220;57P01 &#8211; admin_shutdown&#8221; \u932f\u8aa4\u4ee3\u78bc\u8868\u660e\u6578\u64da\u5eab\u4f3a\u670d\u5668\u5df2\u88ab\u7ba1\u7406\u54e1\u95dc\u9589\u3002\u8981\u4fee\u5fa9\u6b64\u932f\u8aa4\uff0c\u9996\u5148\u61c9\u6aa2\u67e5\u662f\u5426\u6709\u4efb\u4f55\u8a08\u5283\u4e2d\u7684\u7dad\u8b77\u6216\u7cfb\u7d71\u5347\u7d1a\u3002\u5982\u679c\u6c92\u6709\uff0c\u5617\u8a66\u91cd\u65b0\u555f\u52d5 PostgreSQL \u670d\u52d9\u3002\u5982\u679c\u932f\u8aa4\u4ecd\u7136\u5b58\u5728\uff0c\u8acb\u6aa2\u67e5 PostgreSQL \u65e5\u8a8c\u6a94\u6848\u4ee5\u5c0b\u627e\u95dc\u9589\u539f\u56e0\u3002\u5982\u679c\u6240\u6709\u65b9\u6cd5\u90fd\u7121\u6548\uff0c\u8acb\u5c0b\u6c42\u60a8\u7684 VPS \u8a17\u7ba1\u4f9b\u61c9\u5546\uff08\u4f8b\u5982 Server.HK\uff09\u7684\u5c08\u696d\u5354\u52a9\u3002<\/p>\n<p>\u5982\u9700\u4e86\u89e3\u66f4\u591a\u95dc\u65bc VPS \u8a17\u7ba1\u89e3\u6c7a\u65b9\u6848\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f <a href=\"https:\/\/server.hk\">Server.HK<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4fee\u5fa9 PostgreSQL &#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-21456","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=21456"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21456\/revisions"}],"predecessor-version":[{"id":24022,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21456\/revisions\/24022"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}