{"id":41802,"date":"2023-10-27T16:43:27","date_gmt":"2023-06-05T12:03:19","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/"},"modified":"2024-05-04T06:16:46","modified_gmt":"2024-05-03T22:16:46","slug":"%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/","title":{"rendered":"\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39"},"content":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u662f\u300a2018\u5e74\u57fa\u4e8eKubernetes\u7684PostgreSQL\u65e5\u5386\u300b\u7684\u7b2c14\u5929\u3002<br \/>\n\u6628\u5929\u6211\u4eec\u56de\u987e\u4e86\u4e3a\u671f\u4e09\u5929\u7684\u4f1a\u8bae\u201cPGConf.Asia 2018\u201d\u3002<\/p>\n<p>\u622a\u81f312\/25\u7684\u964d\u4e34\u65e5\u5386\u4eca\u5929\u7ec8\u4e8e\u8fc7\u4e86\u4e00\u534a\u3002<br \/>\n\u4ece\u4eca\u5929\u5f00\u59cb\uff0c\u6211\u4eec\u5c06\u6062\u590d\u53d1\u5e03\u6709\u5173\u5728Kubernetes\u4e0a\u9a8c\u8bc1PostgreSQL\u7684\u5185\u5bb9\u3002<\/p>\n<h1>\u592a\u957f\u4e0d\u770b<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u516c\u5f0f\u306epostgres\u30a4\u30e1\u30fc\u30b8\u3092\u4f7f\u3063\u3066\u3001\u30b3\u30f3\u30d5\u30a3\u30b0\u306f\u5916\u304b\u3089\u4e0e\u3048\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3088\u3002<\/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\">\u30c7\u30fc\u30bf\u3068\u30a2\u30fc\u30ab\u30a4\u30d6\u30ed\u30b0\u306f\u4fdd\u5b58\u5148\u3092\u5206\u3051\u3088\u3046\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Probe\u8a2d\u5b9a\u3082\u308f\u3059\u308c\u305a\u306b\u3002<\/ul>\n<h1>PostgreSQL\u7684\u6709\u72b6\u6001\u96c6\u7fa4\uff08StatefulSet\uff09\u914d\u7f6e<\/h1>\n<p>\u6839\u636e\u4e4b\u524d\u7684\u8ba8\u8bba\uff0c\u6211\u4eec\u5728\u6b64\u6b21\u7684Kubernetes\u4e0a\u4f7f\u7528\u4e86StatefulSet\u6765\u5b9e\u65bdPostgreSQL\u3002\u672c\u6b21\u5728Kubernetes\u4e0a\u7684PostgreSQL\u6709\u4ee5\u4e0b\u8981\u6c42\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">postgresql.conf\u3092\u5916\u51fa\u3057\u3057\u3066\u3001\u8a2d\u5b9a\u3092\u81ea\u7531\u306b\u5909\u3048\u3089\u308c\u308b\u3053\u3068\u3002<\/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\">\u30a2\u30fc\u30ab\u30a4\u30d6\u30ed\u30b0\u30e2\u30fc\u30c9\u3067\u52d5\u304f\u3053\u3068\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u5916\u90e8\u30c7\u30a3\u30b9\u30af\u3068\u3057\u3066\u3001\u30c7\u30fc\u30bf\u3068\u30a2\u30fc\u30ab\u30a4\u30d6\u30ed\u30b0\u306e\u9818\u57df\u3092\u5206\u3051\u308b\u3053\u3068\u3002<\/ul>\n<p>\u6211\u5c06\u6309\u7167\u987a\u5e8f\u8bb0\u5f55\u5b9e\u9645\u4f7f\u7528\u7684\u8bbe\u7f6e\u3002\u8bf7\u53c2\u9605\u5b8c\u6574\u7684YAML\u6587\u4ef6\u3002<\/p>\n<h3>\u56fe\u50cf\u7684\u6307\u5b9a<\/h3>\n<p>\u9996\u5148\u662f\u5bb9\u5668\u955c\u50cf\uff0c\u6211\u4f7f\u7528\u7684\u662fDocker Hub\u4e0a\u7684Postgres\u5b98\u65b9\u955c\u50cf\u3002<\/p>\n<pre class=\"post-pre\"><code>    <span class=\"na\">spec<\/span><span class=\"pi\">:<\/span>\r\n      <span class=\"na\">containers<\/span><span class=\"pi\">:<\/span>\r\n        <span class=\"pi\">-<\/span> <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">pg-rook-sf<\/span>\r\n          <span class=\"na\">image<\/span><span class=\"pi\">:<\/span> <span class=\"s\">postgres:10.4<\/span>\r\n          <span class=\"na\">imagePullPolicy<\/span><span class=\"pi\">:<\/span> <span class=\"s2\">\"<\/span><span class=\"s\">IfNotPresent\"<\/span>\r\n<\/code><\/pre>\n<p>PostgreSQL\u7684\u7248\u672c\u662f10.4\uff0c\u64cd\u4f5c\u7cfb\u7edf\u662f\u57fa\u4e8eDebian\u7684\u3002\u622a\u81f32018\u5e74\uff0c\u5b98\u65b9\u63d0\u4f9b\u7684\u5bb9\u5668\u6620\u50cf\u4e3aDebian\u548cAlpine\u3002<\/p>\n<h3>postgres\u914d\u7f6e\u6587\u4ef6\u7684\u6307\u5b9a<\/h3>\n<p>\u5728\u516c\u5f0f\u5bb9\u5668\u6620\u50cf\u4e2d\uff0c\u7981\u7528\u4e86\u9700\u8981\u8fdb\u884c\u9a8c\u8bc1\u7684\u5f52\u6863\u65e5\u5fd7\u6a21\u5f0f\u8bbe\u7f6e\u3002\u4e3a\u4e86\u8fdb\u4e00\u6b65\u5b9a\u5236\u65e5\u5fd7\u8f93\u51fa\uff0c\u6211\u63d0\u524d\u521b\u5efa\u4e86pg-rook-postgresql_conf.yaml\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>archive_mode = on                                   # enables archiving; off, on, or always\r\n                                                    # (change requires restart)\r\narchive_command = 'cp %p \/mnt\/postgresql\/xlog\/%f'   # command to use to archive a logfile segment\r\n                                                    # placeholders: %p = path of file to archive\r\n                                                    #               %f = file name only\r\narchive_timeout = 60                                # force a logfile segment switch after this\r\n                                                    # number of seconds; 0 disables\r\n<\/code><\/pre>\n<p>\u4e3a\u4e86\u5728\u542f\u52a8\u65f6\u4ece\u6302\u8f7d\u6b64\u914d\u7f6e\u7684ConfigMap\u4e2d\u63d0\u4f9b\u6b64\u914d\u7f6e\uff0c\u8bf7\u7ed9\u5bb9\u5668\u4f20\u9012\u53c2\u6570\u3002<\/p>\n<pre class=\"post-pre\"><code>          <span class=\"na\">args<\/span><span class=\"pi\">:<\/span>\r\n          <span class=\"pi\">-<\/span> <span class=\"s\">-c<\/span> \r\n          <span class=\"pi\">-<\/span> <span class=\"s\">config_file=\/etc\/postgresql\/postgresql.conf<\/span>\r\n<\/code><\/pre>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u914d\u7f6e\uff0c\u60a8\u53ef\u4ee5\u4ee5\u4ee5\u4e0b\u5f62\u5f0f\u5728\u6587\u6863\u4e2d\u63d0\u4f9b\u7531ConfigMap\u6307\u5b9a\u7684\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528\u9884\u671f\u7684\u53c2\u6570\u542f\u52a8PostgreSQL\u3002<\/p>\n<p>$ docker\u8fd0\u884c -d &#8211;name some-postgres -v &#8220;$PWD\/my-postgres.conf&#8221;:\/etc\/postgresql\/postgresql.conf postgres -c &#8216;config_file=\/etc\/postgresql\/postgresql.conf&#8217;\u3002<\/p>\n<h3>PGDATA\u76ee\u5f55\u548c\u65f6\u533a\u8bbe\u7f6e<\/h3>\n<p>\u5728\u516c\u5f0f\u5bb9\u5668\u6620\u50cf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u201cPGDATA\u201d\u6765\u6307\u5b9aPostgreSQL\u7684\u6570\u636e\u76ee\u5f55\u3002\u6309\u7167\u6587\u6863\u4e2d\u6240\u8ff0\uff0c\u8fd9\u5c06\u4f7f\u6570\u636e\u76ee\u5f55\u6210\u4e3a\u6302\u8f7d\u70b9\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528\u3002<\/p>\n<blockquote><p>\u8fd9\u4e2a\u53ef\u9009\u7684\u73af\u5883\u53d8\u91cf\u53ef\u4ee5\u7528\u6765\u5b9a\u4e49\u6570\u636e\u5e93\u6587\u4ef6\u7684\u53e6\u4e00\u4e2a\u4f4d\u7f6e\uff0c\u6bd4\u5982\u4e00\u4e2a\u5b50\u76ee\u5f55\u3002\u9ed8\u8ba4\u4f4d\u7f6e\u662f\/var\/lib\/postgresql\/data\uff0c\u4f46\u5982\u679c\u4f60\u4f7f\u7528\u7684\u6570\u636e\u5377\u662f\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\u6302\u8f7d\u70b9\uff08\u6bd4\u5982GCE\u6301\u4e45\u78c1\u76d8\uff09\uff0cPostgres initdb\u5efa\u8bae\u521b\u5efa\u4e00\u4e2a\u5b50\u76ee\u5f55\uff08\u4f8b\u5982\/var\/lib\/postgresql\/data\/pgdata\uff09\u6765\u5b58\u653e\u6570\u636e\u3002<\/p><\/blockquote>\n<p>\u5982\u679c\u4e0d\u6307\u5b9aPGDATA\uff0cPostgreSQL\u65e0\u6cd5\u542f\u52a8\uff0c\u56e0\u4e3a\u5728\u672c\u6b21\u7684PostgreSQL on Rook\u914d\u7f6e\u4e2d\uff0c\u6302\u8f7d\u7684\u4f4d\u7f6e\u662f\/var\/lib\/postgresql\/data\u3002<\/p>\n<pre class=\"post-pre\"><code>          <span class=\"na\">env<\/span><span class=\"pi\">:<\/span>\r\n            <span class=\"pi\">-<\/span> <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">PGDATA<\/span>\r\n              <span class=\"na\">value<\/span><span class=\"pi\">:<\/span> <span class=\"s\">\/var\/lib\/postgresql\/data\/pgdata<\/span>\r\n            <span class=\"pi\">-<\/span> <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">TZ<\/span>\r\n              <span class=\"na\">value<\/span><span class=\"pi\">:<\/span> <span class=\"s\">Asia\/Tokyo<\/span>\r\n<\/code><\/pre>\n<p>\u800c\u4e14\uff0c\u5728\u6b64\u4e4b\u524d\uff0c\u6211\u4e0d\u77e5\u9053\u5173\u4e8eTimeZone\u7684\u4e8b\u60c5\uff0c\u4f46\u662f\u5bb9\u5668\u7684\u65f6\u95f4\u4f1a\u9075\u5faa\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u7684\u65f6\u95f4\u3002\u4e3a\u4e86\u660e\u786e\u6307\u5b9aTimeZone\uff0c\u6211\u4f7f\u7528\u4e86\u73af\u5883\u53d8\u91cf TZ\uff1aAsia\/Tokyo\u3002<\/p>\n<h3>\u97f3\u91cf\u8c03\u8282<\/h3>\n<p>\u6839\u636e\u4e4b\u524d\u7684\u8bbe\u7f6e\uff0c\u5728\u8fd9\u4e2aPostgreSQL\u5bb9\u5668\u4e2d\u6211\u4eec\u5c06\u6302\u8f7d\u4e09\u4e2a\u5377\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">PGDATA\u3001PostgreSQL\u306e\u30c7\u30fc\u30bf\u683c\u7d0d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3002Ceph\u306e\u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u3002<\/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\">\u30a2\u30fc\u30ab\u30a4\u30d6\u30ed\u30b0\u306e\u4fdd\u5b58\u5148\u3002Ceph\u306e\u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">postgresql.conf\u3002ConfigMap\u3002<\/ul>\n<pre class=\"post-pre\"><code>          <span class=\"na\">volumeMounts<\/span><span class=\"pi\">:<\/span>\r\n            <span class=\"pi\">-<\/span> <span class=\"na\">mountPath<\/span><span class=\"pi\">:<\/span> <span class=\"s\">\/var\/lib\/postgresql\/data<\/span>\r\n              <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">pg-rook-vol<\/span>\r\n            <span class=\"pi\">-<\/span> <span class=\"na\">mountPath<\/span><span class=\"pi\">:<\/span> <span class=\"s\">\/mnt\/postgresql\/xlog<\/span>\r\n              <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">pg-rook-vol-xlog<\/span>\r\n            <span class=\"pi\">-<\/span> <span class=\"na\">mountPath<\/span><span class=\"pi\">:<\/span> <span class=\"s\">\/etc\/postgresql<\/span>\r\n              <span class=\"na\">readOnly<\/span><span class=\"pi\">:<\/span> <span class=\"no\">true<\/span>\r\n              <span class=\"na\">name<\/span><span class=\"pi\">:<\/span> <span class=\"s\">postgres-conf<\/span>\r\n<\/code><\/pre>\n<p>\u5728\u8bbe\u8ba1\u6570\u636e\u5e93\u65f6\uff0c\u5c06\u6570\u636e\u548c\u5f52\u6863\u65e5\u5fd7\u533a\u57df\u5206\u5f00\u914d\u7f6e\u662f\u7406\u6240\u5f53\u7136\u7684\u3002\u867d\u7136\u8be6\u7ec6\u4fe1\u606f\u5c06\u5728\u5907\u4efd\/\u8fd8\u539f\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u786e\u8ba4\uff0c\u4f46\u6062\u590d\u6570\u636e\u7684\u533a\u57df\u548c\u6301\u7eed\u5b58\u50a8\u5f52\u6863\u65e5\u5fd7\u7684\u533a\u57df\u5177\u6709\u4e0d\u540c\u7684\u751f\u547d\u5468\u671f\u3002<\/p>\n<p>\u8fd9\u6b21\u6211\u4eec\u5c06Ceph\u7684\u5757\u8bbe\u5907\u6302\u8f7d\u5230\u6570\u636e\u548c\u5f52\u6863\u65e5\u5fd7\u533a\u57df\uff0c\u4f46\u5f52\u6863\u65e5\u5fd7\u4e00\u4fa7\u5e76\u4e0d\u4e00\u5b9a\u9700\u8981\u662f\u5757\u8bbe\u5907\u3002\u5f88\u591a\u60c5\u51b5\u4e0b\uff0c\u50cfNFS\u8fd9\u6837\u7684\u6587\u4ef6\u5b58\u50a8\u5df2\u7ecf\u8db3\u591f\u4e86\uff0c\u6240\u4ee5\u6211\u5e0c\u671b\u4ee5\u540e\u80fd\u8fdb\u884c\u4fee\u6b63\u3002<\/p>\n<p>\u7136\u800c\uff0c\u5728\u8fd9\u79cd\u8bbe\u7f6e\u4e0b\uff0c\u51fa\u73b0\u95ee\u9898\u7684\u662f\/mnt\/postgresql\/xlog\u76ee\u5f55\u7684\u6743\u9650\uff0c\u56e0\u4e3a\u5f53\u4ee5\u5e38\u89c4\u65b9\u5f0f\u542f\u52a8\u5bb9\u5668\u65f6\uff0cPostgreSQL\u5bb9\u5668\u4f1a\u56e0\u4e3a\u6743\u9650\u4e0d\u8db3\u800c\u65e0\u6cd5\u8fdb\u884c\u5199\u5165\u3002<br \/>\n\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u4eec\u5728\u672c\u6b21\u4e2d\u4f7f\u7528postStart\u6765\u6388\u4e88\u8be5\u76ee\u5f55\u7684\u5199\u5165\u6743\u9650\u3002<\/p>\n<pre class=\"post-pre\"><code>          <span class=\"na\">lifecycle<\/span><span class=\"pi\">:<\/span>\r\n            <span class=\"na\">postStart<\/span><span class=\"pi\">:<\/span>\r\n              <span class=\"na\">exec<\/span><span class=\"pi\">:<\/span>\r\n                <span class=\"na\">command<\/span><span class=\"pi\">:<\/span>\r\n                  <span class=\"pi\">-<\/span> <span class=\"s\">sh<\/span>\r\n                  <span class=\"pi\">-<\/span> <span class=\"s\">-c<\/span>\r\n                  <span class=\"pi\">-<\/span> <span class=\"s\">chmod a+w \/mnt\/postgresql\/xlog\/<\/span>\r\n<\/code><\/pre>\n<p>\u5982\u679c\u63d0\u524d\u51c6\u5907\u597d\u6587\u4ef6\u5b58\u50a8\uff0c\u8fd9\u4e2a\u95ee\u9898\u5e94\u8be5\u80fd\u591f\u907f\u514d\u3002<\/p>\n<h3>\u63a2\u9488\u7684\u8bbe\u7f6e<\/h3>\n<p>\u6700\u540e\u662f\u5173\u4e8e liveness\/readinessProbe \u7684\u8bbe\u7f6e\u3002<br \/>\n\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u9488\u5bf9 PostgreSQL \u4f7f\u7528\u7684 5432 \u7aef\u53e3\u8fdb\u884c\u4e86\u914d\u7f6e\uff0c\u901a\u8fc7 tcp socket \u53d1\u9001\u5065\u5eb7\u68c0\u67e5\u3002<\/p>\n<pre class=\"post-pre\"><code>          <span class=\"na\">livenessProbe<\/span><span class=\"pi\">:<\/span>\r\n              <span class=\"na\">tcpSocket<\/span><span class=\"pi\">:<\/span>\r\n                 <span class=\"na\">port<\/span><span class=\"pi\">:<\/span> <span class=\"m\">5432<\/span>\r\n              <span class=\"na\">initialDelaySeconds<\/span><span class=\"pi\">:<\/span> <span class=\"m\">10<\/span>\r\n              <span class=\"na\">periodSeconds<\/span><span class=\"pi\">:<\/span> <span class=\"m\">3<\/span>\r\n              <span class=\"na\">timeoutSeconds<\/span><span class=\"pi\">:<\/span> <span class=\"m\">3<\/span>\r\n              <span class=\"na\">failureThreshold<\/span><span class=\"pi\">:<\/span> <span class=\"m\">2<\/span>\r\n          <span class=\"na\">readinessProbe<\/span><span class=\"pi\">:<\/span>\r\n              <span class=\"na\">tcpSocket<\/span><span class=\"pi\">:<\/span>\r\n                 <span class=\"na\">port<\/span><span class=\"pi\">:<\/span> <span class=\"m\">5432<\/span>\r\n              <span class=\"na\">initialDelaySeconds<\/span><span class=\"pi\">:<\/span> <span class=\"m\">5<\/span>\r\n              <span class=\"na\">periodSeconds<\/span><span class=\"pi\">:<\/span> <span class=\"m\">3<\/span>\r\n              <span class=\"na\">timeoutSeconds<\/span><span class=\"pi\">:<\/span> <span class=\"m\">1<\/span>\r\n              <span class=\"na\">successThreshold<\/span><span class=\"pi\">:<\/span> <span class=\"m\">1<\/span>\r\n<\/code><\/pre>\n<p>\u7136\u800c\uff0c\u5c31\u50cf\u5728Pod\u6545\u969c\u7684\u60c5\u51b5\u4e0b\u9700\u8981\u7b49\u5f85PostgreSQL\u6062\u590d\u7684\u60c5\u51b5\u4e00\u6837\uff0c\u4e0a\u8ff0\u5065\u5eb7\u68c0\u67e5\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u5c31\u6ca1\u6709\u610f\u4e49\u4e86\uff0c\u56e0\u6b64\u4f3c\u4e4e\u9700\u8981\u505a\u4e00\u4e9b\u4fee\u6b63\u3002<\/p>\n<h1>\u603b\u7ed3<\/h1>\n<p>\u76ee\u524d\u5df2\u7ecf\u5b9e\u73b0\u4e86\u57fa\u672c\u7684\u8fd0\u884c\u5f62\u5f0f\uff0c\u4f46\u5728\u5f52\u6863\u535a\u5ba2\u548c\u63a2\u9488\u8bbe\u7f6e\u65b9\u9762\u4ecd\u7136\u9700\u8981\u8fdb\u884c\u8bb8\u591a\u4fee\u6b63\u3002\u5982\u679c\u60a8\u60f3\u5728Kubernetes\u4e0a\u4f7f\u7528PostgreSQL\uff0c\u8bf7\u6839\u636e\u8fd9\u91cc\u7684\u53c2\u8003\u7f16\u5199\u60a8\u81ea\u5df1\u7684YAML\u6587\u4ef6\u3002<\/p>\n<p>\u8bf7\u591a\u5173\u7167\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u662f\u300a2018\u5e74\u57fa\u4e8eKubernetes\u7684PostgreSQL\u65e5\u5386\u300b\u7684\u7b2c14\u5929\u3002 \u6628\u5929\u6211\u4eec\u56de\u987e\u4e86\u4e3a\u671f\u4e09\u5929 [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-41802","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>\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39 - 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\/\u7b2c14\u9805-postgresql\u5bb9\u5668\u7684\u4ecb\u7d39\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u7bc7\u6587\u7ae0\u662f\u300a2018\u5e74\u57fa\u4e8eKubernetes\u7684PostgreSQL\u65e5\u5386\u300b\u7684\u7b2c14\u5929\u3002 \u6628\u5929\u6211\u4eec\u56de\u987e\u4e86\u4e3a\u671f\u4e09\u5929 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u7b2c14\u9805-postgresql\u5bb9\u5668\u7684\u4ecb\u7d39\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-05T12:03:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-03T22:16:46+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \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\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/\",\"name\":\"\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-05T12:03:19+00:00\",\"dateModified\":\"2024-05-03T22:16:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39\"}]},{\"@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\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39 - 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\/\u7b2c14\u9805-postgresql\u5bb9\u5668\u7684\u4ecb\u7d39\/","og_locale":"zh_CN","og_type":"article","og_title":"\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39","og_description":"\u8fd9\u7bc7\u6587\u7ae0\u662f\u300a2018\u5e74\u57fa\u4e8eKubernetes\u7684PostgreSQL\u65e5\u5386\u300b\u7684\u7b2c14\u5929\u3002 \u6628\u5929\u6211\u4eec\u56de\u987e\u4e86\u4e3a\u671f\u4e09\u5929 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u7b2c14\u9805-postgresql\u5bb9\u5668\u7684\u4ecb\u7d39\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-05T12:03:19+00:00","article_modified_time":"2024-05-03T22:16:46+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/","name":"\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-05T12:03:19+00:00","dateModified":"2024-05-03T22:16:46+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u7b2c14\u9805 PostgreSQL\u5bb9\u5668\u7684\u4ecb\u7d39"}]},{"@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\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e7%ac%ac14%e9%a0%85-postgresql%e5%ae%b9%e5%99%a8%e7%9a%84%e4%bb%8b%e7%b4%b9\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41802","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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=41802"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41802\/revisions"}],"predecessor-version":[{"id":96616,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41802\/revisions\/96616"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=41802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=41802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=41802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}