summaryrefslogtreecommitdiff
path: root/doc/src/sgml/example-Aurora.sgml
blob: 540132f32d5c530127d276ad021207a5cb784bc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<sect1 id="example-Aurora">
 <title>Aurora Configuration Example</title>

 <para>
  <productname>Amazon Aurora for PostgreSQL
   Compatibility</productname> (Aurora) is a managed service for
  <productname>PostgreSQL</productname>. From user's point of
  view, <productname>Aurora</productname> can be regarded as a
  streaming replication cluster with some exceptions. First,
  fail over and online recovery are managed
  by <productname>Aurora</productname>. So you don't need to
  set <xref linkend="guc-failover-command">, <xref linkend="guc-follow-primary-command">,
    and recovery related parameters. In this section we explain
    how to set up <productname>Pgpool-II</productname> for Aurora.
 </para>

 <sect2 id="example-Aurora-config">
  <title>Setting pgpool.conf for Aurora</title>
  <para>
   <itemizedlist>
    <listitem>
     <para>
      Create <filename>pgpool.conf</filename>
      from <filename>pgpool.conf.sample</filename>.
      Make sure your <filename>pgpool.conf</filename> includes following line:
      <programlisting>
backend_clustering_mode = streaming_replication
      </programlisting>
     </para>
    </listitem>
    <listitem>
     <para>
      Set <xref linkend="guc-sr-check-period"> to 0 to
       disable streaming replication delay checking.  This
       is because <productname>Aurora</productname> does
       not provide necessary functions to check the
       replication delay.
     </para>
     <programlisting>
sr_check_period = 0
     </programlisting>
    </listitem>
    <listitem>
     <para>
      Enable <xref linkend="guc-enable-pool-hba"> to on so
       that md5 authentication is enabled
       (<productname>Aurora</productname> always use md5
       authentication).
     </para>
     <programlisting>
enable_pool_hba = on
     </programlisting>
    </listitem>
    <listitem>
     <para>
      Create <filename>pool_password</filename>. See <xref linkend="auth-md5">
       for more details.
     </para>
    </listitem>
    <listitem>
     <para>
      Set <xref linkend="guc-backend-hostname">0 for the Aurora cluster endpoint.
	  Set <xref linkend="guc-backend-hostname">1 for the Aurora reader endpoint.
	  Set appropriate <xref linkend="guc-backend-weight"> as usual.
	  You don't need to set <xref linkend="guc-backend-data-directory">.
     </para>
     <programlisting>
backend_hostname0 = 'cluster endpoint'
backend_hostname1 = 'reader endpoint'
     </programlisting>
    </listitem>
    <listitem>
     <para>
      Set <varname>ALWAYS_PRIMARY</varname> flag to
      the <xref linkend="guc-backend-flag">
      for <xref linkend="guc-backend-hostname">0.
     </para>
    </listitem>
    <listitem>
     <para>
      Because failover is managed by Aurora, set <varname>DISALLOW_TO_FAILOVER</varname> flag to
      the <xref linkend="guc-backend-flag">
      for <xref linkend="guc-backend-hostname">0 and <xref linkend="guc-backend-hostname">1.
     </para>
     <programlisting>
backend_flag0 = 'ALWAYS_PRIMARY|DISALLOW_TO_FAILOVER'
backend_flag1 = 'DISALLOW_TO_FAILOVER'
     </programlisting>
    </listitem>
    <listitem>
     <para>
      Set <xref linkend="guc-health-check-period"> to 0 to disable health checking.
     </para>
     <programlisting>
health_check_period = 0
     </programlisting>
    </listitem>
    <listitem>
     <para>
      Disable <xref linkend="guc-failover-on-backend-error">
       to avoid failover when connecting to the backend or
       detecting errors on backend side while executing
       queries for the same reasons above.
     </para>
    </listitem>
   </itemizedlist>
  </para>
 </sect2>
</sect1>