SlideShare a Scribd company logo
1 of 67
Download to read offline
Copyright©2018 NTT Corp. All Rights Reserved.
Architecture & Pitfalls

of Logical Replication
NTT OSS Center
Atsushi Torikoshi
PGConf.US 2018
2
Who am I
➢Atsushi Torikoshi
➢@atorik_shi
➢torikoshi_atsushi_z2@lab.ntt.co.jp
➢NTT Open Source Software Center
➢PostgreSQL technical support
➢PostgreSQL performance verification
Copyright©2018 NTT Corp. All Rights Reserved.
3
About NTT
• Who we are
– NTT(Nippon Telegraph and Telephone Corporation)
– Japanese telecommunications company
• What NTT OSS Center does
– Promotes the adoption of OSS by the group companies
• Total support
– support desk, Introduction support, Product maintenance
• R&D
– developing OSS and related tools with the communities
• Deals about 60 OSS products
– developing OSS and related tools with the communities
NTT
NTT OSS Center
Copyright©2018 NTT Corp. All Rights Reserved.
Copyright©2018 NTT Corp. All Rights Reserved.
4
•Background of Logical Replication
•Architecture and Behavior
•Pitfalls
•Summary
INDEX
Copyright©2018 NTT Corp. All Rights Reserved.
5
BACKGROUND OF
LOGICAL REPLICATION
Copyright©2018 NTT Corp. All Rights Reserved.
6
PostgreSQL has built-in Physical Replication
since 2010.
It replicates a whole DB by sending WAL.
Suitable for load balancing and high
availability.
Physical Replication
Upstream Downstream
sendTable
Table
Table
WALWAL WALWAL Table
Table
Table
replay
Copyright©2018 NTT Corp. All Rights Reserved.
7
Physical Replication cannot do things like:
• partial replication
• replication between different major version
PostgreSQL
Logical Replication has added flexibility to
built-in replication and made these things
possible!
Logical Replication
Upstream Downstream
decode, sendTable
Table
Table
WALWAL WALWAL Table
Table
apply
write
Copyright©2018 NTT Corp. All Rights Reserved.
8
Comparison between Logical and Physical Replication
Physical Logical
way of the
replication
Sending and
replaying all
WAL
decoding WAL and extracting changes
downstream DB copy of the
upstream DB
not necessarily the same as upstream
DB
up/downstream DB can be different
PostgreSQL version
manipulations
for downstream
DB
SELECT only No restriction, but some manipulations
may lead to conflict
What is
replicated
ALL views, partition root tables, large
objects and some manipulations
including DDL are NOT replicated
Copyright©2018 NTT Corp. All Rights Reserved.
9
Logical Replication enables flexible data
replication.
1. Replicating partial data for analytical
purpose
2. Consolidating multiple DBs into a single
one
3. Online version up
Expected use cases of Logical Replication
(1) (2)
(3)
Copyright©2018 NTT Corp. All Rights Reserved.
10
ARCHITECTURE

AND

BEHAVIOR
Copyright©2018 NTT Corp. All Rights Reserved.
11
• ‘walsender’ and ‘apply worker’ do most of
the work for Logical Replication.
• ‘sync worker’ and corresponding
‘walsender’ run only at initial table sync.
Basics of the architecture
WAL
wal
sender
Publisher (upstream)
write
wal
sender
apply
worker
launcher
sync
worker
launch
launch
Subscriber(downstream)
backend
process
read
decode
backend
process
Copyright©2018 NTT Corp. All Rights Reserved.
12
• ‘walsender’ reads WAL and decodes it. Then
sends it to subscriber.
• ‘apply worker’ applies that change.
Basics of the architecture ~replication
WAL
backend
process
wal
sender
Publisher
write
read
apply
worker
Subscriber
TableTableTable
write
decode
send
change
Copyright©2018 NTT Corp. All Rights Reserved.
13
• ‘walsender’ reassembles queries by its
transaction.
• When WAL is INSERT, UPDATE or DELETE,
‘walsender’ keeps the change in memory.
Basics of the architecture ~replication
WAL
walsender
INSERT
UPDATE
UPDATE
DELETE
UPDATE apply
worker
Publisher Subscriber
:transaction
Copyright©2018 NTT Corp. All Rights Reserved.
14
• ‘walsender’ reassembles queries by its
transaction.
• When WAL is INSERT, UPDATE or DELETE,
‘walsender’ keeps the change in memory.
Basics of the architecture ~replication
WAL
walsender
INSERT
UPDATE
UPDATE
DELETE
UPDATE
1. read WAL
apply
worker
Publisher Subscriber
:transaction
Copyright©2018 NTT Corp. All Rights Reserved.
15
• ‘walsender’ reassembles queries by its
transaction.
• When WAL is INSERT, UPDATE or DELETE,
‘walsender’ keeps the change in memory.
Basics of the architecture ~replication
WAL
walsender
INSERT
INSERT
UPDATE
UPDATE
DELETE
UPDATE
1. read WAL
2. decode
apply
worker
Publisher Subscriber
:transaction
Copyright©2018 NTT Corp. All Rights Reserved.
16
• ‘walsender’ reassembles queries by its
transaction.
• When WAL is INSERT, UPDATE or DELETE,
‘walsender’ keeps the change in memory.
Basics of the architecture ~replication
WAL
walsender
INSERT
INSERT
UPDATE
UPDATE
DELETE
UPDATE
1. read WAL
2. decode
3. reassemble
by transaction
apply
worker
Publisher Subscriber
:transaction
INSERT
Copyright©2018 NTT Corp. All Rights Reserved.
17
• When WAL is COMMIT, ‘walsender’ sends all
the changes for that transaction to
subscriber.
Basics of the architecture ~replication
:transaction
WAL
apply
worker
walsender
COMMIT
INSERT
UPDATE
UPDATE
DELETE
UPDATE
1. read WAL
2. decode
4. send
Publisher Subscriber
3. reassemble
by transaction
COMMIT
Copyright©2018 NTT Corp. All Rights Reserved.
18
• When WAL is ROLLBACK, ‘walsender’ just
throws away the changes for that
transaction.
Basics of the architecture ~replication
:transaction
WAL
walsender
ROLLBACK
INSERT
UPDATE
UPDATE
DELETE
UPDATE
ROLLBACK
1. read WAL
2. decode
4. cleanup
apply
worker
Publisher Subscriber
3. reassemble
by transaction
Copyright©2018 NTT Corp. All Rights Reserved.
19
• At initial table sync, COPY runs.
• COPY is done by dedicated ‘walsender’ and
sync worker. These processes exit after
COPY is done.
Initial table sync
WAL
backend
process
wal
sender
Publisher
write
read
apply
worker
Subscriber
TableTableTable
sync
worker
wal
sender write
(COPY)
Copyright©2018 NTT Corp. All Rights Reserved.
20
• PostgreSQL doesn’t have merge agents for
conflict resolution. If there are multiple
changes for the same data at one time, the
last change is reflected.
(Not) Conflict
Publisher Subscriber
id name
1 ‘A’
2 ‘B’
id name
1 ‘A’
2 ‘B’
Copyright©2018 NTT Corp. All Rights Reserved.
21
• PostgreSQL doesn’t have merge agents for
conflict resolution. If there are multiple
changes for the same data at one time, the
last change is reflected.
(Not) Conflict
Publisher Subscriber
2. UPDATE table SET name = ‘Y‘
WHERE id = 2
id name
1 ‘A’
2 ‘Y’
1. UPDATE table SET name = ‘X‘
WHERE id = 2
id name
1 ‘A’
2 ‘X’
Copyright©2018 NTT Corp. All Rights Reserved.
22
• PostgreSQL doesn’t have merge agents for
conflict resolution. If there are multiple
changes for the same data at one time, the
last change is reflected.
(Not) Conflict
Publisher Subscriber
2. UPDATE table SET name = ‘Y‘
WHERE id = 2
id name
1 ‘A’
2 ‘X’
1. UPDATE table SET name = ‘X‘
WHERE id = 2
3. replicate
id name
1 ‘A’
2 ‘X’
Copyright©2018 NTT Corp. All Rights Reserved.
23
• If replicating data causes an error at
subscriber side, the replication stops.
Conflict
Publisher Subscriber
id
1
2
1. INSERT INTO table VALUES (2);
id
1
2
2. INSERT INTO table VALUES (2);
Copyright©2018 NTT Corp. All Rights Reserved.
24
• If replicating data causes an error at
subscriber side, the replication stops.
Conflict
Publisher Subscriber
id
1
2
1. INSERT INTO table VALUES (2);
id
1
2
2. INSERT INTO table VALUES (2);
3. replicate
Copyright©2018 NTT Corp. All Rights Reserved.
25
• If replicating data causes an error at
subscriber side, the replication stops.
Conflict
Publisher Subscriber
id
1
2
2. INSERT INTO table VALUES (2);
id
1
2
1. INSERT INTO table VALUES (2);
3. replicate 4. conflict
Copyright©2018 NTT Corp. All Rights Reserved.
26
• Users must resolve conflict manually.
• After the conflict is resolved, replication is
resumed.
Conflict
Publisher Subscriber
id
1
2
2. INSERT INTO table VALUES (2);
id
1
2
1. INSERT INTO table VALUES (2);
3. replicate 4. conflict
Copyright©2018 NTT Corp. All Rights Reserved.
27
PITFALLS
Copyright©2018 NTT Corp. All Rights Reserved.
28
Q1. How does ‘walsender’ deal with WAL
which are NOT target of replication?
Copyright©2018 NTT Corp. All Rights Reserved.
29
A1. ‘walsender’ decodes most of
the WAL.
Copyright©2018 NTT Corp. All Rights Reserved.
30
• behavior: 'walsender’ decodes *all* of the
changes to the target database, NOT just
the changes to subscribed tables.
1. ‘walsender’ decodes most of the WAL
Copyright©2018 NTT Corp. All Rights Reserved.
31
• pitfall: Changes in non-subscribed tables
even consume resources, such as CPU and
memory.
1. ‘walsender’ decodes most of the WAL
perf visualization of walsender updating only non-subscribed tables
DecodeDelete DecodeInsert DecodeCommit
Copyright©2018 NTT Corp. All Rights Reserved.
32
• Lesson: ‘walsender’ consumes resources
depending on the whole amount of changes
on the publisher database database, NOT
only on the amount of changes on
subscribed tables.
1. ‘walsender’ decodes most of the WAL
Copyright©2018 NTT Corp. All Rights Reserved.
33
Q2. Does keeping changes on walsender
cause issues?
Copyright©2018 NTT Corp. All Rights Reserved.
34
A2. Yes, It may consume a lot of memory.
Copyright©2018 NTT Corp. All Rights Reserved.
35
• behavior: ‘walsender’ keeps each change of
a transaction in memory until COMMIT or
ROLLBACK.
2. ‘walsender’ may consume a lot of memory
Copyright©2018 NTT Corp. All Rights Reserved.
36
• pitfall: It may cause ‘walsender’ to
consume a lot of memory.
2. ‘walsender’ may consume a lot of memory
Type of manipulation Measures to prevent memory use
many changes in
one transaction
walsender’ has a feature to spill
out changes to disk, when the
number of changes in one
transaction exceeds 4096.
changes which
modifies much data
There are no feature to avoid using
memory.
many transactions
many savepoints
※ Patches changing this behavior are under discussion.
Copyright©2018 NTT Corp. All Rights Reserved.
37
• lesson: If possible, it’s better to avoid the
manipulations which have no measures to
prevent consuming a lot of memory.
Monitoring memory usage at publisher may
be a good idea.
2. ‘walsender’ may consume a lot of memory
Copyright©2018 NTT Corp. All Rights Reserved.
38
Q3. Can we use synchronous replication in
Logical Replication?
Copyright©2018 NTT Corp. All Rights Reserved.
39
A3. Yes, but the response time may
be quite long.
Copyright©2018 NTT Corp. All Rights Reserved.
40
• behavior: Under synchronous replication,
before replying to the client, publishers
wait for the COMMIT responses from all the
subscribers.
3. The response time may be quite long
Publisher
table
2
table
1
Client
BEGIN;
INSERT INTO Table1 VALUES (‘a’);
COMMIT;
(1)
(4)
Subscriber
table
1
BEGIN;
INSERT INTO Table1 VALUES (‘a’);
COMMIT;
(2)
(3)
Table1
Copyright©2018 NTT Corp. All Rights Reserved.
41
• pitfall: Under synchronous replication,
Publishers wait for COMMIT responses from
all the subscribers, even when there are no
changes to those subscribers.
3. The response time may be quite long
Publisher
table
2
table
1 Subscriber2
table
2
Client
BEGIN;
INSERT INTO Table1 VALUES (‘a’);
COMMIT;
Sends only
BEGIN and COMMIT
(1)
(2)
(3)
(4)
Subscriber1
table
1
BEGIN;
INSERT INTO Table1 VALUES (‘a’);
COMMIT;
(2)
(3)
Table1
Copyright©2018 NTT Corp. All Rights Reserved.
42
• lesson: The response time to clients
depends on the slowest subscriber.
• Also, as we’ve seen it on Q2, ‘walsender‘
sends changes to ‘apply worker’ after
COMMIT, it also tends to make response
time longer.
• It may also be beneficial to confirm you
really need synchronous replication.
3. The response time may be quite long
Copyright©2018 NTT Corp. All Rights Reserved.
43
Q4. Is the way to monitor the status of
replication the same as Physical
Replication?
Copyright©2018 NTT Corp. All Rights Reserved.
44
A4. Only monitoring pg_stat_replication
might not be enough.
Copyright©2018 NTT Corp. All Rights Reserved.
45
• behavior: Initial table sync is done by
dedicated processes, sync worker and
walsender.
4. pg_stat_replication might not be enough
WAL
backend
process
wal
sender
Publisher
write
read
apply
worker
Subscriber
TableTableTable
sync
worker
wal
sender write
(COPY)
Copyright©2018 NTT Corp. All Rights Reserved.
46
• pitfall: Even if ‘sync worker’ failed to start
and nothing has been replicated yet,
pg_stat_replication.state is ‘streaming’.
4. pg_stat_replication might not be enough
Copyright©2018 NTT Corp. All Rights Reserved.
47
• lesson: We should also monitor
pg_subscription_rel and check ‘srsubstate’
is ‘r’, meaning ready.
4. pg_stat_replication might not be enough
Copyright©2018 NTT Corp. All Rights Reserved.
48
Q5. How should we resolve the conflict?
Copyright©2018 NTT Corp. All Rights Reserved.
49
A5. We can use
pg_replication_origin_advance(),
but it may skip some data.
Copyright©2018 NTT Corp. All Rights Reserved.
50
• behavior: pg_replication_origin_advance()
enables us to set the LSN up to which data
has been replicated.
5. pg_replication_origin_advance() may skip data
| |
10 20
remote lsn
Here
Copyright©2018 NTT Corp. All Rights Reserved.
51
• behavior: pg_replication_origin_advance()
enables us to set the LSN up to which data
has been replicated.
5. pg_replication_origin_advance() may skip data
| |
10 20
remote lsn
pg_replication_origin_advance(‘node_name’, 20)
Here
Copyright©2018 NTT Corp. All Rights Reserved.
52
• behavior: pg_replication_origin_advance()
enables us to set the LSN up to which data
has been replicated.
5. pg_replication_origin_advance() may skip data
| |
10 20
remote lsn
pg_replication_origin_advance(‘node_name’, 20)
Here
Conflict point
Copyright©2018 NTT Corp. All Rights Reserved.
53
• pitfalls: If there are some changes on the
publisher after the conflict,
pg_replication_origin_advance(‘current wal
lsn on publisher’) skips applying that
changes.
5. pg_replication_origin_advance() may skip data
| |
10 20
remote lsn
pg_replication_origin_advance(‘node_name’, 20)
INSERT
UPDATEConflict point
Copyright©2018 NTT Corp. All Rights Reserved.
54
• lessons: Changing conflicting data on the
subscriber may be usually a better choice.
5. pg_replication_origin_advance() may skip data
Copyright©2018 NTT Corp. All Rights Reserved.
55
Q6. Can backup be performed usual?
Copyright©2018 NTT Corp. All Rights Reserved.
56
A6. Backup DB under Logical Replication
may need additional procedure.
Copyright©2018 NTT Corp. All Rights Reserved.
57
• behavior: pg_dump doesn't backup
pg_subscription_rel, which keeps the state
of initial table sync.
6. Logical Replication may need additional procedure
Copyright©2018 NTT Corp. All Rights Reserved.
58
• pitfalls: Restoring data backed up by
pg_dump at a subscriber causes initial table
sync again.
It usually makes the replication stop due to
key duplication error.
6. Logical Replication may need additional procedure
Publisher Subscriber
pg_dump
TableTableTable
Copyright©2018 NTT Corp. All Rights Reserved.
59
• pitfalls: Restoring data backed up by
pg_dump at a subscriber causes initial table
synchronization again.
It usually makes the replication stop due to
key duplication error.
6. Logical Replication may need additional procedure
Publisher Subscriber
(1)restore
pg_dump
TableTableTable TableTableTable
Copyright©2018 NTT Corp. All Rights Reserved.
60
• pitfalls: Restoring data backed up by
pg_dump at a subscriber causes initial table
synchronization again.
It usually makes the replication stop due to
key duplication error.
6. Logical Replication may need additional procedure
Publisher Subscriber
(1)restore
pg_dump
TableTableTable TableTableTable
(2)replication
Copyright©2018 NTT Corp. All Rights Reserved.
61
• pitfalls: Restoring data backed up by
pg_dump at a subscriber causes initial table
synchronization again.
It usually makes the replication stop due to
key duplication error.
6. Logical Replication may need additional procedure
Publisher Subscriber
(1)restore
pg_dump
TableTableTable TableTableTable
(3)conflict
(2)replication
Copyright©2018 NTT Corp. All Rights Reserved.
62
• lessons: We can avoid this resyncing by
refresh subscription with 'copy_data =
false‘.
But if a subscription has tables which have
not completed the initial sync, we need
more work..
It's better to consider well what data is
really necessary and how to prevent data
loss.
In some cases it may be better to start
replication from scratch.
6. Logical Replication may need additional procedure
Copyright©2018 NTT Corp. All Rights Reserved.
63
SUMMARY
Copyright©2018 NTT Corp. All Rights Reserved.
64
Design
Take into account some counterintuitive
behaviors which cause performance impact.
• ‘walsender’ keeps changes in memory
• In sync replication, publishers wait for COMMIT
from all the subscribers even which have no
change.
• Changes on non-subscribed tables are also
decoded.
How should we manage Logical Replication?
Copyright©2018 NTT Corp. All Rights Reserved.
65
Monitoring
• Monitor memory usage on publisher.
• Monitor not only pg_stat_replication but
pg_subscription_rel.
How should we manage Logical Replication?
Copyright©2018 NTT Corp. All Rights Reserved.
66
Operation
• pg_replication_origin_advance() may skip
some data.
• Backup and restore need some extra
procedures, It's better to consider well
what data is really necessary and how to
prevent data loss.
How should we manage Logical Replication?
Copyright©2018 NTT Corp. All Rights Reserved.
67
Thank you !
torikoshi_atsushi_z2@lab.ntt.co.jp
@atorik_shi

More Related Content

What's hot

祝!PostgreSQLレプリケーション10周年!徹底紹介!!
祝!PostgreSQLレプリケーション10周年!徹底紹介!!祝!PostgreSQLレプリケーション10周年!徹底紹介!!
祝!PostgreSQLレプリケーション10周年!徹底紹介!!NTT DATA Technology & Innovation
 
データ活用をするための組織
データ活用をするための組織データ活用をするための組織
データ活用をするための組織Kon Yuichi
 
PostgreSQLのバグとの付き合い方 ~バグの調査からコミュニティへの報告、修正パッチ投稿まで~(PostgreSQL Conference Japa...
PostgreSQLのバグとの付き合い方 ~バグの調査からコミュニティへの報告、修正パッチ投稿まで~(PostgreSQL Conference Japa...PostgreSQLのバグとの付き合い方 ~バグの調査からコミュニティへの報告、修正パッチ投稿まで~(PostgreSQL Conference Japa...
PostgreSQLのバグとの付き合い方 ~バグの調査からコミュニティへの報告、修正パッチ投稿まで~(PostgreSQL Conference Japa...NTT DATA Technology & Innovation
 
地理分散DBについて
地理分散DBについて地理分散DBについて
地理分散DBについてKumazaki Hiroki
 
PostgreSQL13でのレプリケーション関連の改善について(第14回PostgreSQLアンカンファレンス@オンライン)
PostgreSQL13でのレプリケーション関連の改善について(第14回PostgreSQLアンカンファレンス@オンライン)PostgreSQL13でのレプリケーション関連の改善について(第14回PostgreSQLアンカンファレンス@オンライン)
PostgreSQL13でのレプリケーション関連の改善について(第14回PostgreSQLアンカンファレンス@オンライン)NTT DATA Technology & Innovation
 
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)NTT DATA Technology & Innovation
 
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)NTT DATA Technology & Innovation
 
マネージドPostgreSQLの実現に向けたPostgreSQL機能向上(PostgreSQL Conference Japan 2023 発表資料)
マネージドPostgreSQLの実現に向けたPostgreSQL機能向上(PostgreSQL Conference Japan 2023 発表資料)マネージドPostgreSQLの実現に向けたPostgreSQL機能向上(PostgreSQL Conference Japan 2023 発表資料)
マネージドPostgreSQLの実現に向けたPostgreSQL機能向上(PostgreSQL Conference Japan 2023 発表資料)NTT DATA Technology & Innovation
 
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)NTT DATA Technology & Innovation
 
本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話Kumazaki Hiroki
 
トランザクションの設計と進化
トランザクションの設計と進化トランザクションの設計と進化
トランザクションの設計と進化Kumazaki Hiroki
 
詳説データベース輪読会: 分散合意その2
詳説データベース輪読会: 分散合意その2詳説データベース輪読会: 分散合意その2
詳説データベース輪読会: 分散合意その2Sho Nakazono
 
OSS活動のやりがいとそれから得たもの - PostgreSQLコミュニティにて -
OSS活動のやりがいとそれから得たもの - PostgreSQLコミュニティにて -OSS活動のやりがいとそれから得たもの - PostgreSQLコミュニティにて -
OSS活動のやりがいとそれから得たもの - PostgreSQLコミュニティにて -Masahiko Sawada
 
並行実行制御の最適化手法
並行実行制御の最適化手法並行実行制御の最適化手法
並行実行制御の最適化手法Sho Nakazono
 
オンライン物理バックアップの排他モードと非排他モードについて(第15回PostgreSQLアンカンファレンス@オンライン 発表資料)
オンライン物理バックアップの排他モードと非排他モードについて(第15回PostgreSQLアンカンファレンス@オンライン 発表資料)オンライン物理バックアップの排他モードと非排他モードについて(第15回PostgreSQLアンカンファレンス@オンライン 発表資料)
オンライン物理バックアップの排他モードと非排他モードについて(第15回PostgreSQLアンカンファレンス@オンライン 発表資料)NTT DATA Technology & Innovation
 
速習! PostgreSQL専用HAソフトウェア: Patroni(PostgreSQL Conference Japan 2023 発表資料)
速習! PostgreSQL専用HAソフトウェア: Patroni(PostgreSQL Conference Japan 2023 発表資料)速習! PostgreSQL専用HAソフトウェア: Patroni(PostgreSQL Conference Japan 2023 発表資料)
速習! PostgreSQL専用HAソフトウェア: Patroni(PostgreSQL Conference Japan 2023 発表資料)NTT DATA Technology & Innovation
 
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...NTT DATA Technology & Innovation
 
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)NTT DATA Technology & Innovation
 

What's hot (20)

祝!PostgreSQLレプリケーション10周年!徹底紹介!!
祝!PostgreSQLレプリケーション10周年!徹底紹介!!祝!PostgreSQLレプリケーション10周年!徹底紹介!!
祝!PostgreSQLレプリケーション10周年!徹底紹介!!
 
データ活用をするための組織
データ活用をするための組織データ活用をするための組織
データ活用をするための組織
 
PostgreSQLのバグとの付き合い方 ~バグの調査からコミュニティへの報告、修正パッチ投稿まで~(PostgreSQL Conference Japa...
PostgreSQLのバグとの付き合い方 ~バグの調査からコミュニティへの報告、修正パッチ投稿まで~(PostgreSQL Conference Japa...PostgreSQLのバグとの付き合い方 ~バグの調査からコミュニティへの報告、修正パッチ投稿まで~(PostgreSQL Conference Japa...
PostgreSQLのバグとの付き合い方 ~バグの調査からコミュニティへの報告、修正パッチ投稿まで~(PostgreSQL Conference Japa...
 
地理分散DBについて
地理分散DBについて地理分散DBについて
地理分散DBについて
 
PostgreSQL13でのレプリケーション関連の改善について(第14回PostgreSQLアンカンファレンス@オンライン)
PostgreSQL13でのレプリケーション関連の改善について(第14回PostgreSQLアンカンファレンス@オンライン)PostgreSQL13でのレプリケーション関連の改善について(第14回PostgreSQLアンカンファレンス@オンライン)
PostgreSQL13でのレプリケーション関連の改善について(第14回PostgreSQLアンカンファレンス@オンライン)
 
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
 
PostgreSQLコミュニティに飛び込もう
PostgreSQLコミュニティに飛び込もうPostgreSQLコミュニティに飛び込もう
PostgreSQLコミュニティに飛び込もう
 
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
 
マネージドPostgreSQLの実現に向けたPostgreSQL機能向上(PostgreSQL Conference Japan 2023 発表資料)
マネージドPostgreSQLの実現に向けたPostgreSQL機能向上(PostgreSQL Conference Japan 2023 発表資料)マネージドPostgreSQLの実現に向けたPostgreSQL機能向上(PostgreSQL Conference Japan 2023 発表資料)
マネージドPostgreSQLの実現に向けたPostgreSQL機能向上(PostgreSQL Conference Japan 2023 発表資料)
 
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
 
本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話
 
トランザクションの設計と進化
トランザクションの設計と進化トランザクションの設計と進化
トランザクションの設計と進化
 
詳説データベース輪読会: 分散合意その2
詳説データベース輪読会: 分散合意その2詳説データベース輪読会: 分散合意その2
詳説データベース輪読会: 分散合意その2
 
OSS活動のやりがいとそれから得たもの - PostgreSQLコミュニティにて -
OSS活動のやりがいとそれから得たもの - PostgreSQLコミュニティにて -OSS活動のやりがいとそれから得たもの - PostgreSQLコミュニティにて -
OSS活動のやりがいとそれから得たもの - PostgreSQLコミュニティにて -
 
並行実行制御の最適化手法
並行実行制御の最適化手法並行実行制御の最適化手法
並行実行制御の最適化手法
 
PostgreSQL: XID周回問題に潜む別の問題
PostgreSQL: XID周回問題に潜む別の問題PostgreSQL: XID周回問題に潜む別の問題
PostgreSQL: XID周回問題に潜む別の問題
 
オンライン物理バックアップの排他モードと非排他モードについて(第15回PostgreSQLアンカンファレンス@オンライン 発表資料)
オンライン物理バックアップの排他モードと非排他モードについて(第15回PostgreSQLアンカンファレンス@オンライン 発表資料)オンライン物理バックアップの排他モードと非排他モードについて(第15回PostgreSQLアンカンファレンス@オンライン 発表資料)
オンライン物理バックアップの排他モードと非排他モードについて(第15回PostgreSQLアンカンファレンス@オンライン 発表資料)
 
速習! PostgreSQL専用HAソフトウェア: Patroni(PostgreSQL Conference Japan 2023 発表資料)
速習! PostgreSQL専用HAソフトウェア: Patroni(PostgreSQL Conference Japan 2023 発表資料)速習! PostgreSQL専用HAソフトウェア: Patroni(PostgreSQL Conference Japan 2023 発表資料)
速習! PostgreSQL専用HAソフトウェア: Patroni(PostgreSQL Conference Japan 2023 発表資料)
 
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F...
 
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
 

Similar to PostgreSQL Logical Replication Architecture, Pitfalls & Best Practices

Vacuum more efficient than ever
Vacuum more efficient than everVacuum more efficient than ever
Vacuum more efficient than everMasahiko Sawada
 
OpenStackを利用したEnterprise Cloudを支える技術 - OpenStack最新情報セミナー 2016年5月
OpenStackを利用したEnterprise Cloudを支える技術 - OpenStack最新情報セミナー 2016年5月OpenStackを利用したEnterprise Cloudを支える技術 - OpenStack最新情報セミナー 2016年5月
OpenStackを利用したEnterprise Cloudを支える技術 - OpenStack最新情報セミナー 2016年5月VirtualTech Japan Inc.
 
Media processing with serverless architecture
Media processing with serverless architectureMedia processing with serverless architecture
Media processing with serverless architectureKensaku Komatsu
 
Kirin User Story: Migrating Mission Critical Applications to OpenStack Privat...
Kirin User Story: Migrating Mission Critical Applications to OpenStack Privat...Kirin User Story: Migrating Mission Critical Applications to OpenStack Privat...
Kirin User Story: Migrating Mission Critical Applications to OpenStack Privat...Motoki Kakinuma
 
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...VirtualTech Japan Inc.
 
training report on embedded system and AVR
training report on embedded system and AVRtraining report on embedded system and AVR
training report on embedded system and AVRUrvashi Khandelwal
 
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...Masaaki Nakagawa
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Cloudera, Inc.
 
Lessons Learned from Leveraging Real-Time Power Consumption Data with Apache ...
Lessons Learned from Leveraging Real-Time Power Consumption Data with Apache ...Lessons Learned from Leveraging Real-Time Power Consumption Data with Apache ...
Lessons Learned from Leveraging Real-Time Power Consumption Data with Apache ...Hitachi, Ltd. OSS Solution Center.
 
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxDataSensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxDataInfluxData
 
YugaByte DB Internals - Storage Engine and Transactions
YugaByte DB Internals - Storage Engine and Transactions YugaByte DB Internals - Storage Engine and Transactions
YugaByte DB Internals - Storage Engine and Transactions Yugabyte
 
NFV Infrastructure Manager with High Performance Software Switch Lagopus
NFV Infrastructure Manager with High Performance Software Switch Lagopus NFV Infrastructure Manager with High Performance Software Switch Lagopus
NFV Infrastructure Manager with High Performance Software Switch Lagopus Hirofumi Ichihara
 
How YugaByte DB Implements Distributed PostgreSQL
How YugaByte DB Implements Distributed PostgreSQLHow YugaByte DB Implements Distributed PostgreSQL
How YugaByte DB Implements Distributed PostgreSQLYugabyte
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemMelissa Luster
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus SDN/OpenFlow switch
 
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native WayMigrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native WayDatabricks
 
Bloat and Fragmentation in PostgreSQL
Bloat and Fragmentation in PostgreSQLBloat and Fragmentation in PostgreSQL
Bloat and Fragmentation in PostgreSQLMasahiko Sawada
 
FIAT/IFTA MMC Seminar May 2015. Key Points for a Successful Migration. Fikriy...
FIAT/IFTA MMC Seminar May 2015. Key Points for a Successful Migration. Fikriy...FIAT/IFTA MMC Seminar May 2015. Key Points for a Successful Migration. Fikriy...
FIAT/IFTA MMC Seminar May 2015. Key Points for a Successful Migration. Fikriy...FIAT/IFTA
 
Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021InfluxData
 
Labqazwsxedcrfvtgbyhnujmqazwsxedcrfvtgbyhnujmqazwsx.pptx
Labqazwsxedcrfvtgbyhnujmqazwsxedcrfvtgbyhnujmqazwsx.pptxLabqazwsxedcrfvtgbyhnujmqazwsxedcrfvtgbyhnujmqazwsx.pptx
Labqazwsxedcrfvtgbyhnujmqazwsxedcrfvtgbyhnujmqazwsx.pptxMostafaKhaled78
 

Similar to PostgreSQL Logical Replication Architecture, Pitfalls & Best Practices (20)

Vacuum more efficient than ever
Vacuum more efficient than everVacuum more efficient than ever
Vacuum more efficient than ever
 
OpenStackを利用したEnterprise Cloudを支える技術 - OpenStack最新情報セミナー 2016年5月
OpenStackを利用したEnterprise Cloudを支える技術 - OpenStack最新情報セミナー 2016年5月OpenStackを利用したEnterprise Cloudを支える技術 - OpenStack最新情報セミナー 2016年5月
OpenStackを利用したEnterprise Cloudを支える技術 - OpenStack最新情報セミナー 2016年5月
 
Media processing with serverless architecture
Media processing with serverless architectureMedia processing with serverless architecture
Media processing with serverless architecture
 
Kirin User Story: Migrating Mission Critical Applications to OpenStack Privat...
Kirin User Story: Migrating Mission Critical Applications to OpenStack Privat...Kirin User Story: Migrating Mission Critical Applications to OpenStack Privat...
Kirin User Story: Migrating Mission Critical Applications to OpenStack Privat...
 
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
 
training report on embedded system and AVR
training report on embedded system and AVRtraining report on embedded system and AVR
training report on embedded system and AVR
 
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive


 
Lessons Learned from Leveraging Real-Time Power Consumption Data with Apache ...
Lessons Learned from Leveraging Real-Time Power Consumption Data with Apache ...Lessons Learned from Leveraging Real-Time Power Consumption Data with Apache ...
Lessons Learned from Leveraging Real-Time Power Consumption Data with Apache ...
 
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxDataSensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
 
YugaByte DB Internals - Storage Engine and Transactions
YugaByte DB Internals - Storage Engine and Transactions YugaByte DB Internals - Storage Engine and Transactions
YugaByte DB Internals - Storage Engine and Transactions
 
NFV Infrastructure Manager with High Performance Software Switch Lagopus
NFV Infrastructure Manager with High Performance Software Switch Lagopus NFV Infrastructure Manager with High Performance Software Switch Lagopus
NFV Infrastructure Manager with High Performance Software Switch Lagopus
 
How YugaByte DB Implements Distributed PostgreSQL
How YugaByte DB Implements Distributed PostgreSQLHow YugaByte DB Implements Distributed PostgreSQL
How YugaByte DB Implements Distributed PostgreSQL
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging System
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
 
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native WayMigrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
 
Bloat and Fragmentation in PostgreSQL
Bloat and Fragmentation in PostgreSQLBloat and Fragmentation in PostgreSQL
Bloat and Fragmentation in PostgreSQL
 
FIAT/IFTA MMC Seminar May 2015. Key Points for a Successful Migration. Fikriy...
FIAT/IFTA MMC Seminar May 2015. Key Points for a Successful Migration. Fikriy...FIAT/IFTA MMC Seminar May 2015. Key Points for a Successful Migration. Fikriy...
FIAT/IFTA MMC Seminar May 2015. Key Points for a Successful Migration. Fikriy...
 
Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021
 
Labqazwsxedcrfvtgbyhnujmqazwsxedcrfvtgbyhnujmqazwsx.pptx
Labqazwsxedcrfvtgbyhnujmqazwsxedcrfvtgbyhnujmqazwsx.pptxLabqazwsxedcrfvtgbyhnujmqazwsxedcrfvtgbyhnujmqazwsx.pptx
Labqazwsxedcrfvtgbyhnujmqazwsxedcrfvtgbyhnujmqazwsx.pptx
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Recently uploaded (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

PostgreSQL Logical Replication Architecture, Pitfalls & Best Practices

  • 1. Copyright©2018 NTT Corp. All Rights Reserved. Architecture & Pitfalls
 of Logical Replication NTT OSS Center Atsushi Torikoshi PGConf.US 2018
  • 2. 2 Who am I ➢Atsushi Torikoshi ➢@atorik_shi ➢torikoshi_atsushi_z2@lab.ntt.co.jp ➢NTT Open Source Software Center ➢PostgreSQL technical support ➢PostgreSQL performance verification Copyright©2018 NTT Corp. All Rights Reserved.
  • 3. 3 About NTT • Who we are – NTT(Nippon Telegraph and Telephone Corporation) – Japanese telecommunications company • What NTT OSS Center does – Promotes the adoption of OSS by the group companies • Total support – support desk, Introduction support, Product maintenance • R&D – developing OSS and related tools with the communities • Deals about 60 OSS products – developing OSS and related tools with the communities NTT NTT OSS Center Copyright©2018 NTT Corp. All Rights Reserved.
  • 4. Copyright©2018 NTT Corp. All Rights Reserved. 4 •Background of Logical Replication •Architecture and Behavior •Pitfalls •Summary INDEX
  • 5. Copyright©2018 NTT Corp. All Rights Reserved. 5 BACKGROUND OF LOGICAL REPLICATION
  • 6. Copyright©2018 NTT Corp. All Rights Reserved. 6 PostgreSQL has built-in Physical Replication since 2010. It replicates a whole DB by sending WAL. Suitable for load balancing and high availability. Physical Replication Upstream Downstream sendTable Table Table WALWAL WALWAL Table Table Table replay
  • 7. Copyright©2018 NTT Corp. All Rights Reserved. 7 Physical Replication cannot do things like: • partial replication • replication between different major version PostgreSQL Logical Replication has added flexibility to built-in replication and made these things possible! Logical Replication Upstream Downstream decode, sendTable Table Table WALWAL WALWAL Table Table apply write
  • 8. Copyright©2018 NTT Corp. All Rights Reserved. 8 Comparison between Logical and Physical Replication Physical Logical way of the replication Sending and replaying all WAL decoding WAL and extracting changes downstream DB copy of the upstream DB not necessarily the same as upstream DB up/downstream DB can be different PostgreSQL version manipulations for downstream DB SELECT only No restriction, but some manipulations may lead to conflict What is replicated ALL views, partition root tables, large objects and some manipulations including DDL are NOT replicated
  • 9. Copyright©2018 NTT Corp. All Rights Reserved. 9 Logical Replication enables flexible data replication. 1. Replicating partial data for analytical purpose 2. Consolidating multiple DBs into a single one 3. Online version up Expected use cases of Logical Replication (1) (2) (3)
  • 10. Copyright©2018 NTT Corp. All Rights Reserved. 10 ARCHITECTURE
 AND
 BEHAVIOR
  • 11. Copyright©2018 NTT Corp. All Rights Reserved. 11 • ‘walsender’ and ‘apply worker’ do most of the work for Logical Replication. • ‘sync worker’ and corresponding ‘walsender’ run only at initial table sync. Basics of the architecture WAL wal sender Publisher (upstream) write wal sender apply worker launcher sync worker launch launch Subscriber(downstream) backend process read decode backend process
  • 12. Copyright©2018 NTT Corp. All Rights Reserved. 12 • ‘walsender’ reads WAL and decodes it. Then sends it to subscriber. • ‘apply worker’ applies that change. Basics of the architecture ~replication WAL backend process wal sender Publisher write read apply worker Subscriber TableTableTable write decode send change
  • 13. Copyright©2018 NTT Corp. All Rights Reserved. 13 • ‘walsender’ reassembles queries by its transaction. • When WAL is INSERT, UPDATE or DELETE, ‘walsender’ keeps the change in memory. Basics of the architecture ~replication WAL walsender INSERT UPDATE UPDATE DELETE UPDATE apply worker Publisher Subscriber :transaction
  • 14. Copyright©2018 NTT Corp. All Rights Reserved. 14 • ‘walsender’ reassembles queries by its transaction. • When WAL is INSERT, UPDATE or DELETE, ‘walsender’ keeps the change in memory. Basics of the architecture ~replication WAL walsender INSERT UPDATE UPDATE DELETE UPDATE 1. read WAL apply worker Publisher Subscriber :transaction
  • 15. Copyright©2018 NTT Corp. All Rights Reserved. 15 • ‘walsender’ reassembles queries by its transaction. • When WAL is INSERT, UPDATE or DELETE, ‘walsender’ keeps the change in memory. Basics of the architecture ~replication WAL walsender INSERT INSERT UPDATE UPDATE DELETE UPDATE 1. read WAL 2. decode apply worker Publisher Subscriber :transaction
  • 16. Copyright©2018 NTT Corp. All Rights Reserved. 16 • ‘walsender’ reassembles queries by its transaction. • When WAL is INSERT, UPDATE or DELETE, ‘walsender’ keeps the change in memory. Basics of the architecture ~replication WAL walsender INSERT INSERT UPDATE UPDATE DELETE UPDATE 1. read WAL 2. decode 3. reassemble by transaction apply worker Publisher Subscriber :transaction INSERT
  • 17. Copyright©2018 NTT Corp. All Rights Reserved. 17 • When WAL is COMMIT, ‘walsender’ sends all the changes for that transaction to subscriber. Basics of the architecture ~replication :transaction WAL apply worker walsender COMMIT INSERT UPDATE UPDATE DELETE UPDATE 1. read WAL 2. decode 4. send Publisher Subscriber 3. reassemble by transaction COMMIT
  • 18. Copyright©2018 NTT Corp. All Rights Reserved. 18 • When WAL is ROLLBACK, ‘walsender’ just throws away the changes for that transaction. Basics of the architecture ~replication :transaction WAL walsender ROLLBACK INSERT UPDATE UPDATE DELETE UPDATE ROLLBACK 1. read WAL 2. decode 4. cleanup apply worker Publisher Subscriber 3. reassemble by transaction
  • 19. Copyright©2018 NTT Corp. All Rights Reserved. 19 • At initial table sync, COPY runs. • COPY is done by dedicated ‘walsender’ and sync worker. These processes exit after COPY is done. Initial table sync WAL backend process wal sender Publisher write read apply worker Subscriber TableTableTable sync worker wal sender write (COPY)
  • 20. Copyright©2018 NTT Corp. All Rights Reserved. 20 • PostgreSQL doesn’t have merge agents for conflict resolution. If there are multiple changes for the same data at one time, the last change is reflected. (Not) Conflict Publisher Subscriber id name 1 ‘A’ 2 ‘B’ id name 1 ‘A’ 2 ‘B’
  • 21. Copyright©2018 NTT Corp. All Rights Reserved. 21 • PostgreSQL doesn’t have merge agents for conflict resolution. If there are multiple changes for the same data at one time, the last change is reflected. (Not) Conflict Publisher Subscriber 2. UPDATE table SET name = ‘Y‘ WHERE id = 2 id name 1 ‘A’ 2 ‘Y’ 1. UPDATE table SET name = ‘X‘ WHERE id = 2 id name 1 ‘A’ 2 ‘X’
  • 22. Copyright©2018 NTT Corp. All Rights Reserved. 22 • PostgreSQL doesn’t have merge agents for conflict resolution. If there are multiple changes for the same data at one time, the last change is reflected. (Not) Conflict Publisher Subscriber 2. UPDATE table SET name = ‘Y‘ WHERE id = 2 id name 1 ‘A’ 2 ‘X’ 1. UPDATE table SET name = ‘X‘ WHERE id = 2 3. replicate id name 1 ‘A’ 2 ‘X’
  • 23. Copyright©2018 NTT Corp. All Rights Reserved. 23 • If replicating data causes an error at subscriber side, the replication stops. Conflict Publisher Subscriber id 1 2 1. INSERT INTO table VALUES (2); id 1 2 2. INSERT INTO table VALUES (2);
  • 24. Copyright©2018 NTT Corp. All Rights Reserved. 24 • If replicating data causes an error at subscriber side, the replication stops. Conflict Publisher Subscriber id 1 2 1. INSERT INTO table VALUES (2); id 1 2 2. INSERT INTO table VALUES (2); 3. replicate
  • 25. Copyright©2018 NTT Corp. All Rights Reserved. 25 • If replicating data causes an error at subscriber side, the replication stops. Conflict Publisher Subscriber id 1 2 2. INSERT INTO table VALUES (2); id 1 2 1. INSERT INTO table VALUES (2); 3. replicate 4. conflict
  • 26. Copyright©2018 NTT Corp. All Rights Reserved. 26 • Users must resolve conflict manually. • After the conflict is resolved, replication is resumed. Conflict Publisher Subscriber id 1 2 2. INSERT INTO table VALUES (2); id 1 2 1. INSERT INTO table VALUES (2); 3. replicate 4. conflict
  • 27. Copyright©2018 NTT Corp. All Rights Reserved. 27 PITFALLS
  • 28. Copyright©2018 NTT Corp. All Rights Reserved. 28 Q1. How does ‘walsender’ deal with WAL which are NOT target of replication?
  • 29. Copyright©2018 NTT Corp. All Rights Reserved. 29 A1. ‘walsender’ decodes most of the WAL.
  • 30. Copyright©2018 NTT Corp. All Rights Reserved. 30 • behavior: 'walsender’ decodes *all* of the changes to the target database, NOT just the changes to subscribed tables. 1. ‘walsender’ decodes most of the WAL
  • 31. Copyright©2018 NTT Corp. All Rights Reserved. 31 • pitfall: Changes in non-subscribed tables even consume resources, such as CPU and memory. 1. ‘walsender’ decodes most of the WAL perf visualization of walsender updating only non-subscribed tables DecodeDelete DecodeInsert DecodeCommit
  • 32. Copyright©2018 NTT Corp. All Rights Reserved. 32 • Lesson: ‘walsender’ consumes resources depending on the whole amount of changes on the publisher database database, NOT only on the amount of changes on subscribed tables. 1. ‘walsender’ decodes most of the WAL
  • 33. Copyright©2018 NTT Corp. All Rights Reserved. 33 Q2. Does keeping changes on walsender cause issues?
  • 34. Copyright©2018 NTT Corp. All Rights Reserved. 34 A2. Yes, It may consume a lot of memory.
  • 35. Copyright©2018 NTT Corp. All Rights Reserved. 35 • behavior: ‘walsender’ keeps each change of a transaction in memory until COMMIT or ROLLBACK. 2. ‘walsender’ may consume a lot of memory
  • 36. Copyright©2018 NTT Corp. All Rights Reserved. 36 • pitfall: It may cause ‘walsender’ to consume a lot of memory. 2. ‘walsender’ may consume a lot of memory Type of manipulation Measures to prevent memory use many changes in one transaction walsender’ has a feature to spill out changes to disk, when the number of changes in one transaction exceeds 4096. changes which modifies much data There are no feature to avoid using memory. many transactions many savepoints ※ Patches changing this behavior are under discussion.
  • 37. Copyright©2018 NTT Corp. All Rights Reserved. 37 • lesson: If possible, it’s better to avoid the manipulations which have no measures to prevent consuming a lot of memory. Monitoring memory usage at publisher may be a good idea. 2. ‘walsender’ may consume a lot of memory
  • 38. Copyright©2018 NTT Corp. All Rights Reserved. 38 Q3. Can we use synchronous replication in Logical Replication?
  • 39. Copyright©2018 NTT Corp. All Rights Reserved. 39 A3. Yes, but the response time may be quite long.
  • 40. Copyright©2018 NTT Corp. All Rights Reserved. 40 • behavior: Under synchronous replication, before replying to the client, publishers wait for the COMMIT responses from all the subscribers. 3. The response time may be quite long Publisher table 2 table 1 Client BEGIN; INSERT INTO Table1 VALUES (‘a’); COMMIT; (1) (4) Subscriber table 1 BEGIN; INSERT INTO Table1 VALUES (‘a’); COMMIT; (2) (3) Table1
  • 41. Copyright©2018 NTT Corp. All Rights Reserved. 41 • pitfall: Under synchronous replication, Publishers wait for COMMIT responses from all the subscribers, even when there are no changes to those subscribers. 3. The response time may be quite long Publisher table 2 table 1 Subscriber2 table 2 Client BEGIN; INSERT INTO Table1 VALUES (‘a’); COMMIT; Sends only BEGIN and COMMIT (1) (2) (3) (4) Subscriber1 table 1 BEGIN; INSERT INTO Table1 VALUES (‘a’); COMMIT; (2) (3) Table1
  • 42. Copyright©2018 NTT Corp. All Rights Reserved. 42 • lesson: The response time to clients depends on the slowest subscriber. • Also, as we’ve seen it on Q2, ‘walsender‘ sends changes to ‘apply worker’ after COMMIT, it also tends to make response time longer. • It may also be beneficial to confirm you really need synchronous replication. 3. The response time may be quite long
  • 43. Copyright©2018 NTT Corp. All Rights Reserved. 43 Q4. Is the way to monitor the status of replication the same as Physical Replication?
  • 44. Copyright©2018 NTT Corp. All Rights Reserved. 44 A4. Only monitoring pg_stat_replication might not be enough.
  • 45. Copyright©2018 NTT Corp. All Rights Reserved. 45 • behavior: Initial table sync is done by dedicated processes, sync worker and walsender. 4. pg_stat_replication might not be enough WAL backend process wal sender Publisher write read apply worker Subscriber TableTableTable sync worker wal sender write (COPY)
  • 46. Copyright©2018 NTT Corp. All Rights Reserved. 46 • pitfall: Even if ‘sync worker’ failed to start and nothing has been replicated yet, pg_stat_replication.state is ‘streaming’. 4. pg_stat_replication might not be enough
  • 47. Copyright©2018 NTT Corp. All Rights Reserved. 47 • lesson: We should also monitor pg_subscription_rel and check ‘srsubstate’ is ‘r’, meaning ready. 4. pg_stat_replication might not be enough
  • 48. Copyright©2018 NTT Corp. All Rights Reserved. 48 Q5. How should we resolve the conflict?
  • 49. Copyright©2018 NTT Corp. All Rights Reserved. 49 A5. We can use pg_replication_origin_advance(), but it may skip some data.
  • 50. Copyright©2018 NTT Corp. All Rights Reserved. 50 • behavior: pg_replication_origin_advance() enables us to set the LSN up to which data has been replicated. 5. pg_replication_origin_advance() may skip data | | 10 20 remote lsn Here
  • 51. Copyright©2018 NTT Corp. All Rights Reserved. 51 • behavior: pg_replication_origin_advance() enables us to set the LSN up to which data has been replicated. 5. pg_replication_origin_advance() may skip data | | 10 20 remote lsn pg_replication_origin_advance(‘node_name’, 20) Here
  • 52. Copyright©2018 NTT Corp. All Rights Reserved. 52 • behavior: pg_replication_origin_advance() enables us to set the LSN up to which data has been replicated. 5. pg_replication_origin_advance() may skip data | | 10 20 remote lsn pg_replication_origin_advance(‘node_name’, 20) Here Conflict point
  • 53. Copyright©2018 NTT Corp. All Rights Reserved. 53 • pitfalls: If there are some changes on the publisher after the conflict, pg_replication_origin_advance(‘current wal lsn on publisher’) skips applying that changes. 5. pg_replication_origin_advance() may skip data | | 10 20 remote lsn pg_replication_origin_advance(‘node_name’, 20) INSERT UPDATEConflict point
  • 54. Copyright©2018 NTT Corp. All Rights Reserved. 54 • lessons: Changing conflicting data on the subscriber may be usually a better choice. 5. pg_replication_origin_advance() may skip data
  • 55. Copyright©2018 NTT Corp. All Rights Reserved. 55 Q6. Can backup be performed usual?
  • 56. Copyright©2018 NTT Corp. All Rights Reserved. 56 A6. Backup DB under Logical Replication may need additional procedure.
  • 57. Copyright©2018 NTT Corp. All Rights Reserved. 57 • behavior: pg_dump doesn't backup pg_subscription_rel, which keeps the state of initial table sync. 6. Logical Replication may need additional procedure
  • 58. Copyright©2018 NTT Corp. All Rights Reserved. 58 • pitfalls: Restoring data backed up by pg_dump at a subscriber causes initial table sync again. It usually makes the replication stop due to key duplication error. 6. Logical Replication may need additional procedure Publisher Subscriber pg_dump TableTableTable
  • 59. Copyright©2018 NTT Corp. All Rights Reserved. 59 • pitfalls: Restoring data backed up by pg_dump at a subscriber causes initial table synchronization again. It usually makes the replication stop due to key duplication error. 6. Logical Replication may need additional procedure Publisher Subscriber (1)restore pg_dump TableTableTable TableTableTable
  • 60. Copyright©2018 NTT Corp. All Rights Reserved. 60 • pitfalls: Restoring data backed up by pg_dump at a subscriber causes initial table synchronization again. It usually makes the replication stop due to key duplication error. 6. Logical Replication may need additional procedure Publisher Subscriber (1)restore pg_dump TableTableTable TableTableTable (2)replication
  • 61. Copyright©2018 NTT Corp. All Rights Reserved. 61 • pitfalls: Restoring data backed up by pg_dump at a subscriber causes initial table synchronization again. It usually makes the replication stop due to key duplication error. 6. Logical Replication may need additional procedure Publisher Subscriber (1)restore pg_dump TableTableTable TableTableTable (3)conflict (2)replication
  • 62. Copyright©2018 NTT Corp. All Rights Reserved. 62 • lessons: We can avoid this resyncing by refresh subscription with 'copy_data = false‘. But if a subscription has tables which have not completed the initial sync, we need more work.. It's better to consider well what data is really necessary and how to prevent data loss. In some cases it may be better to start replication from scratch. 6. Logical Replication may need additional procedure
  • 63. Copyright©2018 NTT Corp. All Rights Reserved. 63 SUMMARY
  • 64. Copyright©2018 NTT Corp. All Rights Reserved. 64 Design Take into account some counterintuitive behaviors which cause performance impact. • ‘walsender’ keeps changes in memory • In sync replication, publishers wait for COMMIT from all the subscribers even which have no change. • Changes on non-subscribed tables are also decoded. How should we manage Logical Replication?
  • 65. Copyright©2018 NTT Corp. All Rights Reserved. 65 Monitoring • Monitor memory usage on publisher. • Monitor not only pg_stat_replication but pg_subscription_rel. How should we manage Logical Replication?
  • 66. Copyright©2018 NTT Corp. All Rights Reserved. 66 Operation • pg_replication_origin_advance() may skip some data. • Backup and restore need some extra procedures, It's better to consider well what data is really necessary and how to prevent data loss. How should we manage Logical Replication?
  • 67. Copyright©2018 NTT Corp. All Rights Reserved. 67 Thank you ! torikoshi_atsushi_z2@lab.ntt.co.jp @atorik_shi