SlideShare une entreprise Scribd logo
1  sur  60
Télécharger pour lire hors ligne
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?

Contenu connexe

Tendances

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 KaiGaiEqunix 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 LangoteEqunix 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 PachenkoEqunix 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 LogicalPGConf 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 PrestoTaro 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 elevenPGConf APAC
 
Presto conferencetokyo2019
Presto conferencetokyo2019Presto conferencetokyo2019
Presto conferencetokyo2019wyukawa
 
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 cloudsPGConf 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 RouhaudEqunix Business Solutions
 
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 KnowEDB
 
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 companionPGConf 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_IndexKohei KaiGai
 
PGday_korea_2021_leeuijin
PGday_korea_2021_leeuijinPGday_korea_2021_leeuijin
PGday_korea_2021_leeuijin의진 이
 

Tendances (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
 

Similaire à PostgreSQL Write Load Balancing Using Table Partitioning and Transactions

Online Upgrade Using Logical Replication
 Online Upgrade Using Logical Replication Online Upgrade Using Logical Replication
Online Upgrade Using Logical ReplicationEDB
 
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/OSJane 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 studyOliver 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 2019William 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 healthyDataWorks 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!.pptxJosé 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 2017Codemotion
 
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 PostgreSQLKohei 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 MariaDBSeveralnines
 
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 BigDLDESMOND 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 OptimizingDatabricks
 
7 key recipes for data engineering
7 key recipes for data engineering7 key recipes for data engineering
7 key recipes for data engineeringunivalence
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Mayank Shrivastava
 

Similaire à PostgreSQL Write Load Balancing Using Table Partitioning and Transactions (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
 

Plus de 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_.pdfEqunix 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.pdfEqunix 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_.pdfEqunix 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.pdfEqunix 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.pdfEqunix 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-.pdfEqunix 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-.pdfEqunix Business Solutions
 
equpos - General Presentation v20230420.pptx
equpos - General Presentation v20230420.pptxequpos - General Presentation v20230420.pptx
equpos - General Presentation v20230420.pptxEqunix 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.pdfEqunix 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.pdfEqunix 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 HaryadiEqunix 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 MomjianEqunix 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 TraversEqunix 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 DaroldEqunix 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 SuzukiEqunix Business Solutions
 

Plus de 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
 

Dernier

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Dernier (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

PostgreSQL Write Load Balancing Using Table Partitioning and Transactions

  • 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