edb efm 190320 - edbジャパン · 112 ,f*mha"#- .e-!h*ha,!- ,fh*fh -afe ( ) *cc...
TRANSCRIPT
7 2 0 1
.� ��
�������������� �
EDB Postgres������HA����
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.3
����� #$�"�#�6.0=���NI[Y
• ����48*���/��
% Pgpool-II 6;= Master – Slave �
& EFM 6;= Master – Slave �
' Pgpool-II & EFM 6;= Master – Slave �
( EDB Replication Server 6;= Active –Active �
) @TFIZHOJ6;= Active – Passive �
• ���8*!�! ���� :DQ[J�2*DQ[J1>=��8��7�<+a. X[KZMTYEYA
b. CL@ESYZP[UYA
c. Pgpool-II��7� 7397� *WatchdogPXGF5Master-SlaveR[K
\pgpool-II 7,WPUB[ESY��-5,NTWVZ@?U��-8DQ[J���
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.4
7;4=.84��vo��P/ Pgpool-II Z_a Master – Slave ��
watchdog
pgpool-II
EPAS
watchdog
pgpool-II
EPAS
#+
#+
#+
mr~�{�h��y~i�l|�
��IP ��IP
G/W
#+
pfqg
• zmo�65�[^���(Rm��x65][��\Q7;4=3;GJKDIC=<:[mr~�{�h��y~i�l|�b�"R
• HDHHGGF2O\Q;IGMNk�uYVX%�Rg}dc�r�cy~i�l|�\Q HDHHGGF2OU��Wa��9;/>9;0b"SX�'R
• zmo�65-��\Qm��x65])`�T/�>9;[�T0
• jtgl|��y�~�hY��su}�l�hU�(
• ?@KAEBGD Z_a HDHHGGF2O[� #+
1.g}mo�nwrefc/HDHGGF84&0U�*
• L@KAEBGD. �,[$�#+Y����
− HDHGGF2O[%�!�
− 7;4=3;GJKDIC=<:[%�!�
zmo� m��x
Client Apps
pfqg
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.5
:@7B1<7"��~��P/ EFM ail Master – Slave "�
Read Replicas
Master Read Replicas
EFM AgentEFM Agent
Client Apps
�|~� |���
Read Replicas
EFM Agent
EFM Agent
|���
|���
��IP
• �|~�98bg ��(R|���98fb��cQ:@7B4@KMNGLFBA>b|�����w����x�z��n#R
• v�qo���o��x�z��cQ:;?Y�|~98a��\l��=@2C=@3a�[]ov}|298a�\l&�ov}|3
• �|~98b/��cQ�$��qt��pb0T|���98f) �k!V2�C=@b�!V3
• s�{r���o�u�v��^Q�s�{r��YQ�bs�{r��hQ��~��|`_b%+QWieQ�rp��t��`_n�*R
• 98y���^cQ�,s�{r��Y'�R
�|~�y�� 611�|~��s�{r��
|����y�� 611|����s�{r��
• ��b98"�2?EMNFL15�QBIEOF15�3b��cQDHNJFMM1s�{r��aikQ|�������q�n�.R ����Xj�l98"�^SmdQDHNFMMs�{r��n-ZlX_UXcQt�z��R
G/W
�r�v
�r�v
�r�v
�r�v
Stream
ing Replication
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.6
���������A<MK"/ Pgpool-II & EFM *./ Master – Slave ��
6
Master
Read Replicas
Read Replicas
Streaming Replication
EFM Agent
Pgpool-ll
DATA CENTER 1
DATA CENTER 2
EFM Agent
EFM Agent
Writes Reads
Client Apps
D:<M
:IMB
:IMB
• ��! �� ���) ����1�-�0'(��
• ��! �� ���,#7?49EKLCMGK5)JM>L@FK8M��1��
• ���,#��8M@+����1��
• :6MHL23=)��;K9EK1� &/��%$/*�
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.7
��������KEWU-/ Replication Server 8<= Active –Active �
Master
Client Apps
Replication Server
Master Master
IP IP IP
TMRAWBPU
• �����'*+#)!*��!(%$ �+$'&��!),!)�8<=.GWLSVTNS9OSFVOCEWVTMRAWBPU/
• @Q?>UIV>MRAWBPU:.�OCEW��9��>JTC8>@DC/
• �59HWENWC1.OCEW��725��3=96.�59HWENWC1���/
• HWE�6�'&"%$ +1��3=���:0=96.� 3=4;9��1��/
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.8
������� >9FD�/ 4A79E8?;),. Active – Passive
• :F9/��:074'����
• ��!.4A79BD58?;�����),- ���)��(?21CE3F=F
p Service Guardp Red Hat Clusterp Veritas Clusterp LinuxHAp Cluster Prop LifeKeeper
(*) EDB+ $* �#*6D@F<D;+�%&"("�)��
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.9
���~� �� �(0�
p_a{h{e6��p_aDBKcS_Y6�
\gY^ryzn{tyZ _[{uzRTd�!�5 c{azw_�/�
9Master-Slave
• Pgpool-ll #*�5+Promote�5
7�"vnt[{^ryAO
�"vnt[{^ryID
DB6�#*�?Sla}|J�! >
>(*3)
:• EDB Postgres Failover Manager X X
(*4)
;• Pgpool-ll (*1)• EDB Postgres Failover
Manager>
>(*3)
<Active-Active • EDB Postgres Replication
Server#*�5 ID
(�D?Conflict�K��C�2)
DB6�#*�?�]{iG-.�/ >
>(*5)
=
Active-Passive
• 3rdj{bSKYs_a{z`ldTUR (*2)
#*�5+FSpTyd�5+EDB Postgres 3�5
ID qcSRztXit+EDB Postgres 3+lVx{eztXit
> X
HAYs_a$�K&4
L?\gY^ryzn{tyZ%/Hw{eisy^yZ%/Q��@
2-)3M?) B 1 ? +Q�(@
3 5C �(JNP�',K_[{uRTdC�/@ Q�G�(EP� ?1�_v{m*($�Q]o{dDFBPKG?)14Wlw{e)I�(L�/@ Rnt[{^ryzj{bS^rfyZ�/I� L? �,K_[{uzRTdC�/@�D?) K��C�2@
•]{k_-./�L?Master-Slave�K�C8B
) ( ( ��
,F MHA .E H HA - ,FH FH AFE ( ) *CC HA H HL11
������������
t y i o• .- F H - * H /- 0 FF M 2 FE F HB Xm
• .- F H CA AFE HL H pl- –
• .- F H * ,FEE FH *c t8 gW sn
������������T u S• .- F H A H AFE * D E k
• .- F H A H AFE 8FFC 1A pl- u S
���� �����i t ht tTe t t
d i• .- F H .E H HA E H r . * F H 2 R a i
• .- F H / ACFL H E H . * F H 2 0*• .- F H BK E FL HM . * F H 2 t
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.12
• (8MQS?QW
• CfKBdS + Witness9;<4RfOYfL:Split-Brain:2#
• ��IP(VIP)>��
• ,�:SlaveIfU:���>&9���)
• pgpool-ll 7:/�64Read :LHfb?AS5�)
• RfOYfL:XbLePBQF & ELO\e^TOadG")
• LSaf[dGecWaHfJ_d:� $�:PBQF
• CfKBdS1:XbLePBQF
• ZLO3��*VB@beDfU7F`LO�!�
• ��8L@QPeDfU/L@QPeUQF")
• FencingLFaWS9;=�0aNfL:��
• F`LO!����:]fb.'7Hook�%:�+
• F`LO!����:]fb-�")
EDB Postgres Failover Manager
Master
Read Replicas
Read Replicas
Streaming Replication
EFM Agent
pgpool-ll
DATA CENTER 1
DATA CENTER 2
EFM Agent
EFM Agent
Writes Reads
Client Apps
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.13
Pgpool-ll EFM � -
VIP%.�� 9 9
DBZbLODPG&/WDCbgEhV 9 9 EFM: recovery.conf/)�=@ASplit-Brain>8&
LCPOgEhVh/LCPOgVPG 9 9 EFM: �#'�>ODPG;recovery.conf/)�=@A�!:+�<LCPOgEhV
3 LchXDB�� 9 9
dhSgV`fKfH%. 9 i
IUGK_fgYhafH%. 9 i
QhN[hL>Split-Brain>8& i 9 EFM: Agent�+Witness
FLN\g^TNafH%. i 9 EFM: 4�>ZbLODPGB�1�.
3 SlaveJhV>���>*<�� i 9
DBJhV7UPRehG>ZbODPG i 9
FencingLGaYR=@A�6aMhL�� i 9
G`LN$��">Hook�(�0 i 9
G`LN$��">]hb5� i 9
Ef`CfgaFVa%. 9 i EFM: BART=@AEf`CfgaFVaB��
2 >FVh,�
Pgpool-ll>�?
EFM>�?
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.14
H>RP��*��
?3CL@7)<9ROQ24B(Read)!��
2JN9R;MP�'*�:D7;MPQJRNP8!��S��)=@;MP1��".��!�.)
pgpool-ll+“��”⇒H>RP� or H>RP�
pgpool-ll 1 �%HA��*E4F4!�. pgpool-ll 1� [ H>RP� ]
EFM1� [ H>RP� ]$/��
Pgpool-ll + EFM �,�0#
[ H>RP� ]
AR>KR<*I53OQ6RGR1�pgpool-ll or EFM(&-'��
DB��
:D7;MPQJRNP8
<9ROQ24B
) ( ( ������
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.16
EFM��� ���# ��� "3(#4 "3(#2 "3(#3 � �
1OS�1%&3/ & NIC��
� � �• Java � SMTP��• NIC Bonding
2EDB Postgres Advance Server �1%&3/
� � �
3
%&3+1�20). 3$-1� �
(Master)�
(Slave)�
(Slave)
• 0). 3$-12,3#��• postgresql.conf / pg_hba.conf��• pg_basebackup ���• recover.conf�
4EDB Failover Manager�1%&3/
� � �• yum!*1'����1%&3/
5EFM �� & ��
� � �• efm.properties��• efm.nodes��
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.17
efm.propertiesdb.user=enterprisedbdb.password.encrypted=47d5b98afb4f60f3af1ef71f1985f4dcdb.port=5444db.database=edbdb.service.owner=enterprisedbdb.service.name=edb-as-10db.bin=/opt/edb/as10/bindb.recovery.conf.dir=/opt/edb/as10/datajdbc.sslmode=disableuser.email=katsuji.takatsuru@enterprisedb.comnotification.level=INFObind.address=192.168.0.xxx:7801admin.port=7802is.witness=falselocal.period=10local.timeout=30local.timeout.final=10remote.timeout=10node.timeout=50stop.isolated.master=truescript.master.isolated�stop.failed.master=truescript.db.failure=master.shutdown.as.failure=falsepingServerIp=192.168.0.1pingServerCommand=/bin/ping -q -c3 -w5auto.allow.hosts=true
stable.nodes.file=truedb.reuse.connection.count=0auto.failover=trueauto.reconfigure=truepromotable=trueminimum.standbys=0recovery.check.period=2auto.resume.period=10virtualIp=192.168.100.160virtualIp.interface=ens34virtualIp.prefix=24virtualIp.single=truecheck.vip.before.promotion=truesudo.command=sudosudo.user.command=sudo -u %ulock.dir=log.dir=syslog.host=localhostsyslog.port=514syslog.protocol=UDPsyslog.facility=LOCAL1file.log.enabled=truesyslog.enabled=falsejgroups.loglevel=DEBUGefm.loglevel=DEBUGjvm.options=-Xmx128m
�DB����IP�������
��IP/����NIC���
������������ �
syslog����
DB���
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.18
efm.properties (��) / #$+1,&$.0"script.custom.monitor=
custom.monitor.interval=
custom.monitor.timeout=
custom.monitor.safe.mode=false
11111 #$*1,&$.0"�����
11111 #$+1,&$.0"1#!.)%�� ��3�4
11111 #$+1,&$.0"1#!.)%�� ���
11111 #$+1,&$.0"1#!.)%��-2�������� ’TRUE’�����(��/1�2'2� ����
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.19
efm.properties (�') / 4B89�����-AF6��script.notification=
script.load.balancer.attach=
script.load.balancer.detach=
script.fence=
script.post.promotion=
script.resumed=
script.remote.pre.promotion=
script.remote.post.promotion=
EEEEE ��5F=8+@FC�-��0�
EEEEE pgpool-ll � / DB5F<-4B89��/���
EEEEE pgpool-ll � / DB5F<-4B89�"/#��
EEEEE 89D<1DB&?89DB.��)/�-��0�
EEEEE 89D<1DB&?89DB.��(* -��0�
EEEEE 3F72D;&:F9>F8��0�!)/�-��0�
EEEEE 89D<1&���$����-89D<1&���,�%��0�
EEEEE 89D<1&���$����-89D<1&�� ,�%��0�
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.20
efm.nodes
# List of node address:port combinations separated by whitespace.192.168.0.162:7801 192.168.0.163:7801
efm.nodes@edbefm01
# List of node address:port combinations separated by whitespace.192.168.0.161:7801 192.168.0.163:7801
efm.nodes@edbefm02
# List of node address:port combinations separated by whitespace.192.168.0.161:7801 192.168.0.16:7801
efm.nodes@edbefm03
) ( ( ��
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.22
���� / 32@1�&;,-�[root@edbefm02 efm-3.4]# date; /usr/edb/efm-3.4/bin/efm cluster-status efm2019� 3� 18� 10:13:33 JSTCluster Status: efm
Agent Type Address Agent DB VIP-----------------------------------------------------------------------Master 192.168.0.161 UP UP 192.168.0.160*Standby 192.168.0.162 UP UP 192.168.0.160Standby 192.168.0.163 UP UP 192.168.0.160
Allowed node host list:192.168.0.161 192.168.0.191 192.168.0.162 192.168.0.163
Membership coordinator: 192.168.0.162
Standby priority host list:192.168.0.163 192.168.0.162
Promote Status:
DB Type Address XLog Loc Info--------------------------------------------------------------Master 192.168.0.161 5/C50001E0Standby 192.168.0.163 5/C50001E0Standby 192.168.0.162 5/C50001E0
Standby database(s) in sync with master. It is safe to promote.
• $@+#>0�/@-7@,�,.@-,
• VIP���
• ,->3"DB�6;"%<.!
• EFM&;,-���� 2@1
• ,0<@9>'?=6<(@*:>���
EFM����8,-@DB�����1st ,=@5)@3�����)@4
,��
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.23
� ������
[root@edbefm02 efm-3.4]# /usr/edb/efm-3.4/bin/efm promote efm -switchoverPromote/switchover command accepted by local agent. Proceeding with promotion and will reconfigure original master. Run the 'cluster-status' command for information about the new cluster state
[root@edbefm02 efm-3.4]# date; /usr/edb/efm-3.4/bin/efm cluster-status efm2019� 3� 18���� 10:42:54 JSTCluster Status: efm
Agent Type Address Agent DB VIP-----------------------------------------------------------------------Standby 192.168.0.161 UP UP 192.168.0.160Standby 192.168.0.162 UP UP 192.168.0.160Master 192.168.0.163 UP UP 192.168.0.160*
Allowed node host list:192.168.0.161 192.168.0.191 192.168.0.162 192.168.0.163
Membership coordinator: 192.168.0.162
Standby priority host list:192.168.0.161 192.168.0.162
Promote Status:
DB Type Address XLog Loc Info--------------------------------------------------------------Master 192.168.0.163 5/C70001A8Standby 192.168.0.161 5/C70001A8Standby 192.168.0.162 5/C70001A8
Standby database(s) in sync with master. It is safe to promote..
• 1st ������192.168.0.163 ���������
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.24
������� �����
[root@edbefm02 efm-3.4]# efm34 set-priority efm 192.168.0.162 1set-priority signal sent to local agent.[root@edbefm02 efm-3.4]# date; /usr/edb/efm-3.4/bin/efm cluster-status efm2019� 3� 18���� 10:58:14 JSTCluster Status: efm
Agent Type Address Agent DB VIP-----------------------------------------------------------------------Standby 192.168.0.161 UP UP 192.168.100.160Standby 192.168.0.162 UP UP 192.168.100.160Master 192.168.0.163 UP UP 192.168.100.160*
Allowed node host list:192.168.0.161 192.168.0.191 192.168.0.162 192.168.0.163
Membership coordinator: 192.168.0.162
Standby priority host list:192.168.0.162 192.168.0.161
Promote Status:
DB Type Address XLog Loc Info--------------------------------------------------------------Master 192.168.0.163 5/C70001A8Standby 192.168.0.161 5/C70001A8Standby 192.168.0.162 5/C70001A8
Standby database(s) in sync with master. It is safe to promote.
• 192.168.0.162��1st ������
������
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.26
� �+�
Postgres ���1�)�=8G+,2%��-1�.6(7B�
FL�'-4�/5(�-!05
− +,2%����-1�.6(�1�)� DBaaS �-!05
− DevOps '-4�/5(H� 5&*
− ���;� Postgres
>C��1�)JK
Postgres ���1�3�D�EN��6-5#6"�9D<
��+� �
• 3F5H)+���• C16IL7EKBL;H• >L;��#.,��=5?J8L
�1�3���M@
Postgres ��A���-2�6!05�MI���EN��6-5#6"'6$.6"
��$��)&/��+��
• @A2LCK9!:4DG=0!��• ��$�*��%("/<LH)+��
• �����+'-+<LH
?:��Postgres
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.
GqUrclDSKlR;TJjmYC7���
TJjmYC]rSA#5391>.�+!9ZrUdrR6;`aHrfqRA �4@-�]rS:��
• =?�2;�KGm;��*
• DqUraFDR.zHeap.undo*98;"��R[orQoDir
• Jrf^rQhq[PRYg;�&
• TDE 7TJjmYC;�
2020���
• Kafka/Zookeeper drR; EDB ocmLrPkqNr_r
• ��9 �Jr'$
• HA %�; EFM 7 pgPool(���
2019���
• ���; �: *��[lqOKPkq.ZrUmVKPkq
• EFD[RYr[ B\lDOr.JIT KGmMq`Dn *.0=<`rYCPkq;aHrmqJr:=@`aHrfqR; � *
• bpXKodn;��_XKBXc.�_XKBXc.�)
• ZrUTqUr,;aFDnIr_r7 sudo A�&39/ HA ;fnW VIP Ner[
�����
27
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.
����
^<iQJeajFci(6 ���[dMQY?j_10�#
Njf0���
− Postgres 11 0 EDB =><QGOjQ :Sd<E
− ��DiJjf(657�)0PjK\jG9�% "
− �!.����/58'&VMB:M[
��
��0���
• d<IiGAj�$• hiBeMB- Linux �0U<O;Z<iGQjdj/�
• <iGQjf.��0+40GjWjbjEj$��$
���
*2,0��Njf9 PEM LMFa]jR(6@jCGQgjFci
• :BIG�`Pf0���. �
• :BIFXeO;0TjHWCAG g\fAA /2020�3-/��
��
28
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.
�#�%� ��$�%"���
��
• AWS S3 ����7��'���!�!���$����(�89
• �5��!15�.3(/�!&�5,@�=<�3�"#�� '�!15��*5!
�%"��%���
• NetBackup�Tivoli �!15�4+#5�-5�Networker ��*5!
• %5!"5��C:�� 5�+��3��*5!
����%�����%"
• Nagios ��#�%� �����!#� PEM SNMP� ������ %�
• Syslog ��EFM�)3!2�3�
• DAB@ Quest Software Toad Edge
2020;6:2019;6:?>��50
29
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.30
ORACLE ������������ (1*+&)������������!��#-�"������ ������
)%2.���
• [\�Y9: XK��4)� �;���.4AG
• �3.�3Migration Portal ��4*0��24�&14
�����
• EPAS11�UFB".3���-3�(4"
• DBMS_REDACT % �4�
$-0'2(/1��
• P ISV W?��� OCI D<C=
• 7IHNT^��#�,+3"J@
,2*��
• EDBO680'/�4�-3 Replication Server 7 �MZH>5
���
• SQ�+3!$3���LE_��3��*
• �.�#�RV���)��04�-3�SQ:]
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.31
MIGRATION PORTAL���� ����������
EDB Migration Portal ��
• �+�-�� Postgres �A5��.+�./(0�-
• 10:41�GN���T9�FS'0�
• Oracle ��"���%3?=
• GNOH: ��0)�DB �0!� &,�0�*.�.�0$���
• �+�!�0�.���>;
AU�DL
• Postgres 11
• M<7 +.���*.
PE/CQ2
• EDB �+�!�0�'0��0#��I6
• @���0!KR�DB8J
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.32
SU<I8D���
• CDS: GA�"TG"/T*�AWS ���I"*RU/NTHU5Q�DSA0N>T*
• Ark: HA,T4UQ����
• PEM: #$";19U; =O".• ?U;: v11-HU;• EFM: I15U/K8;6#T�B$"Q'U?U
• EPRS: V7 GA�V11-HU;• I"*RU/NTHU5Q: GA������1(UI��CDS"T15T1�DSA0N>T*
• ,T9=: Red Hat OpenShift��,T9=�GKE�Helm7KU;�IBM Cloud Private
• Debian@8+U0
• CDS: P.UC<"T15T1�DO"EU;���)S1PU0NT)O15
• Ark: ���RDP+U/NT
• PEM: BART���Ark��• BART: MU.AP9!�@B&UIT1
• EFM: Windows-HU;
• EPRS: '���������!�update/update�insert/insert�3*40����%$�26,(
• ���" �!�"��: �����-+
• ,T9=: 'FRU5�PKS
• CDS: Azure• Ark: ��RDP+U/NT�B$:RU/NT)O#<
• PEM: EPRS���WCAG2.0 AA�
• BART: NetBackup�XBSA����
• EPRS: Oracle/SQL Server MMR (����"�)�SAP Sybase SMR/MMR�EFM5*
• ���" �!�"��: V12��"�
• EPAS: V12 GA• ,T9=: PostgreSQL�
Docker%T5UDO"2�EKS
• CDS: )S1)O#<RDP+U/NT
• Ark: ,T9=�:DS"JT;
• PEM: 3(LP9!RHU;• BART: S3 1;RU0�BQ?8) 8D�@ORQP1; �Windows-HU;
• EPRS: Design Studio�Oracle/SQL Server �"�����" �!�Windows��"�
• Data Adapters: ����&0�S3��"�
• zHeap• ���"��!���"�• 891�"�.)( (TDE)
Man
agem
ent
Suite
Inte
grat
ion
Suite
Dat
abas
e /
Plat
form
DB
aaS
Q1 2019 Q2 2019 Q3 2019 – Q4 20192020/7#
3 9 0. 2 0 3 3 032 11 0. ,