SlideShare a Scribd company logo
PGConf.ASIA 2019
How did PostgreSQL Write LoadHow did PostgreSQL Write Load
Balancing of Queries UsingBalancing of Queries Using
Transactions?Transactions?
Atsushi MitaniAtsushi Mitani
SRA Nishi-Nihon Inc.SRA Nishi-Nihon Inc.
PGConf.ASIA 2019
Copyright © Software Research Associates, Inc. All Rights Reserved
Location of SRA Holdings Group
SRA AMERICA, Inc.
(New York, USA)Cavirin Systems, Inc.
SRA OSS, Inc.
Santa Clara (California, USA)
SRA(Europe) B.V.
Amstelveen (The Netherlands)
SRA Tohoku
SRA Nishi-
Nihon Inc.
SRA Kansai Office
SRA India Private Limited
Bangalore (India)
Domestic Overseas
SRA IP Solutions (Asia Pacific) Pte. Ltd.
Singapore
SRA Holdings Inc.
SRA Corporation / Head Office
(Ikebukuro)
Software Science Co., Ltd.
AIT Co., Ltd.
SRA Professional Service Co., Ltd.
SRA OSS, Inc. / Japan branch
愛司聯發軟件科技(上海)有限公司
Shanghai (China)
SRA Chubu Office
2
Proxim Wireless
Corporation
San Jose (California, USA)
Soft Road Apps DOO
Belgrade (Serbia)
PGConf.ASIA 2019
Agenda
1 Introduction.
2 Why write load distribution is required?
3 How to distribute write load in PostgreSQL?
4 How fast is PostgreSQL's write load balancing
configuration?
5 Conclusion.
6 Summary.
PGConf.ASIA 2019
1. Introduction
PGConf.ASIA 2019
Who am I
●
Real Time Control System Engineer (1991-
– Power distribution control system.
●
Network Engineer (1995-
– Telephone communication network monitoring.
●
Database Engineer (1999-
– Develop PGCluster.
●
Security administrator (2000-
●
Infrastructure engineer (2005-
– Working in a Data center design division.
●
Web Application Engineer (2008-
– Back-end, Front-end, Android, iOS App ...
PGConf.ASIA 2019
Purpose of this session
●
Propose a suitable database configuration for
various system types.
●
Especially with a high write load database.
PGConf.ASIA 2019
2. Why write load distribution is
required?
PGConf.ASIA 2019
The type of system and data load
read
write
highlow
high
PGConf.ASIA 2019
Suitable DB type for each system
read
write
highlow
high
RDBRDB
CacheCache
NoSQLNoSQL
multi-mastermulti-master
PGConf.ASIA 2019
Which area should RDB aim for
●
Required features is real-time
processing of high load read / write
data
– The problem is how to perform high-load
read / write processing.
– If PostgreSQL can solve the problem, it
becomes a business
PGConf.ASIA 2019
3. How to distribute write load in PostgreSQL?
PGConf.ASIA 2019
Table partitioning
Indonesia
264 milion
Parent table
Pulau Sumatera
Jawa
Pulau Kalimantan
Child tables
141 milion
18.6 milion
50.3 milion
PGConf.ASIA 2019
Pros & Cons of Table Partitioning
●
Pros.
– Easy to use.
●
The parent table automatically reads and
writes to the child table.
●
No modification required on the program side.
A piece of cake!
PGConf.ASIA 2019
Pros & Cons of Table Partitioning
●
Cons.
– Does not load balance on a server basis.
●
Both parent and child tables are running on the same
DB instance.
On the same plate...
PGConf.ASIA 2019
How to distribution read & write load
●
Foreign Data Wrapper (FDW)
Parent DB
Child DBIndonesia
Pulau
Sumatera
Jawa
Pulau
Kalimantan
PGConf.ASIA 2019
Pros & Cons of FDW
●
Pros.
– Partitioning with FDW.
●
Partitioning can be used from
PostgreSQL 11.
●
Load balancing is possible since the
parent and child are running on different
DB instances.
Dream spreads!
PGConf.ASIA 2019
Pros & Cons of FDW
●
Cons.
– Cannot be used ACID transactions.
●
Data consistency cannot be
guaranteed.
Oops, like wax fruit...
PGConf.ASIA 2019
Let's make it
●
Make a patch to enable
ACID transactions.
– Investigate why ACID transactions
cannot be used with FDW.
– Modify the program to use ACID
transactions.
– Confirm that the ACID transaction can
be used in FDW by patch.Yes, let’s make it!
PGConf.ASIA 2019
Why ACID transactions cannot be used
with FDW
●
FDW can only use SERIALIZABLE isolation
level or REPEATABLE READ isolation level.
– In order to get snapshot-consistent result for multiple
table scans.
●
READ COMMITTED isolation level cannot be
used.
PGConf.ASIA 2019
Modify the program to use ACID
transactions
contrib/postgres_fdw/connection.c
@@ -429,7 +429,10 @@ begin_remote_xact(ConnCacheEntry *entry)
if (IsolationIsSerializable())
sql = "START TRANSACTION ISOLATION LEVEL SERIALIZABLE";
else
- sql = "START TRANSACTION ISOLATION LEVEL REPEATABLE READ";
+ if (XactIsoLevel == XACT_READ_COMMITTED)
+ sql = "START TRANSACTION ISOLATION LEVEL READ COMMITTED";
+ else
+ sql = "START TRANSACTION ISOLATION LEVEL REPEATABLE READ";
entry->changing_xact_state = true;
do_sql_command(entry->conn, sql);
entry->xact_depth = 1;
PGConf.ASIA 2019
Operation confirmed with pgbench
●
Confirmed ACID transaction operation.
– It works fine!
●
Incidentally, measure benchmark.
– Oops!
PGConf.ASIA 2019
4. How fast is PostgreSQL's write load balancing?
PGConf.ASIA 2019
Problems in benchmark measurement
(1/2)
●
Settings are complicated
– Different settings are required for multiple
DBs of parent and child
Where is the child db?
Which is the
partition key?
Where is the parent db?
What is the
threshold value
for each db?
What is the access
information for each DB?
PGConf.ASIA 2019
Example of partitioning table with FDW
Parent DB
Child DB 1
Child DB 2
1 - 500,000,000
500,00,001 – 1,000,000,000
Table Partitioning with
FDW
child_host_1
child_host_2
PGConf.ASIA 2019
Settings (1/10)
●
Create Extension
CREATE EXTENSION postgres_fdw;
PGConf.ASIA 2019
Settings (2/10)
●
Create Server for FDW
CREATE SERVER db1 FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'child_host_1', port '5432', dbname 'db');
CREATE SERVER db2 FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'child_host_2', port '5432', dbname 'db');
PGConf.ASIA 2019
Settings (3/10)
●
Create User Mapping
CREATE USER MAPPING FOR postgres SERVER db1
OPTIONS (user 'postgres');
CREATE USER MAPPING FOR postgres SERVER db2
OPTIONS (user 'postgres');
PGConf.ASIA 2019
Settings (4/10)
●
Create Parent Table (pgbench_accounts)
CREATE TABLE public.pgbench_accounts (
aid integer NOT NULL,
bid integer,
abalance integer,
filler character(84)
)
PARTITION BY RANGE (aid) ;
PGConf.ASIA 2019
Settings (5/10)
●
Create Foreign Table (pgbench_accounts)
CREATE FOREIGN TABLE public.pgbench_accounts_1
PARTITION OF public.pgbench_accounts
FOR VALUES FROM (1) TO (500000001)
SERVER db1
OPTIONS ( table_name 'pgbench_accounts');
CREATE FOREIGN TABLE public.pgbench_accounts_2
PARTITION OF public.pgbench_accounts
FOR VALUES FROM (500000001) TO (1000000001)
SERVER db2
OPTIONS ( table_name 'pgbench_accounts');
PGConf.ASIA 2019
Settings (6/10)
●
Create Parent Table (pgbench_branches)
CREATE TABLE public.pgbench_branches (
bid integer NOT NULL,
bbalance integer,
filler character(88)
)
PARTITION BY RANGE (bid) ;
PGConf.ASIA 2019
Settings (7/10)
●
Create Foreign Table (pgbench_branches)
CREATE FOREIGN TABLE public.pgbench_branches_1
PARTITION OF public.pgbench_branches
FOR VALUES FROM (1) TO (5001)
SERVER db1
OPTIONS ( table_name 'pgbench_branches');
CREATE FOREIGN TABLE public.pgbench_branches_2
PARTITION OF public.pgbench_branches
FOR VALUES FROM (5001) TO (10001)
SERVER db2
OPTIONS ( table_name 'pgbench_branches');
PGConf.ASIA 2019
Settings (8/10)
●
Create Parent Table (pgbench_tellers)
CREATE TABLE public.pgbench_tellers (
tid integer NOT NULL,
bid integer,
tbalance integer,
filler character(84)
)
PARTITION BY RANGE (tid) ;
PGConf.ASIA 2019
Settings (9/10)
●
Create Foreign Table (pgbench_tellers)
CREATE FOREIGN TABLE public.pgbench_tellers_1
PARTITION OF public.pgbench_tellers
FOR VALUES FROM (1) TO (50001)
SERVER db1
OPTIONS ( table_name 'pgbench_tellers');
CREATE FOREIGN TABLE public.pgbench_tellers_2
PARTITION OF public.pgbench_tellers
FOR VALUES FROM (50001) TO (100001)
SERVER db2
OPTIONS ( table_name 'pgbench_tellers');
PGConf.ASIA 2019
Settings (10/10)
●
Create Index (primary key)
ALTER TABLE ONLY public.pgbench_accounts
ADD CONSTRAINT pgbench_accounts_pkey PRIMARY KEY (aid);
ALTER TABLE ONLY public.pgbench_branches
ADD CONSTRAINT pgbench_branches_pkey PRIMARY KEY (bid);
ALTER TABLE ONLY public.pgbench_tellers
ADD CONSTRAINT pgbench_tellers_pkey PRIMARY KEY (tid);
PGConf.ASIA 2019
Another Problems in benchmark
measurement (2/2)
●
It takes time to load data.
– It takes 36 hours to read one billion data.
– It is necessary to measure multiple times
by changing the scale of data and the
number of partitions.
PGConf.ASIA 2019
I've got it
PGConf.ASIA 2019
Solutions for complicated
●
Create a patch.
– Patch to automatically generate table settings for
pgbench.
I’m good at following the program!
PGConf.ASIA 2019
Solutions for time consumption
●
Create a patch.
– Patch that loads multiple child tables in parallel with
pgbenche.
Parallel processing is the true value of scale-out!
db1 db2 db3 db4
PGConf.ASIA 2019
How to use it (1/2)
●
Parent DB initialization parameter with child
DB configuration file specified.
– pgbench -i -s 10000 -W child.conf db
●
“child.conf” format.
{children:[
{'host':'child_host_1','port':'5432','dbname':'db','user':'postgres','password':''},
{'host':'child_host_2','port':'5432','dbname':'db','user':'postgres','password':''}
]}
PGConf.ASIA 2019
How to use it (2/2)
●
Child DB initialization parameter with start key.
– In child db 1
●
pgbench -i -w 1 -s 5000 db
– In child db 2
●
pgbench -i -w 5001 -s 10000 db
PGConf.ASIA 2019
You can find patch on github
●
https://github.com/at-mitani/pgbench-fdw-patch
Parent DB
Child DB 1
Child DB n
PGConf.ASIA 2019
5. Conclusion.
PGConf.ASIA 2019
What were measured?
●
Child DB it self.
●
Multi parent / child DB without ACID
transaction.
●
Multi parent / child DB with ACID transaction.
PGConf.ASIA 2019
Child DB
pgbench
Parent
DB
Child
DB
Child
DB
Normal
DB
pgbench
Machine spec
1 CPU
1G RAM
8G SSD
PGConf.ASIA 2019
Child DB
2 4 8 16 32 64 128 256 512
0
200
400
600
800
1000
1200
normal
child-direct
PGConf.ASIA 2019
Multi Parent / Child
pgbench LB
Parent
DB 1
Parent
DB 5
Child
DB 1
Child
DB 2
Child
DB 3
Child
DB 10
Machine spec
1 CPU
4G RAM
30G SSD
PGConf.ASIA 2019
5 Child DB on multi parent DB
without ACID transaction
2 4 8 16 32 64 128 256 512 768
0
200
400
600
800
1000
1200
1400
normal
p=1
p=2
p=3
p=4
p=5
TPS
connections
PGConf.ASIA 2019
10 child DB without ACID Transaction
2 4 8 16 32 64 128 256 512
0
200
400
600
800
1000
1200
1400
normal
p=1
p=2
p=3
p=4
p=5
PGConf.ASIA 2019
Without ACID query
●
Since this is a measurement using a query that
does not have a record lock due to a
transaction,
●
The number of child DB has an effect on
performance directory
PGConf.ASIA 2019
5 parent DB with ACID transaction
TPS
connections
250 500 750 1000 1250 1500 1750 2000
0
200
400
600
800
1000
1200
1400
1600
controll
c1
c2
c5
c10
PGConf.ASIA 2019
10 parent DB with ACID transaction
TPS
connections
250 500 750 1000 1250 1500 1750 2000
0
200
400
600
800
1000
1200
1400
1600
1800
2000
controll
c1
c2
c5
c10
PGConf.ASIA 2019
With ACID query
●
Since record locks due to transactions occur in
the child DB, performance will not improve
even if the child DB is increased
●
Increasing the parent DB that receives the
query will spread the lock queue and improve
performance
PGConf.ASIA 2019
6. Summary.
PGConf.ASIA 2019
Why write load distribution is required
●
On-premise high performance DB is
expensive, so it becomes a business
– Cache is mode advantageous in a high data read load
system.
– NoSQL is mode advantageous in a high data write
load system (non real time system).
PGConf.ASIA 2019
How to distribute write load in
PostgreSQL?
●
Table partitioning using FDW is effective.
– PostgreSQL can do it!
PGConf.ASIA 2019
How fast is PostgreSQL's write load
balancing configuration?
●
Child DB itself is faster than non-partitioned DB.
●
More child DB is better for without ACID transaction.
●
More parent DB is better for with ACID transaction.
PGConf.ASIA 2019
However...
●
The optimal number of DB depends on
– Data scale
– Query type
– Machine specifications.
●
Benchmark is important.
– Don't guess. Measure and find out way.
by Tim Bray
PGConf.ASIA 2019
Thank you for your attention!
Terima kasih atas perhatian Anda!
Please get patch and try it
https://github.com/at-mitani/pgbench-fdw-patch
PGConf.ASIA 2019
Any questions?
Anda punya pertanyaan?

More Related Content

What's hot

PGConf.ASIA 2019 Bali - Keynote Speech 3 - Kohei KaiGai
PGConf.ASIA 2019 Bali - Keynote Speech 3 - Kohei KaiGaiPGConf.ASIA 2019 Bali - Keynote Speech 3 - Kohei KaiGai
PGConf.ASIA 2019 Bali - Keynote Speech 3 - Kohei KaiGai
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...
PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...
PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...
PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...
PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - Partitioning in PostgreSQL - Amit Langote
PGConf.ASIA 2019 Bali -  Partitioning in PostgreSQL - Amit LangotePGConf.ASIA 2019 Bali -  Partitioning in PostgreSQL - Amit Langote
PGConf.ASIA 2019 Bali - Partitioning in PostgreSQL - Amit Langote
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - Modern PostgreSQL Monitoring & Diagnostics - Mahadeva...
PGConf.ASIA 2019 Bali - Modern PostgreSQL Monitoring & Diagnostics - Mahadeva...PGConf.ASIA 2019 Bali - Modern PostgreSQL Monitoring & Diagnostics - Mahadeva...
PGConf.ASIA 2019 Bali - Modern PostgreSQL Monitoring & Diagnostics - Mahadeva...
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - Keynote Speech 2 - Ivan Pachenko
PGConf.ASIA 2019 Bali - Keynote Speech 2 - Ivan PachenkoPGConf.ASIA 2019 Bali - Keynote Speech 2 - Ivan Pachenko
PGConf.ASIA 2019 Bali - Keynote Speech 2 - Ivan Pachenko
Equnix Business Solutions
 
PGConf APAC 2018: PostgreSQL 10 - Replication goes Logical
PGConf APAC 2018: PostgreSQL 10 - Replication goes LogicalPGConf APAC 2018: PostgreSQL 10 - Replication goes Logical
PGConf APAC 2018: PostgreSQL 10 - Replication goes Logical
PGConf APAC
 
PostgreSQL on AWS: Tips & Tricks (and horror stories)
PostgreSQL on AWS: Tips & Tricks (and horror stories)PostgreSQL on AWS: Tips & Tricks (and horror stories)
PostgreSQL on AWS: Tips & Tricks (and horror stories)
Alexander Kukushkin
 
Reading The Source Code of Presto
Reading The Source Code of PrestoReading The Source Code of Presto
Reading The Source Code of Presto
Taro L. Saito
 
PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...
PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...
PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...
PGConf APAC
 
PGConf APAC 2018 Keynote: PostgreSQL goes eleven
PGConf APAC 2018 Keynote: PostgreSQL goes elevenPGConf APAC 2018 Keynote: PostgreSQL goes eleven
PGConf APAC 2018 Keynote: PostgreSQL goes eleven
PGConf APAC
 
Presto conferencetokyo2019
Presto conferencetokyo2019Presto conferencetokyo2019
Presto conferencetokyo2019
wyukawa
 
PGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC 2018 - PostgreSQL performance comparison in various cloudsPGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC
 
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien RouhaudPGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
Equnix Business Solutions
 
PostgreSQL with OpenCL
PostgreSQL with OpenCLPostgreSQL with OpenCL
PostgreSQL with OpenCL
Muhaza Liebenlito
 
Postgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to KnowPostgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to Know
EDB
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC
 
20210301_PGconf_Online_GPU_PostGIS_GiST_Index
20210301_PGconf_Online_GPU_PostGIS_GiST_Index20210301_PGconf_Online_GPU_PostGIS_GiST_Index
20210301_PGconf_Online_GPU_PostGIS_GiST_Index
Kohei KaiGai
 
PGday_korea_2021_leeuijin
PGday_korea_2021_leeuijinPGday_korea_2021_leeuijin
PGday_korea_2021_leeuijin
의진 이
 

What's hot (20)

PGConf.ASIA 2019 Bali - Keynote Speech 3 - Kohei KaiGai
PGConf.ASIA 2019 Bali - Keynote Speech 3 - Kohei KaiGaiPGConf.ASIA 2019 Bali - Keynote Speech 3 - Kohei KaiGai
PGConf.ASIA 2019 Bali - Keynote Speech 3 - Kohei KaiGai
 
PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...
PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...
PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...
 
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
 
PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...
PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...
PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...
 
PGConf.ASIA 2019 Bali - Partitioning in PostgreSQL - Amit Langote
PGConf.ASIA 2019 Bali -  Partitioning in PostgreSQL - Amit LangotePGConf.ASIA 2019 Bali -  Partitioning in PostgreSQL - Amit Langote
PGConf.ASIA 2019 Bali - Partitioning in PostgreSQL - Amit Langote
 
PGConf.ASIA 2019 Bali - Modern PostgreSQL Monitoring & Diagnostics - Mahadeva...
PGConf.ASIA 2019 Bali - Modern PostgreSQL Monitoring & Diagnostics - Mahadeva...PGConf.ASIA 2019 Bali - Modern PostgreSQL Monitoring & Diagnostics - Mahadeva...
PGConf.ASIA 2019 Bali - Modern PostgreSQL Monitoring & Diagnostics - Mahadeva...
 
PGConf.ASIA 2019 Bali - Keynote Speech 2 - Ivan Pachenko
PGConf.ASIA 2019 Bali - Keynote Speech 2 - Ivan PachenkoPGConf.ASIA 2019 Bali - Keynote Speech 2 - Ivan Pachenko
PGConf.ASIA 2019 Bali - Keynote Speech 2 - Ivan Pachenko
 
PGConf APAC 2018: PostgreSQL 10 - Replication goes Logical
PGConf APAC 2018: PostgreSQL 10 - Replication goes LogicalPGConf APAC 2018: PostgreSQL 10 - Replication goes Logical
PGConf APAC 2018: PostgreSQL 10 - Replication goes Logical
 
PostgreSQL on AWS: Tips & Tricks (and horror stories)
PostgreSQL on AWS: Tips & Tricks (and horror stories)PostgreSQL on AWS: Tips & Tricks (and horror stories)
PostgreSQL on AWS: Tips & Tricks (and horror stories)
 
Reading The Source Code of Presto
Reading The Source Code of PrestoReading The Source Code of Presto
Reading The Source Code of Presto
 
PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...
PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...
PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...
 
PGConf APAC 2018 Keynote: PostgreSQL goes eleven
PGConf APAC 2018 Keynote: PostgreSQL goes elevenPGConf APAC 2018 Keynote: PostgreSQL goes eleven
PGConf APAC 2018 Keynote: PostgreSQL goes eleven
 
Presto conferencetokyo2019
Presto conferencetokyo2019Presto conferencetokyo2019
Presto conferencetokyo2019
 
PGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC 2018 - PostgreSQL performance comparison in various cloudsPGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC 2018 - PostgreSQL performance comparison in various clouds
 
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien RouhaudPGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
 
PostgreSQL with OpenCL
PostgreSQL with OpenCLPostgreSQL with OpenCL
PostgreSQL with OpenCL
 
Postgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to KnowPostgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to Know
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companionPGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
 
20210301_PGconf_Online_GPU_PostGIS_GiST_Index
20210301_PGconf_Online_GPU_PostGIS_GiST_Index20210301_PGconf_Online_GPU_PostGIS_GiST_Index
20210301_PGconf_Online_GPU_PostGIS_GiST_Index
 
PGday_korea_2021_leeuijin
PGday_korea_2021_leeuijinPGday_korea_2021_leeuijin
PGday_korea_2021_leeuijin
 

Similar to PGConf.ASIA 2019 Bali - How did PostgreSQL Write Load Balancing of Queries Using Transactions - Atsushi Mitani

Online Upgrade Using Logical Replication
 Online Upgrade Using Logical Replication Online Upgrade Using Logical Replication
Online Upgrade Using Logical Replication
EDB
 
Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~
Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~
Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~
Insight Technology, Inc.
 
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
PivotalOpenSourceHub
 
Build a Big Data solution using DB2 for z/OS
Build a Big Data solution using DB2 for z/OSBuild a Big Data solution using DB2 for z/OS
Build a Big Data solution using DB2 for z/OS
Jane Man
 
PGConf.ASIA 2019 Bali - Full-throttle Running on Terabytes Log-data - Kohei K...
PGConf.ASIA 2019 Bali - Full-throttle Running on Terabytes Log-data - Kohei K...PGConf.ASIA 2019 Bali - Full-throttle Running on Terabytes Log-data - Kohei K...
PGConf.ASIA 2019 Bali - Full-throttle Running on Terabytes Log-data - Kohei K...
Equnix Business Solutions
 
Scaling a SaaS backend with PostgreSQL - A case study
Scaling a SaaS backend with PostgreSQL - A case studyScaling a SaaS backend with PostgreSQL - A case study
Scaling a SaaS backend with PostgreSQL - A case study
Oliver Seemann
 
Dask and Machine Learning Models in Production - PyColorado 2019
Dask and Machine Learning Models in Production - PyColorado 2019Dask and Machine Learning Models in Production - PyColorado 2019
Dask and Machine Learning Models in Production - PyColorado 2019
William Cox
 
Exploiting machine learning to keep Hadoop clusters healthy
Exploiting machine learning to keep Hadoop clusters healthyExploiting machine learning to keep Hadoop clusters healthy
Exploiting machine learning to keep Hadoop clusters healthy
DataWorks Summit
 
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
Kohei KaiGai
 
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
José Lin
 
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Codemotion
 
20181116 Massive Log Processing using I/O optimized PostgreSQL
20181116 Massive Log Processing using I/O optimized PostgreSQL20181116 Massive Log Processing using I/O optimized PostgreSQL
20181116 Massive Log Processing using I/O optimized PostgreSQL
Kohei KaiGai
 
Gobblin @ NerdWallet (Nov 2015)
Gobblin @ NerdWallet (Nov 2015)Gobblin @ NerdWallet (Nov 2015)
Gobblin @ NerdWallet (Nov 2015)
NerdWalletHQ
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
Severalnines
 
Very large scale distributed deep learning on BigDL
Very large scale distributed deep learning on BigDLVery large scale distributed deep learning on BigDL
Very large scale distributed deep learning on BigDL
DESMOND YUEN
 
Dataflow shuffle service
Dataflow shuffle service Dataflow shuffle service
Dataflow shuffle service
Yuta Hono
 
Managing Apache Spark Workload and Automatic Optimizing
Managing Apache Spark Workload and Automatic OptimizingManaging Apache Spark Workload and Automatic Optimizing
Managing Apache Spark Workload and Automatic Optimizing
Databricks
 
GanesanDBA - New
GanesanDBA - NewGanesanDBA - New
GanesanDBA - New
Ganesan Ramaswamy
 
7 key recipes for data engineering
7 key recipes for data engineering7 key recipes for data engineering
7 key recipes for data engineering
univalence
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020
Mayank Shrivastava
 

Similar to PGConf.ASIA 2019 Bali - How did PostgreSQL Write Load Balancing of Queries Using Transactions - Atsushi Mitani (20)

Online Upgrade Using Logical Replication
 Online Upgrade Using Logical Replication Online Upgrade Using Logical Replication
Online Upgrade Using Logical Replication
 
Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~
Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~
Great performance at scale~次期PostgreSQL12のパーティショニング性能の実力に迫る~
 
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
 
Build a Big Data solution using DB2 for z/OS
Build a Big Data solution using DB2 for z/OSBuild a Big Data solution using DB2 for z/OS
Build a Big Data solution using DB2 for z/OS
 
PGConf.ASIA 2019 Bali - Full-throttle Running on Terabytes Log-data - Kohei K...
PGConf.ASIA 2019 Bali - Full-throttle Running on Terabytes Log-data - Kohei K...PGConf.ASIA 2019 Bali - Full-throttle Running on Terabytes Log-data - Kohei K...
PGConf.ASIA 2019 Bali - Full-throttle Running on Terabytes Log-data - Kohei K...
 
Scaling a SaaS backend with PostgreSQL - A case study
Scaling a SaaS backend with PostgreSQL - A case studyScaling a SaaS backend with PostgreSQL - A case study
Scaling a SaaS backend with PostgreSQL - A case study
 
Dask and Machine Learning Models in Production - PyColorado 2019
Dask and Machine Learning Models in Production - PyColorado 2019Dask and Machine Learning Models in Production - PyColorado 2019
Dask and Machine Learning Models in Production - PyColorado 2019
 
Exploiting machine learning to keep Hadoop clusters healthy
Exploiting machine learning to keep Hadoop clusters healthyExploiting machine learning to keep Hadoop clusters healthy
Exploiting machine learning to keep Hadoop clusters healthy
 
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
 
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
2022 COSCUP - Let's speed up your PostgreSQL services!.pptx
 
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
Gabriele Nocco - Massive distributed processing with H2O - Codemotion Milan 2017
 
20181116 Massive Log Processing using I/O optimized PostgreSQL
20181116 Massive Log Processing using I/O optimized PostgreSQL20181116 Massive Log Processing using I/O optimized PostgreSQL
20181116 Massive Log Processing using I/O optimized PostgreSQL
 
Gobblin @ NerdWallet (Nov 2015)
Gobblin @ NerdWallet (Nov 2015)Gobblin @ NerdWallet (Nov 2015)
Gobblin @ NerdWallet (Nov 2015)
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
 
Very large scale distributed deep learning on BigDL
Very large scale distributed deep learning on BigDLVery large scale distributed deep learning on BigDL
Very large scale distributed deep learning on BigDL
 
Dataflow shuffle service
Dataflow shuffle service Dataflow shuffle service
Dataflow shuffle service
 
Managing Apache Spark Workload and Automatic Optimizing
Managing Apache Spark Workload and Automatic OptimizingManaging Apache Spark Workload and Automatic Optimizing
Managing Apache Spark Workload and Automatic Optimizing
 
GanesanDBA - New
GanesanDBA - NewGanesanDBA - New
GanesanDBA - New
 
7 key recipes for data engineering
7 key recipes for data engineering7 key recipes for data engineering
7 key recipes for data engineering
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020
 

More from Equnix Business Solutions

Yang perlu kita ketahui Untuk memahami aspek utama IT dalam bisnis_.pdf
Yang perlu kita ketahui Untuk memahami aspek utama IT dalam bisnis_.pdfYang perlu kita ketahui Untuk memahami aspek utama IT dalam bisnis_.pdf
Yang perlu kita ketahui Untuk memahami aspek utama IT dalam bisnis_.pdf
Equnix Business Solutions
 
Kebocoran Data_ Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...
Kebocoran Data_  Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...Kebocoran Data_  Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...
Kebocoran Data_ Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...
Equnix Business Solutions
 
Kuliah Tamu - Dari Proses Bisnis Menuju Struktur Data.pdf
Kuliah Tamu - Dari Proses Bisnis Menuju Struktur Data.pdfKuliah Tamu - Dari Proses Bisnis Menuju Struktur Data.pdf
Kuliah Tamu - Dari Proses Bisnis Menuju Struktur Data.pdf
Equnix Business Solutions
 
EWTT22_ Apakah Open Source Cocok digunakan dalam Korporasi_.pdf
EWTT22_ Apakah Open Source Cocok digunakan dalam Korporasi_.pdfEWTT22_ Apakah Open Source Cocok digunakan dalam Korporasi_.pdf
EWTT22_ Apakah Open Source Cocok digunakan dalam Korporasi_.pdf
Equnix Business Solutions
 
Oracle to PostgreSQL, Challenges to Opportunity.pdf
Oracle to PostgreSQL, Challenges to Opportunity.pdfOracle to PostgreSQL, Challenges to Opportunity.pdf
Oracle to PostgreSQL, Challenges to Opportunity.pdf
Equnix Business Solutions
 
[EWTT2022] Strategi Implementasi Database dalam Microservice Architecture.pdf
[EWTT2022] Strategi Implementasi Database dalam Microservice Architecture.pdf[EWTT2022] Strategi Implementasi Database dalam Microservice Architecture.pdf
[EWTT2022] Strategi Implementasi Database dalam Microservice Architecture.pdf
Equnix Business Solutions
 
PostgreSQL as Enterprise Solution v1.1.pdf
PostgreSQL as Enterprise Solution v1.1.pdfPostgreSQL as Enterprise Solution v1.1.pdf
PostgreSQL as Enterprise Solution v1.1.pdf
Equnix Business Solutions
 
Webinar2021 - Does HA Can Help You Balance Your Load-.pdf
Webinar2021 - Does HA Can Help You Balance Your Load-.pdfWebinar2021 - Does HA Can Help You Balance Your Load-.pdf
Webinar2021 - Does HA Can Help You Balance Your Load-.pdf
Equnix Business Solutions
 
Webinar2021 - In-Memory Database, is it really faster-.pdf
Webinar2021 - In-Memory Database, is it really faster-.pdfWebinar2021 - In-Memory Database, is it really faster-.pdf
Webinar2021 - In-Memory Database, is it really faster-.pdf
Equnix Business Solutions
 
EQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdfEQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdf
Equnix Business Solutions
 
equpos - General Presentation v20230420.pptx
equpos - General Presentation v20230420.pptxequpos - General Presentation v20230420.pptx
equpos - General Presentation v20230420.pptx
Equnix Business Solutions
 
Equnix Appliance- Jawaban terbaik untuk kebutuhan komputasi yang mumpuni.pdf
Equnix Appliance- Jawaban terbaik untuk kebutuhan komputasi yang mumpuni.pdfEqunix Appliance- Jawaban terbaik untuk kebutuhan komputasi yang mumpuni.pdf
Equnix Appliance- Jawaban terbaik untuk kebutuhan komputasi yang mumpuni.pdf
Equnix Business Solutions
 
OSPX - Professional PostgreSQL Certification Scheme v20201111.pdf
OSPX - Professional PostgreSQL Certification Scheme v20201111.pdfOSPX - Professional PostgreSQL Certification Scheme v20201111.pdf
OSPX - Professional PostgreSQL Certification Scheme v20201111.pdf
Equnix Business Solutions
 
Equnix Company Profile v20230329.pdf
Equnix Company Profile v20230329.pdfEqunix Company Profile v20230329.pdf
Equnix Company Profile v20230329.pdf
Equnix Business Solutions
 
PGConf.ASIA 2019 - High Availability, 10 Seconds Failover - Lucky Haryadi
PGConf.ASIA 2019 - High Availability, 10 Seconds Failover - Lucky HaryadiPGConf.ASIA 2019 - High Availability, 10 Seconds Failover - Lucky Haryadi
PGConf.ASIA 2019 - High Availability, 10 Seconds Failover - Lucky Haryadi
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - Mission Critical Production High Availability Postgre...
PGConf.ASIA 2019 Bali - Mission Critical Production High Availability Postgre...PGConf.ASIA 2019 Bali - Mission Critical Production High Availability Postgre...
PGConf.ASIA 2019 Bali - Mission Critical Production High Availability Postgre...
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - Keynote Speech 1 - Bruce Momjian
PGConf.ASIA 2019 Bali - Keynote Speech 1 - Bruce MomjianPGConf.ASIA 2019 Bali - Keynote Speech 1 - Bruce Momjian
PGConf.ASIA 2019 Bali - Keynote Speech 1 - Bruce Momjian
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - How PostgreSQL Became King - Chris Travers
PGConf.ASIA 2019 Bali - How PostgreSQL Became King - Chris TraversPGConf.ASIA 2019 Bali - How PostgreSQL Became King - Chris Travers
PGConf.ASIA 2019 Bali - How PostgreSQL Became King - Chris Travers
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - A step towards SQL/MED - DATALINK - Gilles Darold
PGConf.ASIA 2019 Bali - A step towards SQL/MED - DATALINK - Gilles DaroldPGConf.ASIA 2019 Bali - A step towards SQL/MED - DATALINK - Gilles Darold
PGConf.ASIA 2019 Bali - A step towards SQL/MED - DATALINK - Gilles Darold
Equnix Business Solutions
 
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi SuzukiPGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
Equnix Business Solutions
 

More from Equnix Business Solutions (20)

Yang perlu kita ketahui Untuk memahami aspek utama IT dalam bisnis_.pdf
Yang perlu kita ketahui Untuk memahami aspek utama IT dalam bisnis_.pdfYang perlu kita ketahui Untuk memahami aspek utama IT dalam bisnis_.pdf
Yang perlu kita ketahui Untuk memahami aspek utama IT dalam bisnis_.pdf
 
Kebocoran Data_ Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...
Kebocoran Data_  Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...Kebocoran Data_  Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...
Kebocoran Data_ Tindakan Hacker atau Kriminal_ Bagaimana kita mengantisipasi...
 
Kuliah Tamu - Dari Proses Bisnis Menuju Struktur Data.pdf
Kuliah Tamu - Dari Proses Bisnis Menuju Struktur Data.pdfKuliah Tamu - Dari Proses Bisnis Menuju Struktur Data.pdf
Kuliah Tamu - Dari Proses Bisnis Menuju Struktur Data.pdf
 
EWTT22_ Apakah Open Source Cocok digunakan dalam Korporasi_.pdf
EWTT22_ Apakah Open Source Cocok digunakan dalam Korporasi_.pdfEWTT22_ Apakah Open Source Cocok digunakan dalam Korporasi_.pdf
EWTT22_ Apakah Open Source Cocok digunakan dalam Korporasi_.pdf
 
Oracle to PostgreSQL, Challenges to Opportunity.pdf
Oracle to PostgreSQL, Challenges to Opportunity.pdfOracle to PostgreSQL, Challenges to Opportunity.pdf
Oracle to PostgreSQL, Challenges to Opportunity.pdf
 
[EWTT2022] Strategi Implementasi Database dalam Microservice Architecture.pdf
[EWTT2022] Strategi Implementasi Database dalam Microservice Architecture.pdf[EWTT2022] Strategi Implementasi Database dalam Microservice Architecture.pdf
[EWTT2022] Strategi Implementasi Database dalam Microservice Architecture.pdf
 
PostgreSQL as Enterprise Solution v1.1.pdf
PostgreSQL as Enterprise Solution v1.1.pdfPostgreSQL as Enterprise Solution v1.1.pdf
PostgreSQL as Enterprise Solution v1.1.pdf
 
Webinar2021 - Does HA Can Help You Balance Your Load-.pdf
Webinar2021 - Does HA Can Help You Balance Your Load-.pdfWebinar2021 - Does HA Can Help You Balance Your Load-.pdf
Webinar2021 - Does HA Can Help You Balance Your Load-.pdf
 
Webinar2021 - In-Memory Database, is it really faster-.pdf
Webinar2021 - In-Memory Database, is it really faster-.pdfWebinar2021 - In-Memory Database, is it really faster-.pdf
Webinar2021 - In-Memory Database, is it really faster-.pdf
 
EQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdfEQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdf
 
equpos - General Presentation v20230420.pptx
equpos - General Presentation v20230420.pptxequpos - General Presentation v20230420.pptx
equpos - General Presentation v20230420.pptx
 
Equnix Appliance- Jawaban terbaik untuk kebutuhan komputasi yang mumpuni.pdf
Equnix Appliance- Jawaban terbaik untuk kebutuhan komputasi yang mumpuni.pdfEqunix Appliance- Jawaban terbaik untuk kebutuhan komputasi yang mumpuni.pdf
Equnix Appliance- Jawaban terbaik untuk kebutuhan komputasi yang mumpuni.pdf
 
OSPX - Professional PostgreSQL Certification Scheme v20201111.pdf
OSPX - Professional PostgreSQL Certification Scheme v20201111.pdfOSPX - Professional PostgreSQL Certification Scheme v20201111.pdf
OSPX - Professional PostgreSQL Certification Scheme v20201111.pdf
 
Equnix Company Profile v20230329.pdf
Equnix Company Profile v20230329.pdfEqunix Company Profile v20230329.pdf
Equnix Company Profile v20230329.pdf
 
PGConf.ASIA 2019 - High Availability, 10 Seconds Failover - Lucky Haryadi
PGConf.ASIA 2019 - High Availability, 10 Seconds Failover - Lucky HaryadiPGConf.ASIA 2019 - High Availability, 10 Seconds Failover - Lucky Haryadi
PGConf.ASIA 2019 - High Availability, 10 Seconds Failover - Lucky Haryadi
 
PGConf.ASIA 2019 Bali - Mission Critical Production High Availability Postgre...
PGConf.ASIA 2019 Bali - Mission Critical Production High Availability Postgre...PGConf.ASIA 2019 Bali - Mission Critical Production High Availability Postgre...
PGConf.ASIA 2019 Bali - Mission Critical Production High Availability Postgre...
 
PGConf.ASIA 2019 Bali - Keynote Speech 1 - Bruce Momjian
PGConf.ASIA 2019 Bali - Keynote Speech 1 - Bruce MomjianPGConf.ASIA 2019 Bali - Keynote Speech 1 - Bruce Momjian
PGConf.ASIA 2019 Bali - Keynote Speech 1 - Bruce Momjian
 
PGConf.ASIA 2019 Bali - How PostgreSQL Became King - Chris Travers
PGConf.ASIA 2019 Bali - How PostgreSQL Became King - Chris TraversPGConf.ASIA 2019 Bali - How PostgreSQL Became King - Chris Travers
PGConf.ASIA 2019 Bali - How PostgreSQL Became King - Chris Travers
 
PGConf.ASIA 2019 Bali - A step towards SQL/MED - DATALINK - Gilles Darold
PGConf.ASIA 2019 Bali - A step towards SQL/MED - DATALINK - Gilles DaroldPGConf.ASIA 2019 Bali - A step towards SQL/MED - DATALINK - Gilles Darold
PGConf.ASIA 2019 Bali - A step towards SQL/MED - DATALINK - Gilles Darold
 
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi SuzukiPGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
 

Recently uploaded

Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 

Recently uploaded (20)

Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 

PGConf.ASIA 2019 Bali - How did PostgreSQL Write Load Balancing of Queries Using Transactions - Atsushi Mitani

  • 1. PGConf.ASIA 2019 How did PostgreSQL Write LoadHow did PostgreSQL Write Load Balancing of Queries UsingBalancing of Queries Using Transactions?Transactions? Atsushi MitaniAtsushi Mitani SRA Nishi-Nihon Inc.SRA Nishi-Nihon Inc.
  • 2.
  • 3. PGConf.ASIA 2019 Copyright © Software Research Associates, Inc. All Rights Reserved Location of SRA Holdings Group SRA AMERICA, Inc. (New York, USA)Cavirin Systems, Inc. SRA OSS, Inc. Santa Clara (California, USA) SRA(Europe) B.V. Amstelveen (The Netherlands) SRA Tohoku SRA Nishi- Nihon Inc. SRA Kansai Office SRA India Private Limited Bangalore (India) Domestic Overseas SRA IP Solutions (Asia Pacific) Pte. Ltd. Singapore SRA Holdings Inc. SRA Corporation / Head Office (Ikebukuro) Software Science Co., Ltd. AIT Co., Ltd. SRA Professional Service Co., Ltd. SRA OSS, Inc. / Japan branch 愛司聯發軟件科技(上海)有限公司 Shanghai (China) SRA Chubu Office 2 Proxim Wireless Corporation San Jose (California, USA) Soft Road Apps DOO Belgrade (Serbia)
  • 4. PGConf.ASIA 2019 Agenda 1 Introduction. 2 Why write load distribution is required? 3 How to distribute write load in PostgreSQL? 4 How fast is PostgreSQL's write load balancing configuration? 5 Conclusion. 6 Summary.
  • 6. PGConf.ASIA 2019 Who am I ● Real Time Control System Engineer (1991- – Power distribution control system. ● Network Engineer (1995- – Telephone communication network monitoring. ● Database Engineer (1999- – Develop PGCluster. ● Security administrator (2000- ● Infrastructure engineer (2005- – Working in a Data center design division. ● Web Application Engineer (2008- – Back-end, Front-end, Android, iOS App ...
  • 7. PGConf.ASIA 2019 Purpose of this session ● Propose a suitable database configuration for various system types. ● Especially with a high write load database.
  • 8. PGConf.ASIA 2019 2. Why write load distribution is required?
  • 9. PGConf.ASIA 2019 The type of system and data load read write highlow high
  • 10. PGConf.ASIA 2019 Suitable DB type for each system read write highlow high RDBRDB CacheCache NoSQLNoSQL multi-mastermulti-master
  • 11. PGConf.ASIA 2019 Which area should RDB aim for ● Required features is real-time processing of high load read / write data – The problem is how to perform high-load read / write processing. – If PostgreSQL can solve the problem, it becomes a business
  • 12. PGConf.ASIA 2019 3. How to distribute write load in PostgreSQL?
  • 13. PGConf.ASIA 2019 Table partitioning Indonesia 264 milion Parent table Pulau Sumatera Jawa Pulau Kalimantan Child tables 141 milion 18.6 milion 50.3 milion
  • 14. PGConf.ASIA 2019 Pros & Cons of Table Partitioning ● Pros. – Easy to use. ● The parent table automatically reads and writes to the child table. ● No modification required on the program side. A piece of cake!
  • 15. PGConf.ASIA 2019 Pros & Cons of Table Partitioning ● Cons. – Does not load balance on a server basis. ● Both parent and child tables are running on the same DB instance. On the same plate...
  • 16. PGConf.ASIA 2019 How to distribution read & write load ● Foreign Data Wrapper (FDW) Parent DB Child DBIndonesia Pulau Sumatera Jawa Pulau Kalimantan
  • 17. PGConf.ASIA 2019 Pros & Cons of FDW ● Pros. – Partitioning with FDW. ● Partitioning can be used from PostgreSQL 11. ● Load balancing is possible since the parent and child are running on different DB instances. Dream spreads!
  • 18. PGConf.ASIA 2019 Pros & Cons of FDW ● Cons. – Cannot be used ACID transactions. ● Data consistency cannot be guaranteed. Oops, like wax fruit...
  • 19. PGConf.ASIA 2019 Let's make it ● Make a patch to enable ACID transactions. – Investigate why ACID transactions cannot be used with FDW. – Modify the program to use ACID transactions. – Confirm that the ACID transaction can be used in FDW by patch.Yes, let’s make it!
  • 20. PGConf.ASIA 2019 Why ACID transactions cannot be used with FDW ● FDW can only use SERIALIZABLE isolation level or REPEATABLE READ isolation level. – In order to get snapshot-consistent result for multiple table scans. ● READ COMMITTED isolation level cannot be used.
  • 21. PGConf.ASIA 2019 Modify the program to use ACID transactions contrib/postgres_fdw/connection.c @@ -429,7 +429,10 @@ begin_remote_xact(ConnCacheEntry *entry) if (IsolationIsSerializable()) sql = "START TRANSACTION ISOLATION LEVEL SERIALIZABLE"; else - sql = "START TRANSACTION ISOLATION LEVEL REPEATABLE READ"; + if (XactIsoLevel == XACT_READ_COMMITTED) + sql = "START TRANSACTION ISOLATION LEVEL READ COMMITTED"; + else + sql = "START TRANSACTION ISOLATION LEVEL REPEATABLE READ"; entry->changing_xact_state = true; do_sql_command(entry->conn, sql); entry->xact_depth = 1;
  • 22. PGConf.ASIA 2019 Operation confirmed with pgbench ● Confirmed ACID transaction operation. – It works fine! ● Incidentally, measure benchmark. – Oops!
  • 23. PGConf.ASIA 2019 4. How fast is PostgreSQL's write load balancing?
  • 24. PGConf.ASIA 2019 Problems in benchmark measurement (1/2) ● Settings are complicated – Different settings are required for multiple DBs of parent and child Where is the child db? Which is the partition key? Where is the parent db? What is the threshold value for each db? What is the access information for each DB?
  • 25. PGConf.ASIA 2019 Example of partitioning table with FDW Parent DB Child DB 1 Child DB 2 1 - 500,000,000 500,00,001 – 1,000,000,000 Table Partitioning with FDW child_host_1 child_host_2
  • 26. PGConf.ASIA 2019 Settings (1/10) ● Create Extension CREATE EXTENSION postgres_fdw;
  • 27. PGConf.ASIA 2019 Settings (2/10) ● Create Server for FDW CREATE SERVER db1 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'child_host_1', port '5432', dbname 'db'); CREATE SERVER db2 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'child_host_2', port '5432', dbname 'db');
  • 28. PGConf.ASIA 2019 Settings (3/10) ● Create User Mapping CREATE USER MAPPING FOR postgres SERVER db1 OPTIONS (user 'postgres'); CREATE USER MAPPING FOR postgres SERVER db2 OPTIONS (user 'postgres');
  • 29. PGConf.ASIA 2019 Settings (4/10) ● Create Parent Table (pgbench_accounts) CREATE TABLE public.pgbench_accounts ( aid integer NOT NULL, bid integer, abalance integer, filler character(84) ) PARTITION BY RANGE (aid) ;
  • 30. PGConf.ASIA 2019 Settings (5/10) ● Create Foreign Table (pgbench_accounts) CREATE FOREIGN TABLE public.pgbench_accounts_1 PARTITION OF public.pgbench_accounts FOR VALUES FROM (1) TO (500000001) SERVER db1 OPTIONS ( table_name 'pgbench_accounts'); CREATE FOREIGN TABLE public.pgbench_accounts_2 PARTITION OF public.pgbench_accounts FOR VALUES FROM (500000001) TO (1000000001) SERVER db2 OPTIONS ( table_name 'pgbench_accounts');
  • 31. PGConf.ASIA 2019 Settings (6/10) ● Create Parent Table (pgbench_branches) CREATE TABLE public.pgbench_branches ( bid integer NOT NULL, bbalance integer, filler character(88) ) PARTITION BY RANGE (bid) ;
  • 32. PGConf.ASIA 2019 Settings (7/10) ● Create Foreign Table (pgbench_branches) CREATE FOREIGN TABLE public.pgbench_branches_1 PARTITION OF public.pgbench_branches FOR VALUES FROM (1) TO (5001) SERVER db1 OPTIONS ( table_name 'pgbench_branches'); CREATE FOREIGN TABLE public.pgbench_branches_2 PARTITION OF public.pgbench_branches FOR VALUES FROM (5001) TO (10001) SERVER db2 OPTIONS ( table_name 'pgbench_branches');
  • 33. PGConf.ASIA 2019 Settings (8/10) ● Create Parent Table (pgbench_tellers) CREATE TABLE public.pgbench_tellers ( tid integer NOT NULL, bid integer, tbalance integer, filler character(84) ) PARTITION BY RANGE (tid) ;
  • 34. PGConf.ASIA 2019 Settings (9/10) ● Create Foreign Table (pgbench_tellers) CREATE FOREIGN TABLE public.pgbench_tellers_1 PARTITION OF public.pgbench_tellers FOR VALUES FROM (1) TO (50001) SERVER db1 OPTIONS ( table_name 'pgbench_tellers'); CREATE FOREIGN TABLE public.pgbench_tellers_2 PARTITION OF public.pgbench_tellers FOR VALUES FROM (50001) TO (100001) SERVER db2 OPTIONS ( table_name 'pgbench_tellers');
  • 35. PGConf.ASIA 2019 Settings (10/10) ● Create Index (primary key) ALTER TABLE ONLY public.pgbench_accounts ADD CONSTRAINT pgbench_accounts_pkey PRIMARY KEY (aid); ALTER TABLE ONLY public.pgbench_branches ADD CONSTRAINT pgbench_branches_pkey PRIMARY KEY (bid); ALTER TABLE ONLY public.pgbench_tellers ADD CONSTRAINT pgbench_tellers_pkey PRIMARY KEY (tid);
  • 36. PGConf.ASIA 2019 Another Problems in benchmark measurement (2/2) ● It takes time to load data. – It takes 36 hours to read one billion data. – It is necessary to measure multiple times by changing the scale of data and the number of partitions.
  • 38. PGConf.ASIA 2019 Solutions for complicated ● Create a patch. – Patch to automatically generate table settings for pgbench. I’m good at following the program!
  • 39. PGConf.ASIA 2019 Solutions for time consumption ● Create a patch. – Patch that loads multiple child tables in parallel with pgbenche. Parallel processing is the true value of scale-out! db1 db2 db3 db4
  • 40. PGConf.ASIA 2019 How to use it (1/2) ● Parent DB initialization parameter with child DB configuration file specified. – pgbench -i -s 10000 -W child.conf db ● “child.conf” format. {children:[ {'host':'child_host_1','port':'5432','dbname':'db','user':'postgres','password':''}, {'host':'child_host_2','port':'5432','dbname':'db','user':'postgres','password':''} ]}
  • 41. PGConf.ASIA 2019 How to use it (2/2) ● Child DB initialization parameter with start key. – In child db 1 ● pgbench -i -w 1 -s 5000 db – In child db 2 ● pgbench -i -w 5001 -s 10000 db
  • 42. PGConf.ASIA 2019 You can find patch on github ● https://github.com/at-mitani/pgbench-fdw-patch Parent DB Child DB 1 Child DB n
  • 44. PGConf.ASIA 2019 What were measured? ● Child DB it self. ● Multi parent / child DB without ACID transaction. ● Multi parent / child DB with ACID transaction.
  • 46. PGConf.ASIA 2019 Child DB 2 4 8 16 32 64 128 256 512 0 200 400 600 800 1000 1200 normal child-direct
  • 47. PGConf.ASIA 2019 Multi Parent / Child pgbench LB Parent DB 1 Parent DB 5 Child DB 1 Child DB 2 Child DB 3 Child DB 10 Machine spec 1 CPU 4G RAM 30G SSD
  • 48. PGConf.ASIA 2019 5 Child DB on multi parent DB without ACID transaction 2 4 8 16 32 64 128 256 512 768 0 200 400 600 800 1000 1200 1400 normal p=1 p=2 p=3 p=4 p=5 TPS connections
  • 49. PGConf.ASIA 2019 10 child DB without ACID Transaction 2 4 8 16 32 64 128 256 512 0 200 400 600 800 1000 1200 1400 normal p=1 p=2 p=3 p=4 p=5
  • 50. PGConf.ASIA 2019 Without ACID query ● Since this is a measurement using a query that does not have a record lock due to a transaction, ● The number of child DB has an effect on performance directory
  • 51. PGConf.ASIA 2019 5 parent DB with ACID transaction TPS connections 250 500 750 1000 1250 1500 1750 2000 0 200 400 600 800 1000 1200 1400 1600 controll c1 c2 c5 c10
  • 52. PGConf.ASIA 2019 10 parent DB with ACID transaction TPS connections 250 500 750 1000 1250 1500 1750 2000 0 200 400 600 800 1000 1200 1400 1600 1800 2000 controll c1 c2 c5 c10
  • 53. PGConf.ASIA 2019 With ACID query ● Since record locks due to transactions occur in the child DB, performance will not improve even if the child DB is increased ● Increasing the parent DB that receives the query will spread the lock queue and improve performance
  • 55. PGConf.ASIA 2019 Why write load distribution is required ● On-premise high performance DB is expensive, so it becomes a business – Cache is mode advantageous in a high data read load system. – NoSQL is mode advantageous in a high data write load system (non real time system).
  • 56. PGConf.ASIA 2019 How to distribute write load in PostgreSQL? ● Table partitioning using FDW is effective. – PostgreSQL can do it!
  • 57. PGConf.ASIA 2019 How fast is PostgreSQL's write load balancing configuration? ● Child DB itself is faster than non-partitioned DB. ● More child DB is better for without ACID transaction. ● More parent DB is better for with ACID transaction.
  • 58. PGConf.ASIA 2019 However... ● The optimal number of DB depends on – Data scale – Query type – Machine specifications. ● Benchmark is important. – Don't guess. Measure and find out way. by Tim Bray
  • 59. PGConf.ASIA 2019 Thank you for your attention! Terima kasih atas perhatian Anda! Please get patch and try it https://github.com/at-mitani/pgbench-fdw-patch