{"id":41935,"date":"2023-05-07T14:27:27","date_gmt":"2023-12-26T01:17:47","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/"},"modified":"2024-04-30T03:03:18","modified_gmt":"2024-04-29T19:03:18","slug":"%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/","title":{"rendered":"\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7"},"content":{"rendered":"<p>\u5927\u5bb6\u597d\uff01\u6211\u662fHaru\u3002<\/p>\n<p>\u8fd9\u6b21\u6211\u4eec\u5c06\u4f7f\u7528PostgreSQL\u6765\u8bbe\u7f6e\u6d41\u590d\u5236\u914d\u7f6e\u3002<\/p>\n<h2>PostgreSQL\u590d\u5236\u7684\u7c7b\u578b\u3002<\/h2>\n<p>\u6d41\u5f0f\u590d\u5236<\/p>\n<p>\u6d41\u5f0f\u590d\u5236\u4f7f\u7528WAL\uff08\u5199\u5165\u524d\u65e5\u5fd7\uff09\u6309\u6570\u636e\u5e93\u7fa4\u96c6\u4e3a\u5355\u4f4d\uff0c\u5e76\u5b9e\u73b0\u6570\u636e\u7684\u540c\u6b65\u3002<\/p>\n<p>\u5c06\u4e3b\u8282\u70b9\u751f\u6210\u7684WAL\u8f6c\u53d1\u5230\u5907\u4efd\u8282\u70b9\uff0c\u5e76\u7531\u5907\u4efd\u8282\u70b9\u8fdb\u884c\u6062\u590d\u3002\u5907\u4efd\u8282\u70b9\u53ef\u4ee5\u6839\u636e\u8bbe\u7f6e\u7528\u4f5c\u53c2\u8003\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u5373\u4f7f\u5728\u4e3b\u670d\u52a1\u5668\u548c\u5907\u4efd\u670d\u52a1\u5668\u7684PostgreSQL\u6b21\u8981\u7248\u672c\u4e0d\u540c\u7684\u60c5\u51b5\u4e0b\uff0c\u4e5f\u53ef\u4ee5\u8fdb\u884c\u590d\u5236\uff0c\u4f46\u5982\u679c\u4e3b\u670d\u52a1\u5668\u548c\u5907\u4efd\u670d\u52a1\u5668\u7684\u4e3b\u8981\u7248\u672c\u4e0d\u540c\uff0c\u5219\u65e0\u6cd5\u8fdb\u884c\u590d\u5236\u3002\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u6216CPU\u67b6\u6784\u4e0d\u540c\uff0c\u4e5f\u65e0\u6cd5\u8fdb\u884c\u590d\u5236\u3002<\/p>\n<p>\u903b\u8f91\u590d\u5236<\/p>\n<p>\u903b\u8f91\u590d\u5236\u662f\u901a\u8fc7\u4f7f\u7528WAL\u5728\u6570\u636e\u5e93\u6216\u8868\u7ea7\u522b\u5b9e\u73b0\u6570\u636e\u540c\u6b65\u7684\u3002\u5b83\u4e0e\u6d41\u590d\u5236\u4e00\u6837\uff0c\u4e5f\u662f\u4f7f\u7528WAL\u8fdb\u884c\u590d\u5236\uff0c\u4f46\u5b83\u4f1a\u5c06WAL\u4e2d\u8bb0\u5f55\u7684\u66f4\u6539\u4fe1\u606f\u8f6c\u6362\uff08\u89e3\u7801\uff09\u4e3a\u903b\u8f91\u5c42\u6b21\uff0c\u7136\u540e\u8fdb\u884c\u4f20\u8f93\u3002<\/p>\n<p>\u901a\u8fc7\u53d1\u5e03\u548c\u8ba2\u9605\uff0c\u53ef\u4ee5\u63a7\u5236\u590d\u5236\u7684\u5bf9\u8c61\u3002\u901a\u8fc7\u521b\u5efa\u4e0d\u540c\u7684\u673a\u5236\uff0c\u53ef\u4ee5\u5b9e\u73b0\u81ea\u7531\u5ea6\u8f83\u9ad8\u7684\u590d\u5236\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u7570\u306a\u308b\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u9593\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c6\u30fc\u30d6\u30eb\u5358\u4f4d\u3067\u306e\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30b9\u30bf\u30f3\u30d0\u30a4\u3078\u306e\u66f8\u304d\u8fbc\u307f<\/ul>\n<p>\u5728\u903b\u8f91\u590d\u5236\u4e2d\uff0c\u867d\u7136\u53ef\u4ee5\u63d0\u9ad8\u81ea\u7531\u5ea6\uff0c\u4f46\u4e5f\u5fc5\u987b\u8003\u8651\u5230\u5176\u6240\u5e26\u6765\u7684\u9650\u5236\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">DDL\u30b3\u30de\u30f3\u30c9\u3068\u4e00\u90e8\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3055\u308c\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30b9\u30bf\u30f3\u30d0\u30a4\u5074\u304c\u66f8\u304d\u8fbc\u307f\u53ef\u80fd\u3067\u3042\u308b\u305f\u3081\u3001\u30de\u30b9\u30bf\u304b\u3089\u8ee2\u9001\u3055\u308c\u3066\u304d\u305f\u30c7\u30fc\u30bf\u304c\u4e00\u610f\u6027\u5236\u7d04\u306a\u3069\u306e\u5236\u7d04\u306b\u9055\u53cd\u3059\u308b\u3068\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u505c\u6b62\u3059\u308b\uff08\u30b3\u30f3\u30d5\u30ea\u30af\u30c8\uff09<\/ul>\n<p>\u8fd9\u91cc\u5f15\u7528\u3002<\/p>\n<h2>\u4f7f\u7528\u73af\u5883- \u5728\u4e2d\u6587\u4f7f\u7528\u4e0b\u8ff0\u73af\u5883<\/h2>\n<p>\u4ee5\u4e0b\u662f\u4f7f\u7528\u7684\u73af\u5883\u3002<\/p>\n<p>\u30d7\u30e9\u30a4\u30de\u30ea\u5074<br \/>\nOS:RHEL8<br \/>\nDB:PostgreSQL-15<br \/>\nHOST:primary<\/p>\n<p>\u30b9\u30bf\u30f3\u30d0\u30a4\u5074<br \/>\nOS:RHEL8<br \/>\nDB:PostgreSQL-15<br \/>\nHOST:standby<\/p>\n<h2>\u51c6\u5907\u8bbe\u7f6e<\/h2>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d496637434c4406cafa1d\/18-0.png\" alt=\"1.PNG\" \/><\/div>\n<h2>\u4e3b\u8981\u65b9\u9762\u7684\u8bbe\u7f6e<\/h2>\n<h4>1. postgresql.conf\u7684\u6587\u4ef6<\/h4>\n<p>postgresql.conf \u662f PostgreSQL \u7684\u57fa\u672c\u914d\u7f6e\u6587\u4ef6\u3002<br \/>\n\u7531\u4e8e\u8fdb\u884c\u5197\u4f59\u64cd\u4f5c\u4f1a\u4f7f\u914d\u7f6e\u672c\u8eab\u53d1\u751f\u53d8\u5316\uff0c\u56e0\u6b64\u6211\u4eec\u4f1a\u4fee\u6539\u4ee5\u4e0b\u9879\u76ee\u7684\u5185\u5bb9\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">listen_addresses : listen\u72b6\u614b\u306b\u3059\u308bIP\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">max_wal_senders : WAL sender\u30d7\u30ed\u30bb\u30b9\u6570\u3092\u5b9a\u7fa9\u3002\u30b9\u30bf\u30f3\u30d0\u30a4\u30b5\u30fc\u30d0\u4ee5\u4e0a\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">synchronous_standby_names : \u30b9\u30bf\u30f3\u30d0\u30a4\u30b5\u30fc\u30d0\u306eapplication_name\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/ul>\n<pre class=\"post-pre\"><code>[postgres@primary data]$ find \/ -name postgresql.conf  2&gt; \/dev\/null  \u3053\u308c\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u4f4d\u7f6e\u3092\u63a2\u305b\u307e\u3059\u3002\r\n\/var\/lib\/pgsql\/15\/data\/postgresql.conf \r\n[postgres@primary data]$ vi \/var\/lib\/pgsql\/15\/data\/postgresql.conf\r\nlisten_addresses = '*'\r\nmax_wal_senders = 10\r\nsynchronous_standby_names = 'standby'\r\n<\/code><\/pre>\n<h4>2. PostgreSQL\u4e3b\u673a\u8bbf\u95ee\u63a7\u5236\u6587\u4ef6pg_hba.conf\u3002<\/h4>\n<p>pg_hba.conf\u662f\u7528\u4e8e\u914d\u7f6e\u4e0e\u8fde\u63a5\u5230PostgreSQL\u7684\u5ba2\u6237\u7aef\u8ba4\u8bc1\u76f8\u5173\u7684\u6587\u4ef6\u3002<br \/>\n\u8be5\u6587\u4ef6\u5141\u8bb8\u6765\u81eaStandby\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002<\/p>\n<pre class=\"post-pre\"><code>[postgres@primary ~]$ find \/ -name pg_hba.conf  2&gt; \/dev\/null\r\n\/var\/lib\/pgsql\/15\/data\/pg_hba.conf\r\n[postgres@primary ~]$ vi \/var\/lib\/pgsql\/15\/data\/pg_hba.conf\r\n# TYPE  DATABASE        USER            ADDRESS                            METHOD\r\nhost    replication     all             [\u30b9\u30bf\u30f3\u30d0\u30a4\u5074\u306eIP\u30a2\u30c9\u30ec\u30b9\/**]           trust\r\n<\/code><\/pre>\n<p>\u5c06\u8bbe\u7f6e\u5e94\u7528\u3002<\/p>\n<pre class=\"post-pre\"><code>[root@primary data]# systemctl restart postgresql-15\r\n<\/code><\/pre>\n<p>\u68c0\u67e5&#8217;0.0.0.0&#8217;\u7684\u72b6\u6001\u3002<\/p>\n<pre class=\"post-pre\"><code>[root@primary data]# ss -ano | grep 5432\r\nu_str LISTEN     0      128                         \/var\/run\/postgresql\/.s.PGSQL.5432 88834                  * 0                    \r\nu_str LISTEN     0      128                                        \/tmp\/.s.PGSQL.5432 88836                  * 0                    \r\ntcp   LISTEN     0      128                                                   0.0.0.0:5432             0.0.0.0:*\r\n<\/code><\/pre>\n<h2>\u5907\u7528\u65b9\u7684\u8bbe\u7f6e<\/h2>\n<h4>1. \u4e3b\u5907\u4e4b\u95f4\u7684\u540c\u6b65<\/h4>\n<pre class=\"post-pre\"><code>[postgres@standby ~]$ rm -rf ${PGDATA}\/*\r\n[postgres@standby ~]$ pg_basebackup -R -D ${PGDATA} -h [\u30d7\u30e9\u30a4\u30de\u30ea\u5074\u306eIP\u30a2\u30c9\u30ec\u30b9]\r\n<\/code><\/pre>\n<p>\u5982\u679c\u65e0\u6cd5\u8fde\u63a5\uff0c\u8bf7\u68c0\u67e5\u9632\u706b\u5899\u548c\u4e4b\u524d\u7684\u8bbe\u7f6e\u3002<\/p>\n<h4>2. \u81ea\u52a8\u914d\u7f6e\u6587\u4ef6postgresql.auto.conf<\/h4>\n<p>\u901a\u8fc7pg_basebackup\u547d\u4ee4\uff0c\u4f1a\u81ea\u52a8\u751f\u6210postgresql.auto.conf\u6587\u4ef6\u3002\u5c06&#8221;application_name=\u5728\u4e3b\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\u7684synchronous_standby_names&#8221;\u6dfb\u52a0\u5230\u8be5\u6587\u4ef6\u7684\u672b\u5c3e\u3002<\/p>\n<pre class=\"post-pre\"><code>[postgres@standby ~]$ vi \/var\/lib\/pgsql\/15\/data\/postgresql.auto.conf\r\n[postgres@standby ~]$ cat \/var\/lib\/pgsql\/15\/data\/postgresql.auto.conf\r\n# Do not edit this file manually!\r\n# It will be overwritten by the ALTER SYSTEM command.\r\nprimary_conninfo = 'user=postgres passfile=''\/var\/lib\/pgsql\/.pgpass'' channel_binding=prefer host=[\u30d7\u30e9\u30a4\u30de\u30ea\u5074\u306eIP\u30a2\u30c9\u30ec\u30b9] port=5432 sslmode=prefer sslcompression=0 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=prefer krbsrvname=postgres target_session_attrs=any application_name=standby'\r\n<\/code><\/pre>\n<h4>3. PostgreSQL\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>\u6267\u884cpg_basebackup\u540e\uff0c\u4e3b\u670d\u52a1\u5668\u7684\u914d\u7f6e\u5c06\u88ab\u4f20\u9001\u81f3\u5907\u7528\u7aef\uff0c\u56e0\u6b64\u9700\u8981\u5c06\u4e3b\u670d\u52a1\u5668\u672a\u914d\u7f6e\u7684\u5730\u65b9\u5982\u4e0b\u6240\u793a\u8fdb\u884c\u6ce8\u91ca\u5904\u7406\u3002<\/p>\n<pre class=\"post-pre\"><code>[postgres@standby ~]$ vi \/var\/lib\/pgsql\/15\/data\/postgresql.conf\r\n#listen_addresses = '0.0.0.0'\r\n#max_wal_senders = 10\r\n#synchronous_standby_names = 'standby'\r\n<\/code><\/pre>\n<h4>\u5f00\u59cb\u590d\u5236<\/h4>\n<pre class=\"post-pre\"><code>**\u30b9\u30bf\u30f3\u30d0\u30a4\u5074**\r\n[root@standby pgsql]# systemctl start postgresql-15\r\n\r\n[postgres@standby ~]$ tail \/var\/lib\/pgsql\/15\/data\/log\/postgresql-Wed.log\r\n2022-10-26 10:29:46.781 EDT [3558] LOG:  listening on IPv6 address \"::1\", port 5432\r\n2022-10-26 10:29:46.781 EDT [3558] LOG:  listening on IPv4 address \"127.0.0.1\", port 5432\r\n2022-10-26 10:29:46.783 EDT [3558] LOG:  listening on Unix socket \"\/var\/run\/postgresql\/.s.PGSQL.5432\"\r\n2022-10-26 10:29:46.785 EDT [3558] LOG:  listening on Unix socket \"\/tmp\/.s.PGSQL.5432\"\r\n2022-10-26 10:29:46.788 EDT [3562] LOG:  database system was shut down in recovery at 2022-10-26 10:29:38 EDT\r\n2022-10-26 10:29:46.788 EDT [3562] LOG:  entering standby mode\r\n2022-10-26 10:29:46.790 EDT [3562] LOG:  redo starts at 0\/2000028\r\n2022-10-26 10:29:46.790 EDT [3562] LOG:  consistent recovery state reached at 0\/3000000\r\n2022-10-26 10:29:46.790 EDT [3558] LOG:  database system is ready to accept read-only connections\r\n2022-10-26 10:29:46.905 EDT [3563] LOG:  started streaming WAL from primary at 0\/3000000 on timeline 1\r\n\r\n\r\n**\u30d7\u30e9\u30a4\u30de\u30ea\u5074**\r\n[root@primary pgsql]# tail \/var\/lib\/pgsql\/15\/data\/log\/postgresql-Wed.log\r\n2022-10-26 10:26:56.105 EDT [4001] LOG:  checkpoint starting: time\r\n2022-10-26 10:28:31.714 EDT [4001] LOG:  checkpoint complete: wrote 953 buffers (5.8%); 0 WAL file(s) added, 0 removed, 0 recycled; write=95.538 s, sync=0.065 s, total=95.609 s; sync files=249, longest=0.063 s, average=0.001 s; distance=4413 kB, estimate=4413 kB\r\n2022-10-26 10:29:46.955 EDT [4382] LOG:  standby \"standby\" is now a synchronous standby with priority 1\r\n2022-10-26 10:29:46.955 EDT [4382] STATEMENT:  START_REPLICATION 0\/3000000 TIMELINE 1\r\n<\/code><\/pre>\n<h2>\u8fdb\u884c\u8fde\u63a5\u6d4b\u8bd5<\/h2>\n<h4>\u5728\u4e3b\u6570\u636e\u5e93\u4e0a\u6267\u884cSQL\uff0c\u5e76\u5728\u5907\u4efd\u6570\u636e\u5e93\u4e0a\u8fdb\u884c\u786e\u8ba4\u3002<\/h4>\n<pre class=\"post-pre\"><code>**\u30d7\u30e9\u30a4\u30de\u30ea\u5074**\r\n[postgres@primary ~]$ psql -U postgres\r\npsql (15.0)\r\n\"help\"\u3067\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3057\u307e\u3059\u3002\r\n\r\npostgres=# create table test_ta(code int);\r\nCREATE TABLE\r\npostgres=# insert into test_ta(code)\r\n\r\n**\u30b9\u30bf\u30f3\u30d0\u30a4\u5074**\r\n[postgres@standby ~]$ psql\r\npsql (15.0)\r\n\"help\"\u3067\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3057\u307e\u3059\u3002\r\n\r\npostgres=# select i from generate_series(1, 10) as i;\r\n i\r\n----\r\n  1\r\n  2\r\n  3\r\n  4\r\n  5\r\n  6\r\n  7\r\n  8\r\n  9\r\n 10\r\n(10 \u884c)\r\n<\/code><\/pre>\n<p>\u6211\u5011\u5728\u4e3b\u8981\u7aef\u5275\u5efa\u7684\u8868\u683c\u5df2\u7d93\u5728\u5099\u7528\u7aef\u9032\u884c\u4e86\u78ba\u8a8d\uff01\u73fe\u5728\u5c31\u8b93\u6211\u5011\u7d50\u675f\u5427\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u4ee5\u4e0a\u7684\u5185\u5bb9\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d\uff01\u6211\u662fHaru\u3002 \u8fd9\u6b21\u6211\u4eec\u5c06\u4f7f\u7528PostgreSQL\u6765\u8bbe\u7f6e\u6d41\u590d\u5236\u914d\u7f6e\u3002 PostgreSQL\u590d\u5236\u7684\u7c7b\u578b\u3002 [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-41935","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316-postgresql\u6d41\u590d\u5236\u7bc7\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7\" \/>\n<meta property=\"og:description\" content=\"\u5927\u5bb6\u597d\uff01\u6211\u662fHaru\u3002 \u8fd9\u6b21\u6211\u4eec\u5c06\u4f7f\u7528PostgreSQL\u6765\u8bbe\u7f6e\u6d41\u590d\u5236\u914d\u7f6e\u3002 PostgreSQL\u590d\u5236\u7684\u7c7b\u578b\u3002 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316-postgresql\u6d41\u590d\u5236\u7bc7\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-26T01:17:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T19:03:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d496637434c4406cafa1d\/18-0.png\" \/>\n<meta name=\"author\" content=\"\u96c5, \u609f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u96c5, \u609f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/\",\"name\":\"\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-12-26T01:17:47+00:00\",\"dateModified\":\"2024-04-29T19:03:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\",\"name\":\"\u96c5, \u609f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"caption\":\"\u96c5, \u609f\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316-postgresql\u6d41\u590d\u5236\u7bc7\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7","og_description":"\u5927\u5bb6\u597d\uff01\u6211\u662fHaru\u3002 \u8fd9\u6b21\u6211\u4eec\u5c06\u4f7f\u7528PostgreSQL\u6765\u8bbe\u7f6e\u6d41\u590d\u5236\u914d\u7f6e\u3002 PostgreSQL\u590d\u5236\u7684\u7c7b\u578b\u3002 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316-postgresql\u6d41\u590d\u5236\u7bc7\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-12-26T01:17:47+00:00","article_modified_time":"2024-04-29T19:03:18+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d496637434c4406cafa1d\/18-0.png"}],"author":"\u96c5, \u609f","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u96c5, \u609f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/","name":"\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-12-26T01:17:47+00:00","dateModified":"2024-04-29T19:03:18+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5c1d\u8bd5\u5c06\u5176\u590d\u6742\u5316\u2014\u2014PostgreSQL\u6d41\u590d\u5236\u7bc7"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6","name":"\u96c5, \u609f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","caption":"\u96c5, \u609f"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%b0%86%e5%85%b6%e5%a4%8d%e6%9d%82%e5%8c%96-postgresql%e6%b5%81%e5%a4%8d%e5%88%b6%e7%af%87\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=41935"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41935\/revisions"}],"predecessor-version":[{"id":89292,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41935\/revisions\/89292"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=41935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=41935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=41935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}