<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by hsuan-ming Yang on Medium]]></title>
        <description><![CDATA[Stories by hsuan-ming Yang on Medium]]></description>
        <link>https://medium.com/@yang5664?source=rss-9de5edb2f830------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ex5usqSyR0PF0p2F.jpg</url>
            <title>Stories by hsuan-ming Yang on Medium</title>
            <link>https://medium.com/@yang5664?source=rss-9de5edb2f830------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:51:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yang5664/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Riverpod hooks_riverpod HookWidget]]></title>
            <link>https://yang5664.medium.com/riverpod-hooks-riverpod-hookwidget-d69d64296590?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/d69d64296590</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-hooks]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Tue, 14 Jun 2022 09:51:15 GMT</pubDate>
            <atom:updated>2022-06-14T09:51:15.400Z</atom:updated>
            <content:encoded><![CDATA[<p>HookConsumerWidget 允許同時使用Provider和Hooks</p><pre><em>// 使用 HookConsumerWidget<br></em><strong>class </strong>MyConsumerApp <strong>extends </strong>HookConsumerWidget {<br>  <strong>const </strong>MyConsumerApp({<br>    Key? key,<br>  }) : <strong>super</strong>(key: key);<br><br>  @override<br>  Widget build(BuildContext context, WidgetRef ref) {<br>    <em>// 必須在 build 內宣告<br>    </em><strong>final </strong>state = useState(0);<br>    <em>//<br>    </em><strong>return </strong>MaterialApp(<br>      home: Scaffold(<br>        appBar: AppBar(title: Text(<strong>&quot;My Consumer App&quot;</strong>),),<br>        body: Center(<br>          child: Text(<strong>&quot;</strong>${state.<strong>value</strong>}<strong>&quot;</strong>, <br>            style: <strong>const </strong>TextStyle(fontSize: 30),<br>          ),<br>        ),<br>        floatingActionButton: FloatingActionButton(<br>          onPressed: (){<br>            state.<strong>value</strong>++;<br>          },<br>        child: Icon(Icons.<em>add</em>),),<br>      ),<br>    );<br>  }<br>}</pre><p>StatefulHookConsumerWidget：需要使用StatefulWidget生命週期時</p><pre><strong>class </strong>MyStatefulConsumerWidget <strong>extends </strong>StatefulHookConsumerWidget {<br>  <strong>const </strong>MyStatefulConsumerWidget({Key? key}) : <strong>super</strong>(key: key);<br><br>  @override<br>  MyStatefulConsumerWidgetState createState() =&gt; MyStatefulConsumerWidgetState();<br>}<br><br><strong>class </strong>MyStatefulConsumerWidgetState <strong>extends </strong>ConsumerState&lt;MyStatefulConsumerWidget&gt; {<br><br>  @override<br>  <strong>void </strong>initState() {<br>    <strong>super</strong>.initState();<br>    <em>// &quot;ref&quot; 可以在StatefulWidget的生命週期使用<br>    </em><strong>ref</strong>.read(stateProvider);<br>  }<br><br>  @override<br>  Widget build(BuildContext context) {<br>    <em>// 必須在 build 內宣告<br>    </em><strong>final </strong>state = useState(0);<br>    <em>//<br>    </em><strong>return </strong>MaterialApp(<br>      home: Scaffold(<br>        appBar: AppBar(title: Text(<strong>&quot;My Consumer App&quot;</strong>),),<br>        body: Center(<br>          child: Text(<strong>&quot;</strong>${state.<strong>value</strong>}<strong>&quot;</strong>,<br>            style: <strong>const </strong>TextStyle(fontSize: 30),<br>          ),<br>        ),<br>        floatingActionButton: FloatingActionButton(<br>          onPressed: (){<br>            state.<strong>value</strong>++;<br>          },<br>          child: Icon(Icons.<em>add</em>),),<br>      ),<br>    );<br>  }<br>}</pre><p>HookConsumer / Consumer</p><pre><strong>final </strong>stateProvider = StateProvider&lt;int&gt;((ref) =&gt; 0);<br><strong>...<br>class </strong>MyHomePage <strong>extends </strong>ConsumerWidget {<br>  <strong>const </strong>MyHomePage({Key? key}) : <strong>super</strong>(key: key);<br><br>  @override<br>  Widget build(BuildContext context, WidgetRef ref) {<br>    <strong>return </strong>Scaffold(<br>      appBar: AppBar(<br>          title: <strong>const </strong>Text(<strong>&quot;Consumer Widget&quot;</strong>)<br>      ),<br>      body: <strong>const </strong>Center(<br>        child: MyTextWidget(),<br>      ),<br>      floatingActionButton: FloatingActionButton(<br>        child: <strong>const </strong>Icon(Icons.<em>plus_one</em>),<br>        onPressed: (){<br>          ref.read(stateProvider.<strong>notifier</strong>).<strong>state</strong>++;<br>        },<br>      ),<br>    );<br>  }<br>}<br><em>// 封裝Widget 測試Consumer<br></em><strong>class </strong>MyTextWidget <strong>extends </strong>StatelessWidget {<br>  <strong>const </strong>MyTextWidget({Key? key}) : <strong>super</strong>(key: key);<br><br>  @override<br>  Widget build(BuildContext context) {<br>    <strong>return </strong>Consumer(builder: (context, ref , child){<br>      <strong>final </strong>value = ref.watch(stateProvider);<br>      <strong>return </strong>Text(<strong>&quot;</strong>${value}<strong>&quot;</strong>, style: <strong>const </strong>TextStyle(fontSize: 30),);<br>    });<br>  }<br>}</pre><p>關鍵字</p><pre>StateProvider、HookConsumerWidget、StatefulHookConsumerWidget</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d69d64296590" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Riverpod hooks_riverpod StateNotifier]]></title>
            <link>https://yang5664.medium.com/riverpod-hooks-riverpod-statenotifier-32ebaf7669?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/32ebaf7669</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-hooks]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Tue, 14 Jun 2022 08:19:44 GMT</pubDate>
            <atom:updated>2022-06-14T08:19:44.021Z</atom:updated>
            <content:encoded><![CDATA[<p>狀態通知 StateNotifier</p><pre><strong>final </strong>counterProvider = StateNotifierProvider.<em>autoDispose</em>&lt;CounterNotifier,<br>    int&gt;((_) {<br>  <strong>return </strong>CounterNotifier();<br>});<br><br><strong>class </strong>CounterNotifier <strong>extends </strong>StateNotifier&lt;int&gt; {<br>  CounterNotifier() : <strong>super</strong>(0);<br>  <strong>void </strong>increment() {<br>    <strong>state</strong>++;<br>  }<br>}</pre><pre>...<br>home: Scaffold(<br>  appBar: AppBar(title: Text(<strong>&quot;My Consumer App&quot;</strong>),),<br>  body: Center(child: Builder(builder: (context){<br>    <strong>final </strong>provider = ref.watch(counterProvider);<br>    <strong>return </strong>Column(<br>      mainAxisAlignment: MainAxisAlignment.<strong>center</strong>,<br>      children: [<br>        Text(<strong>&quot;</strong>${provider}<strong>&quot;</strong>),<br>      ],);<br>  },),),<br>  floatingActionButton: FloatingActionButton(<br>    onPressed: (){<br>      ref.read(counterProvider.<strong>notifier</strong>).increment();<br>    },<br>  child: Icon(Icons.<em>add</em>),),<br>),<br>...</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*-3RKbJWa7V9qBI8XEKAU2g.png" /></figure><p>關鍵字</p><pre>StateNotifierProvider、StateNotifier、ref.watch、ref.read、<strong>notifier</strong></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32ebaf7669" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Riverpod hooks_riverpod 入門]]></title>
            <link>https://yang5664.medium.com/riverpod-hooks-riverpod-eb16f6c8b0?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb16f6c8b0</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-hooks]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Tue, 14 Jun 2022 07:17:04 GMT</pubDate>
            <atom:updated>2022-06-14T07:46:13.762Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>安裝</li></ol><pre>environment:<br>  sdk: &quot;&gt;=2.12.0 &lt;3.0.0&quot;<br>  flutter: &quot;&gt;=2.0.0&quot;<br><br>dependencies:<br>  flutter:<br>    sdk: flutter<br>  flutter_hooks: ^0.18.0<br>  hooks_riverpod: ^2.0.0-dev.9</pre><p>2. Hello World</p><pre>// 宣告全域 provider<br>final helloworldProvider = Provider((_)=&gt;&quot;Hello world&quot;);</pre><pre>// 入口<br><em>void</em> main() {<br>  runApp(<br>    // 為了讓widgets可以讀取providers，需要用ProviderScope將application包起來</pre><pre>    ProviderScope(<br>      child: MyApp(),<br>    ),<br>  );<br>}</pre><pre><em>// <br>class</em> MyApp <em>extends</em> ConsumerWidget {<br>  @override<br>  Widget build(BuildContext context, WidgetRef ref) {<br>    <em>final</em> String value = ref.watch(helloWorldProvider);<br><br>    <em>return</em> MaterialApp(<br>      home: Scaffold(<br>        appBar: AppBar(title: <em>const</em> Text(&#39;Example&#39;)),<br>        body: Center(<br>          child: Text(value),<br>        ),<br>      ),<br>    );<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*ecGcAvXRmHNp6t1JGmBGIw.png" /></figure><p>ref 的使用：監聽另一個provider</p><pre>// 新增Provider<br>final stateProvider = StateProvider&lt;int&gt;((ref)=&gt;0);</pre><pre>// 修改helloworldProvider 監聽 stateProvider的變化<br>final helloworldProvider = Provider((ref) =&gt; ref.watch(stateProvider));</pre><pre>···<br>// 新增漂浮按鈕<br>floatingActionButton: FloatingActionButton(<br>  onPressed: (){<br>    ref.read(stateProvider.<strong>notifier</strong>).<strong>state</strong>++;<br>  },<br>child: Icon(Icons.<em>add</em>),),</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*5E2aKHZgAHfqhhLUs2jaOw.png" /></figure><p>關鍵字</p><pre>Provider、StateProvider、ProviderScope、ref.read、ref.watch、notifier</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb16f6c8b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CentOS 7 建置 PostgreSQL連接池 — pgBouncer]]></title>
            <link>https://yang5664.medium.com/centos-7-%E5%BB%BA%E7%BD%AE-postgresql%E9%80%A3%E6%8E%A5%E6%B1%A0-pgbouncer-d8addb944c6c?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8addb944c6c</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[pgbouncer]]></category>
            <category><![CDATA[pgpool]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Sun, 18 Oct 2020 03:11:02 GMT</pubDate>
            <atom:updated>2020-10-18T03:13:35.247Z</atom:updated>
            <content:encoded><![CDATA[<h3>CentOS 7 建置 PostgreSQL連接池 — pgBouncer</h3><p>好處：<br><a href="https://scalegrid.io/blog/postgresql-connection-pooling-part-4-pgbouncer-vs-pgpool/">https://scalegrid.io/blog/postgresql-connection-pooling-part-4-pgbouncer-vs-pgpool/</a><br><a href="https://medium.com/pgsql-tw/you-need-pgbouncer-e62fa329b209">https://medium.com/pgsql-tw/you-need-pgbouncer-e62fa329b209</a></p><p>安裝：<br><a href="https://mydbops.wordpress.com/2020/03/25/getting-started-with-pgbouncer-in-postgresql/">https://mydbops.wordpress.com/2020/03/25/getting-started-with-pgbouncer-in-postgresql/</a></p><pre># 安裝<br>yum install pgbouncer</pre><pre># 編輯配置 -  這邊只列出需要注意部分<br>vi /etc/pgbouncer/pgbouncer.ini</pre><pre>[databases]<br>* = host=localhost</pre><pre>[pgbouncer]<br>listen_addr = *<br>listen_port = 6432</pre><pre>auth_type = md5<br>auth_file = /etc/pgbouncer/userlist.txt</pre><pre>pool_mode = transaction</pre><pre># 產生檔案 /etc/pgbouncer/userlist.txt</pre><pre>sudo -u postgres psql<br>Password for user postgres:<br>psql (12.4)<br>Type &quot;help&quot; for help.</pre><pre>postgres=# select rolname,rolpassword from pg_authid where rolname=&#39;postgres&#39;;</pre><pre> rolname  |             rolpassword<br>----------+-------------------------------------<br> postgres | md5fc5fa78dbffef80dc29f2b89fdb45aba<br>(1 row)</pre><pre># 寫入檔案<br>echo &#39;&quot;postgres&quot; &quot;md5fc5fa78dbffef80dc29f2b89fdb45aba&quot;&#39; &gt; /etc/pgbouncer/userlist.txt</pre><p>啟動服務</p><pre>systemctl enable pgbouncer<br>systemctl start pgbouncer</pre><pre># 連接測試<br>[root@vm postgresql]# psql --port 6432 -Upostgres -h127.0.0.1</pre><pre>Password for user postgres:<br>psql (12.4)<br>Type &quot;help&quot; for help.</pre><p>連接問題排除</p><pre>vi /var/lib/pgsql/12/data/pg_hba.conf</pre><pre># TYPE  DATABASE        USER            ADDRESS                 METHOD</pre><pre># &quot;local&quot; is for Unix domain socket connections only<br>local   all             all                                     md5<br># IPv4 local connections:<br>host    all             all             127.0.0.1/32            md5<br># IPv6 local connections:<br>host    all             all             ::1/128                 md5<br># Allow replication connections from localhost, by a user with the</pre><p>補充：在完成連接池配置後，若使用pgPool2作為負載平衡記得將port改為pgBouncer的連接配置。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIgMSIEgC8OW8VUbRgcSyg.png" /><figcaption>pgPool2連接pgBouncer</figcaption></figure><p>— 完成 —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8addb944c6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CentOS 7 建置 PostgreSQL故障轉移負載平衡—pgPool2]]></title>
            <link>https://yang5664.medium.com/centos-7-%E5%BB%BA%E7%BD%AE-postgresql%E6%95%85%E9%9A%9C%E8%BD%89%E7%A7%BB%E8%B2%A0%E8%BC%89%E5%B9%B3%E8%A1%A1-pgpool2-89bfb6238c60?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/89bfb6238c60</guid>
            <category><![CDATA[centos7]]></category>
            <category><![CDATA[pgpool]]></category>
            <category><![CDATA[load-balancing]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Sat, 17 Oct 2020 15:34:17 GMT</pubDate>
            <atom:updated>2020-10-17T16:24:15.075Z</atom:updated>
            <content:encoded><![CDATA[<p>在postgresql配置叢集後（1-PrimaryNode 、2-StandbyNode、1-WitnessNode），應用程式如何存取資料庫IP該如何配置呢？在故障轉移後如何連接到新的Primary Node，這邊使用pgPool2的負載平衡功能。</p><p><a href="https://yang5664.medium.com/centos-7-%E5%BB%BA%E7%BD%AE-postgresql%E8%A4%87%E5%AF%AB%E8%88%87%E6%95%85%E9%9A%9C%E8%BD%89%E7%A7%BB-repmgr-6bf77a0222f6">延續上一篇</a> 將 pgPool2 安裝在 WitnessNode</p><pre>yum install <a href="https://www.pgpool.net/yum/rpms/4.1/redhat/rhel-7-x86_64/pgpool-II-release-4.1-2.noarch.rpm">https://www.pgpool.net/yum/rpms/4.1/redhat/rhel-7-x86_64/pgpool-II-release-4.1-2.noarch.rpm</a></pre><pre>yum install pgpool-II-pg12</pre><pre># 在所有PostgreSQL Node安裝<br>yum install pgpool-II-pg12-extensions</pre><p>配置 pgpool.conf</p><pre># vi /etc/pgpool-II/pgpool.conf 這邊只列出修改的部分<br>listen_addresses = &#39;*&#39;</pre><pre># DB1<br>backend_hostname0 = &#39;192.168.10.61&#39;<br>backend_port0 = 5432<br>backend_weight0 = 1<br>backend_flag0 = &#39;ALLOW_TO_FAILOVER&#39;</pre><pre># DB2<br>backend_hostname1 = &#39;192.168.10.62&#39;<br>backend_port1 = 5432<br>backend_weight1 = 1<br>backend_flag1 = &#39;ALLOW_TO_FAILOVER&#39;</pre><pre># DB3<br>backend_hostname2 = &#39;192.168.10.63&#39;<br>backend_port2 = 5432<br>backend_weight2 = 1<br>backend_flag2 = &#39;ALLOW_TO_FAILOVER&#39;</pre><pre>enable_pool_hba = on<br>connection_cache = on<br>load_balance_mode = on<br>master_slave_mode = on</pre><pre>sr_check_period = 10<br>sr_check_user = &#39;postgres&#39;<br>sr_check_password = &#39;StrongPassword&#39;<br>sr_check_database = &#39;postgres&#39;</pre><p>配置環境</p><pre># 建立pgPool密鑰<br>pg_md5 -u postgres StrongPassword<br>&gt;&gt; 0f6e4a1df0cf5ee97c2066953bed21b2</pre><pre># vi /etc/pgpool-II/pcp.conf 新增<br>postgres: 0f6e4a1df0cf5ee97c2066953bed21b2</pre><pre># vi /etc/pgpool-II/pool_hba.conf 新增<br>host    all         all         192.168.0.0/16        md5</pre><pre># vi /etc/pgpool-II/pool_passwd 修改</pre><pre>pg_md5 --md5auth --username=postgres StrongPassword</pre><p>啟動服務</p><pre># 建立資料夾<br>mkdir /var/log/pgpool<br>chown postgres /var/log/pgpool</pre><pre>systemctl enable pgpool.service<br>systemctl start pgpool.service</pre><p>查看狀態</p><pre>systemctl status pgpool.service -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZAh24wtZocPGcekSGojsFQ.png" /></figure><p>連接測試</p><pre>psql -p 9999 -Upostgres</pre><pre>psql (12.4)<br>Type &quot;help&quot; for help.</pre><pre>postgres=# show pool_nodes;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUMtziE56HWRE6I6lnPsgw.png" /></figure><p>正常情況 status 應該都是 “up”，下方處理某節點是down的狀況</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJPrDB6B_VN36Yu4FIes1g.png" /></figure><pre>pcp_detach_node -n0 -Upostgres # 卸載 node_id 0<br>&lt;&lt;&lt;輸出&gt;&gt;&gt;<br>pcp_detach_node -- Command Successful</pre><pre>pcp_attach_node -n0 -Upostgres # 裝載 node_id 0<br>&lt;&lt;&lt;輸出&gt;&gt;&gt;<br>pcp_attach_node -- Command Successful</pre><pre># 重啟服務<br>systemctl restart pgpool.service</pre><p>— 完成 —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89bfb6238c60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CentOS 7 postgreSQL12 排程pgAgent]]></title>
            <link>https://yang5664.medium.com/centos-7-postgresql12-%E6%8E%92%E7%A8%8Bpgagent-3450546b815?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/3450546b815</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[pgagent]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Fri, 16 Oct 2020 17:12:14 GMT</pubDate>
            <atom:updated>2020-10-16T17:12:14.673Z</atom:updated>
            <content:encoded><![CDATA[<p>安裝postgreSQL的排程工具pgAgent</p><p>安裝套件</p><pre>sudo yum -y install pgagent_12.x86_64</pre><p>修改 pgagent 配置</p><pre>vi /etc/pgagent/pgagent_12.conf</pre><pre>DBNAME=postgres<br>DBUSER=postgres<br>DBHOST=127.0.0.1<br>DBPORT=5432<br>PASSWORD=你的密碼 # 新增<br>LOGFILE=/var/log/pgagent_12.log</pre><pre>vi /usr/lib/systemd/system/pgagent_12.service<br>--- 新增 password <br>ExecStart=/usr/bin/pgagent_12 -s ${LOGFILE} hostaddr=${DBHOST} dbname=${DBNAME} user=${DBUSER} port=${DBPORT} password=${PASSWORD}----</pre><p>修改 pg_hba.conf</p><pre>vi /var/lib/pgsql/12/data/pg_hba.conf</pre><pre># IPv4 local connections:<br>host    all         all       127.0.0.1/32     <strong>md5 # 原 ident</strong></pre><p>安裝pgAdmin管理套件pgagent</p><pre><strong>su - postgresl</strong></pre><pre><strong>psql -Upostgres </strong></pre><pre><strong>CREATE</strong> EXTENSION pgagent;</pre><p>啟動服務</p><pre>systemctl enable pgagent_12<br>systemctl start pgagent_12</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*Y3eqKU8cOPi5VZcUE1wG3w.png" /><figcaption>pgAdmin畫面</figcaption></figure><p>— 完成 —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3450546b815" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CentOS 7 建置 PostgreSQL複寫與故障轉移 Repmgr]]></title>
            <link>https://yang5664.medium.com/centos-7-%E5%BB%BA%E7%BD%AE-postgresql%E8%A4%87%E5%AF%AB%E8%88%87%E6%95%85%E9%9A%9C%E8%BD%89%E7%A7%BB-repmgr-6bf77a0222f6?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bf77a0222f6</guid>
            <category><![CDATA[failover]]></category>
            <category><![CDATA[postgresql-replication]]></category>
            <category><![CDATA[repmgr]]></category>
            <category><![CDATA[centos]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Fri, 16 Oct 2020 09:26:52 GMT</pubDate>
            <atom:updated>2020-10-19T02:20:59.751Z</atom:updated>
            <content:encoded><![CDATA[<p>使用：repmgr 為 postgresql 配置複寫與故障轉移</p><p>參考：<a href="https://bbs.huaweicloud.com/blogs/183475">https://bbs.huaweicloud.com/blogs/183475</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*53HsADeVUiSaZM0gn0MLJQ.png" /></figure><p>各Node安裝PostgreSQL 12 &amp; repmgr12</p><pre># 安裝 PostgreSQL 12</pre><pre>// 參考：https://computingforgeeks.com/how-to-install-postgresql-12-on-centos-7/</pre><pre>sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm</pre><pre>sudo yum -y install epel-release yum-utils</pre><pre>sudo yum-config-manager --enable pgdg12</pre><pre>sudo yum install postgresql12-server postgresql12</pre><pre>sudo yum install repmgr12</pre><pre># 關閉防火牆</pre><pre>sudo firewall-cmd --state  // 檢查狀態</pre><pre>sudo systemctl stop firewalld</pre><pre>sudo systemctl disable firewalld</pre><p>Primary Node 配置</p><pre># 資料庫初始化<br>/usr/pgsql-12/bin/postgresql-12-setup initdb </pre><pre># 配置複寫<br>vi /var/lib/pgsql/12/data/postgresql.conf <br># 新增以下配置<br>listen_addresses = &#39;*&#39;<br>max_wal_senders = 10<br>max_replication_slots = 10<br>wal_level = &#39;replica&#39;<br>wal_log_hints = on<br>hot_standby = on<br>archive_mode = on<br>archive_command = &#39;/bin/true&#39;</pre><pre># 重啓服務<br>systemctl enable postgresql-12.service<br>systemctl restart postgresql-12.service</pre><pre># 創建repmgr資料庫與用戶<br>su - postgres<br>createuser --superuser repmgr<br>createdb --owner=repmgr repmgr<br>psql -c &quot;ALTER USER repmgr SET search_path TO repmgr, public;&quot;</pre><pre># postgres 加載 repmgr 套件<br>vi /var/lib/pgsql/12/data/postgresql.conf<br>shared_preload_libraries = &#39;repmgr&#39; // 修改</pre><p>repmgr 服務配置（Node 1 ～ 3）</p><pre># 配置文件<br>vi /etc/repmgr/12/repmgr.conf</pre><pre># Node1 -primary</pre><pre>node_id=1<br>node_name=&#39;node1&#39;<br>conninfo=&#39;host=192.168.10.61 user=repmgr dbname=repmgr connect_timeout=2&#39;<br>data_directory=&#39;/var/lib/pgsql/12/data&#39;</pre><pre># Node2 -standy</pre><pre>node_id=2<br>node_name=&#39;node2&#39;<br>conninfo=&#39;host=192.168.10.62 user=repmgr dbname=repmgr connect_timeout=2&#39;<br>data_directory=&#39;/var/lib/pgsql/12/data&#39;</pre><pre># Node3 -standy</pre><pre>node_id=3<br>node_name=&#39;node3&#39;<br>conninfo=&#39;host=192.168.10.63 user=repmgr dbname=repmgr connect_timeout=2&#39;<br>data_directory=&#39;/var/lib/pgsql/12/data&#39;</pre><p>配置Primary Node的pg_hba.conf</p><pre>vi /var/lib/pgsql/12/data/pg_hba.conf</pre><pre>#For Access Database<br>host    all             postgres    192.168.0.0/16          md5</pre><pre>#For Replication <br>local   replication     repmgr                              trust</pre><pre>host    replication     repmgr      127.0.0.1/32            trust</pre><pre>host    replication     repmgr      192.168.10.0/24         trust</pre><pre>local   repmgr          repmgr                              trust</pre><pre>host    repmgr          repmgr      127.0.0.1/32            trust</pre><pre>host    repmgr          repmgr      192.168.10.0/24         trust</pre><pre># 重啓服務<br>systemctl restart postgresql-12.service</pre><p>Standby Node驗證能否訪問Primary Node</p><pre>su - postgres -c &quot;psql &#39;host=192.168.10.61 user=repmgr dbname=repmgr connect_timeout=2&#39;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*BavtdJCtf2khwuTOFeiRWQ.png" /></figure><p>向repmgr註冊Primary Node</p><pre>su - postgres -c &quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf primary register&quot;</pre><p>Clone Standby Node</p><pre># 預演<br># Node 2 &amp; Node 3<br>su - postgres -c&quot;/usr/pgsql-12/bin/repmgr -h 192.168.10.61 -U repmgr -d repmgr -f /etc/repmgr/12/repmgr.conf standby clone --dry-run&quot;</pre><pre>&lt;&lt;&lt;輸出Log&gt;&gt;&gt;</pre><pre>NOTICE: destination directory &quot;/var/lib/pgsql/12/data&quot; provided<br>INFO: connecting to source node<br>DETAIL: connection string is: host=192.168.10.61 user=repmgr dbname=repmgr<br>DETAIL: current installation size is 32 MB<br>INFO: &quot;repmgr&quot; extension is installed in database &quot;repmgr&quot;<br>INFO: parameter &quot;max_wal_senders&quot; set to 10<br>NOTICE: checking for available walsenders on the source node (2 required)<br>INFO: sufficient walsenders available on the source node<br>DETAIL: 2 required, 10 available<br>NOTICE: checking replication connections can be made to the source server (2 required)<br>INFO: required number of replication connections could be made to the source server<br>DETAIL: 2 replication connections required<br>NOTICE: standby will attach to upstream node 1<br>HINT: consider using the -c/--fast-checkpoint option<br>INFO: all prerequisites for &quot;standby clone&quot; are met</pre><pre># 正式<br># Node 2 &amp; Node 3<br>su - postgres -c&quot;/usr/pgsql-12/bin/repmgr -h 192.168.10.61 -U repmgr -d repmgr -f /etc/repmgr/12/repmgr.conf standby clone&quot;</pre><pre>&lt;&lt;&lt;輸出Log&gt;&gt;&gt;</pre><pre>NOTICE: destination directory &quot;/var/lib/pgsql/12/data&quot; provided<br>INFO: connecting to source node<br>DETAIL: connection string is: host=192.168.10.61 user=repmgr dbname=repmgr<br>DETAIL: current installation size is 32 MB<br>NOTICE: checking for available walsenders on the source node (2 required)<br>NOTICE: checking replication connections can be made to the source server (2 required)<br>INFO: checking and correcting permissions on existing directory &quot;/var/lib/pgsql/12/data&quot;<br>NOTICE: starting backup (using pg_basebackup)...<br>HINT: this may take some time; consider using the -c/--fast-checkpoint option<br>INFO: executing:<br>  /usr/pgsql-12/bin/pg_basebackup -l &quot;repmgr base backup&quot;  -D /var/lib/pgsql/12/data -h 192.168.10.61 -p 5432 -U repmgr -X stream<br>NOTICE: standby clone (using pg_basebackup) complete<br>NOTICE: you can now start your PostgreSQL server<br>HINT: for example: pg_ctl -D /var/lib/pgsql/12/data start<br>HINT: after starting the server, you need to register this standby with &quot;repmgr standby register&quot;</pre><pre># Node2 &amp; Node3 啟動PostgreSQL<br>systemctl enable postgresql-12.service<br>systemctl restart postgresql-12.service</pre><p>向repmgr註冊Standby Node</p><pre># Node 2 &amp; Node 3<br>su - postgres -c&quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf standby register&quot;</pre><p>檢查群集狀態</p><pre>su - postgres -c&quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf cluster show&quot;</pre><pre>su - postgres -c&quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf cluster show --compact&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*TOSbsJs_8hExM4j8A7JPeg.png" /></figure><p>配置automatic failover服務 Node-witness</p><pre># 初始化<br>/usr/pgsql-12/bin/postgresql-12-setup initdb</pre><pre># 修改<br>vi /var/lib/pgsql/12/data/postgresql.conf</pre><pre>listen_addresses = &#39;*&#39; <br>shared_preload_libraries = &#39;repmgr&#39;</pre><pre># 修改<br>vi /var/lib/pgsql/12/data/pg_hba.conf<br>#For Access Database<br>host    all             postgres    192.168.0.0/16          md5</pre><pre>#For Replication <br>local   replication     repmgr                              trust</pre><pre>host    replication     repmgr      127.0.0.1/32            trust</pre><pre>host    replication     repmgr      192.168.10.0/24         trust</pre><pre>local   repmgr          repmgr                              trust</pre><pre>host    repmgr          repmgr      127.0.0.1/32            trust</pre><pre>host    repmgr          repmgr      192.168.10.0/24         trust</pre><pre># 重啓服務<br>systemctl enable postgresql-12.service<br>systemctl restart postgresql-12.service</pre><pre># 創建repmgr資料庫與用戶<br>su - postgres<br>createuser --superuser repmgr<br>createdb --owner=repmgr repmgr<br>psql -c &quot;ALTER USER repmgr SET search_path TO repmgr, public;&quot;</pre><pre># Primary連結witness節點測試<br>su - postgres -c &quot;psql &#39;host=192.168.10.70 user=repmgr dbname=repmgr connect_timeout=2&#39;&quot;</pre><pre># 編輯<br>vi /etc/repmgr/12/repmgr.conf</pre><pre>node_id=4<br>node_name=&#39;node4-witness&#39;<br>conninfo=&#39;host=192.168.10.70 user=repmgr dbname=repmgr connect_timeout=2&#39;<br>data_directory=&#39;/var/lib/pgsql/12/data&#39;</pre><pre># 向repmgr註冊witness Node<br>su - postgres -c&quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf witness register -h 192.168.10.61&quot;</pre><p>所有Node編輯sudoers</p><pre>vi /etc/sudoer </pre><pre># 新增<br>Defaults:postgres !requiretty postgres ALL = NOPASSWD: /usr/bin/systemctl stop postgresql-12.service, /usr/bin/systemctl start postgresql-12.service, /usr/bin/systemctl restart postgresql-12.service, /usr/bin/systemctl reload postgresql-12.service, /usr/bin/systemctl start repmgr12.service, /usr/bin/systemctl stop repmgr12.service</pre><p>所有Node配置repmgr參數</p><pre>failover=&#39;automatic&#39;</pre><pre>priority=100 ///////// node1=100, node2=60, node3=40, witness不需要</pre><pre>connection_check_type=ping</pre><pre>reconnect_attempts=6</pre><pre>reconnect_interval=10</pre><pre>promote_command=&#39;/usr/pgsql-12/bin/repmgr standby promote -f /etc/repmgr/12/repmgr.conf --log-to-file&#39;</pre><pre>follow_command=&#39;/usr/pgsql-12/bin/repmgr standby follow -f /etc/repmgr/12/repmgr.conf --log-to-file --upstream-node-id=%n&#39;</pre><pre>monitoring_history=yes</pre><pre>monitor_interval_secs=2</pre><pre>standby_disconnect_on_failover=true</pre><pre>primary_visibility_consensus=true</pre><pre>log_status_interval=60</pre><pre>service_start_command = &#39;sudo /usr/bin/systemctl start postgresql-12.service&#39;</pre><pre>service_stop_command = &#39;sudo /usr/bin/systemctl stop postgresql-12.service&#39;</pre><pre>service_restart_command = &#39;sudo /usr/bin/systemctl restart postgresql-12.service&#39;</pre><pre>service_reload_command = &#39;sudo /usr/bin/systemctl reload postgresql-12.service&#39;</pre><pre>repmgrd_service_start_command = &#39;sudo /usr/bin/systemctl start repmgr12.service&#39;</pre><pre>repmgrd_service_stop_command = &#39;sudo /usr/bin/systemctl stop repmgr12.service&#39;</pre><p>啟動各Node的repmgr服務</p><pre>su - postgres -c &quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf daemon start&quot;</pre><pre># 開啟常駐<br>sudo /usr/bin/systemctl enable repmgr12.service</pre><pre># 檢查 repmgr 服務<br>su - postgres -c &quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf service status&quot;</pre><pre># 這邊可能會遇到無法啟動的狀況，參考以下做法，然後再試一次<br>mkdir /run/repmgr<br>chown postgres:postgres /run/repmgr<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NuOBSbegc1m6121Ck3sCcQ.png" /><figcaption>repmgrd 狀態</figcaption></figure><p>測試failover功能</p><pre># 停用primary <br>systemctl stop postgresql-12</pre><pre># 查看服務<br>su - postgres -c &quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf service status&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fRjSHfNzsUW046NTNqUpA.png" /><figcaption>過一會primary轉移到node2</figcaption></figure><p>舊Primary故障恢復後，並不會自動切換為Standby，而是以Primary角色獨自運行，需要手動將舊Primary強制轉換為Standby</p><pre># 這時 postgreSQL狀態應該還是關閉的</pre><pre># 轉為Standby，向新的Primary註冊<br>su - postgres -c &quot;/usr/pgsql-12/bin/repmgr -h 192.168.10.62 -U repmgr -d repmgr -f /etc/repmgr/12/repmgr.conf standby clone -F&quot;</pre><pre># 啟動PostgreSQL<br>sudo systemctl start postgresql-12.service</pre><pre># 註冊<br>su - postgres -c &quot;/usr/pgsql-12/bin/repmgr -f /etc/repmgr/12/repmgr.conf standby register -F&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*6KEDG8K6toKX__jnZiL1_w.png" /></figure><p>— 完成 —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bf77a0222f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CentOS Consul開發環境]]></title>
            <link>https://yang5664.medium.com/centos-consul%E9%96%8B%E7%99%BC%E7%92%B0%E5%A2%83-9322a97d919b?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/9322a97d919b</guid>
            <category><![CDATA[consul]]></category>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[服務發現]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Fri, 16 Oct 2020 04:12:27 GMT</pubDate>
            <atom:updated>2020-10-16T23:53:31.111Z</atom:updated>
            <content:encoded><![CDATA[<h3>CentOS 單一節點Consul</h3><p>在開發微服務時需要“服務發現”的測試環境，這邊使用consul</p><pre># 安裝<br><a href="https://learn.hashicorp.com/tutorials/consul/get-started-install">https://learn.hashicorp.com/tutorials/consul/get-started-install</a></pre><pre>sudo yum install -y yum-utils<br>sudo yum-config-manager --add-repo <a href="https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo">https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo</a><br>sudo yum -y install consul</pre><p>配置系統服務</p><pre>cat &lt;&lt;EOF &gt; /etc/systemd/system/consul.service<br>[Unit]<br>Description=consul agent<br>Requires=network-online.target<br>After=network-online.target<br><br>[Service]<br>EnvironmentFile=-/etc/sysconfig/consul<br>Environment=GOMAXPROCS=2<br>Restart=on-failure<br>ExecStart=/usr/bin/consul agent -config-dir=/etc/consul.d/server -dev -ui -data-dir=/var/consul<br>ExecReload=/bin/kill -HUP $MAINPID<br>KillSignal=SIGTERM<br><br>[Install]<br>WantedBy=multi-user.target<br>EOF</pre><p>啟動服務</p><pre>systemctl daemon-reload<br>systemctl start consul<br>systemctl enable consul</pre><p>查看服務</p><pre><a href="http://192.168.10.58:8500/ui">http://127.0.0.1:8500/ui</a></pre><p>— 完成 —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9322a97d919b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PHP swoole & ext-postgreSQL 開發環境搭建]]></title>
            <link>https://yang5664.medium.com/php-swoole-ext-postgresql-%E9%96%8B%E7%99%BC%E7%92%B0%E5%A2%83%E6%90%AD%E5%BB%BA-5e17c563ea5c?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e17c563ea5c</guid>
            <category><![CDATA[swoole]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Wed, 07 Oct 2020 02:33:10 GMT</pubDate>
            <atom:updated>2020-10-16T23:52:30.718Z</atom:updated>
            <content:encoded><![CDATA[<p>環境：centos 7</p><p>安裝 php 7.4</p><pre># 安装repo<br>sudo yum -y install <a href="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm">https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm</a><br>sudo yum -y install <a href="https://rpms.remirepo.net/enterprise/remi-release-7.rpm">https://rpms.remirepo.net/enterprise/remi-release-7.rpm</a></pre><pre>sudo yum -y install yum-utils<br>sudo yum-config-manager --enable remi-php74</pre><pre>sudo yum update<br>sudo yum install php php-cli<br>sudo yum install php  php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-pecl-mongodb php-pecl-redis</pre><p>安裝 swoole 4.5.4</p><pre># 下載<br>wget <a href="https://github.com/swoole/swoole-src/archive/v4.5.4.zip">https://github.com/swoole/swoole-src/archive/v4.5.4.zip</a></pre><pre># 編譯<br>cd swoole-src &amp;&amp; \<br>phpize &amp;&amp; \<br>./configure &amp;&amp; \<br>make &amp;&amp; sudo make install</pre><pre># 配置<br>vi /etc/php.d/80-swoole.ini<br>&lt;&lt;&lt;輸入以下內容&gt;&gt;&gt;<br>extension=swoole.so<br>swoole.use_shortname = &#39;Off&#39;</pre><p>安裝 <a href="https://github.com/swoole">swoole</a>/<a href="https://github.com/swoole/ext-postgresql">ext-postgresql</a></p><pre># 下載<br><a href="https://github.com/swoole/ext-postgresql/archive/master.zip">https://github.com/swoole/ext-postgresql/archive/master.zip</a></pre><pre>要求編譯環境：<br>1. Clang and LLVM Toolset 7.0<br>2. postgresql12-devel<br>3. libpq</pre><pre>安裝 Clang and LLVM Toolset 7.0<br>sudo yum install centos-release-scl<br>sudo yum install llvm-toolset-7.0</pre><pre>安裝 postgresql12-devel<br>sudo yum -y install <a href="https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm">https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm</a><br>sudo yum -y install yum-utils<br>sudo yum install postgresql12-devel</pre><pre>安裝 libpq<br>yum install libpq</pre><pre># 在編譯過程中會提示找不到&quot;postgresql/libpq-fe.h&quot;<br>找到檔案位置 find / -name libpq-fe.h <br># 這邊顯示 /usr/pgsql-12/include/libpq-fe.h<br>編輯檔案 vi swoole_postgresql_coro.h<br>#include &lt;postgresql/libpq-fe.h&gt; 改為 #include &quot;/usr/pgsql-12/include/libpq-fe.h&quot;</pre><pre># 編譯<br>cd <a href="https://github.com/swoole/ext-postgresql">ext-postgresql</a> &amp;&amp; \<br>phpize &amp;&amp; \<br>./configure &amp;&amp; \<br>make &amp;&amp; sudo make install</pre><pre># 配置<br>vi /etc/php.d/80-swoole.ini <br>&lt;&lt;&lt;新增以下內容&gt;&gt;&gt;<br>extension=swoole_postgresql.so</pre><p>重啓服務</p><pre>systemctl restart php-fpm</pre><p>— 完成—</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e17c563ea5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PostgreSql 複製完整資料表結構]]></title>
            <link>https://yang5664.medium.com/postgresql-%E8%A4%87%E8%A3%BD%E5%AE%8C%E6%95%B4%E8%B3%87%E6%96%99%E8%A1%A8%E7%B5%90%E6%A7%8B-83961403e2ed?source=rss-9de5edb2f830------2</link>
            <guid isPermaLink="false">https://medium.com/p/83961403e2ed</guid>
            <category><![CDATA[postgresql]]></category>
            <dc:creator><![CDATA[hsuan-ming Yang]]></dc:creator>
            <pubDate>Sun, 04 Oct 2020 15:50:44 GMT</pubDate>
            <atom:updated>2020-10-04T16:01:52.952Z</atom:updated>
            <content:encoded><![CDATA[<p>今日主題：最近使用PostgreSQL的partition時利用INHERITS繼承來源資料表，但是發現只有欄位會被參考，原本定義的index、unique都不見了。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0fI2Ai_7n2mvth5Au1HUxg.png" /><figcaption>來源資料表 — transactions</figcaption></figure><pre><a href="https://www.postgresql.org/docs/12/static/sql-createtable.html"><strong>CREATE TABLE</strong></a> <a href="http://154.222.0.58/adminer.php?pgsql=&amp;username=postgres&amp;db=gf_template&amp;ns=public&amp;table=transactions">transactions</a>_2020_10_10 (<br>    CHECK (belong_date = &#39;1900-01-01&#39;),<br>    <a href="https://www.postgresql.org/docs/12/static/functions-matching.html"><strong>LIKE</strong></a> <a href="http://154.222.0.58/adminer.php?pgsql=&amp;username=postgres&amp;db=gf_template&amp;ns=public&amp;table=transactions">transactions</a> INCLUDING INDEXES -- 重點<br>) INHERITS (<a href="http://154.222.0.58/adminer.php?pgsql=&amp;username=postgres&amp;db=gf_template&amp;ns=public&amp;table=transactions">transactions</a>);</pre><p>— 完成 —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83961403e2ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>