SlideShare una empresa de Scribd logo
1 de 54
Descargar para leer sin conexión
Life on a rollercoaster
Scaling the PostgreSQL backup and recovery
Federico Campoli
Transferwise
2 November 2016
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 1 / 52
Table of contents
1 2012 - Who am I? What I’m doing?
2 2013 - On thin ice
3 2014 - The battle of five armies
4 2015 - THIS IS SPARTA!
5 2016 - Breathe
6 Wrap up
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 2 / 52
Warning!
The story you are about to hear is true.
Only the names have been changed to protect the innocent.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 3 / 52
Dramatis personae
A brilliant startup ACME
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 4 / 52
Dramatis personae
The clueless engineers CE
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 5 / 52
Dramatis personae
An elephant on steroids PG
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 6 / 52
Dramatis personae
The big cheese HW
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 7 / 52
Dramatis personae
The real hero DBA
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 8 / 52
In the beginning
Our story starts in the year 2012. The world was young and our DBA started a
new brilliant career in ACME.
After the usual time required by the onboarding, to our DBA were handed the
production’s servers.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 9 / 52
Table of contents
1 2012 - Who am I? What I’m doing?
2 2013 - On thin ice
3 2014 - The battle of five armies
4 2015 - THIS IS SPARTA!
5 2016 - Breathe
6 Wrap up
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 10 / 52
2012 - Who am I? What I’m doing?
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 11 / 52
Size does matter
PG, our powerful and friendly elephant was used for storing the data in a multi
shard configuration.
Not really big actually but very troubled indeed!
A small logger database - 50 GB
A larger configuration and auth datababase - 200 GB
Two archive db - 4 TB each
One db for the business intelligence - 2 TB
Each db had an hot standby counterpart hosted on less powerful HW.
Our story tells the life of the BI database.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 12 / 52
The carnival of monsters
In the early 2013 our brave DBA addressed the several problems found on the
current backup and recovery configuration.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 13 / 52
Lagging standby
Suboptimal schema.
Churn on large tables and high wal generation rate
The slave lagged just because there was autovacuum running
rsync used in archive command.
The wal were archived over the network using rsync+ssh
The *.ready files in the pg xlog increased the risk of the cluster’s crash.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 14 / 52
Base backup
Rudimentary init standby script.
Just a pg start backup call followed by a rsync between the master and the
slave
The several tablespaces were synced using a single rsync process with the
–delete option
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 15 / 52
Slow dump
Remote pg dump.
Each cluster was dumped remotely on a separate server using the custom
format.
The backup server had limited memory and cpu
Dump time between 3 hours and 2 days depending on the database size
The BI database was dumped on a daily basis, taking 14/18 hours.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 16 / 52
Table of contents
1 2012 - Who am I? What I’m doing?
2 2013 - On thin ice
3 2014 - The battle of five armies
4 2015 - THIS IS SPARTA!
5 2016 - Breathe
6 Wrap up
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 17 / 52
2013 - On thin ice
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 18 / 52
Parallel rsync
Our DBA took the baby step approach. He started fixing one issue at a time
without affecting ACME’s activity.
The first enhancement was the init backup script.
Two bash arrays listed the origin and destination’s tablespaces
An empty bash array stored the rsync pids
The script started the pg start backup
For each tablespace a rsync process were spawned and the pid was stored in
the third array
A loop checked that the pids were present in the process list
When all the rsync finished pg stop backup were executed
An email to DBA was sent to tell him to start the slave
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 19 / 52
Local archive
The high rate of wal generation required a different archive strategy.
The archive command changed to a local copy
A simple rsync script copied every minute the archives to the slave
The script queried remotely the slave for the last restartpoint
The restartpoint was used by pg archivecleanup on the master
Implementing this solution solved the *.ready files problem but the autovacuum
still caused high lag.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 20 / 52
Autovacuum tune down
DBA investigated the autovacuum issue and finally addressed the cause.
The high lag on the slave was caused when autovacuum (or vacuum) hit a table
concurrently updated. This behaviour is normal and is caused by the standby
code’s design.
With large denormalised tables which are updated constantly the only workaround
possible was to increase autovacuum cost delay with a large value (1 second or
more).
When the autovacuum process reached an arbitrary cost during the execution
there was a 1 minute sleep before the activity resumed.
.
The lag on the standbys disappeared at the cost of longer autovacuum runs.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 21 / 52
In the meanwhile...
The CE decided to shard the business intelligence database using the hot
standby copy
The three new databases initially had the same amount of data which was
slowly cleaned up later
But even with one third of data on each shard, the daily dump was really
slow at the point of overlapping over the 24 hours
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 22 / 52
A slowish dump
pg dump connects to the running cluster like any other backend; it pulls out
data using in the copy format
With the custom format the compression happens on the server where
pg dump runs
The backup server were hammered on the network and the cpu
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 23 / 52
You got speed!
Our DBA wrote a bash script doing the following steps
Dump the database in custom format locally
Generate the file’s md5 checksum
Ship the file on the backup via rsync
Check the remote file’s md5
Send a message to nagios for success or failure
The backup time per each cluster dropped dramatically to just 5 hours including
the copy and the checksum verification.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 24 / 52
Growing pains
Despite the business growth the CE ignored the problems with the poor schema
design.
Speed was achieved by brute force using expensive SSD storage
The amount of data store in the BI db increased
The only accepted solution was to create new shards over and over again
By the end of 2013 the BI databases total size was 15 TB
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 25 / 52
In the meanwhile...
Our DBA upgraded all the PG to the version 9.2 with pg upgrade
THANKS BRUCE!!!!!
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 26 / 52
Table of contents
1 2012 - Who am I? What I’m doing?
2 2013 - On thin ice
3 2014 - The battle of five armies
4 2015 - THIS IS SPARTA!
5 2016 - Breathe
6 Wrap up
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 27 / 52
2014 - The battle of five armies
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 28 / 52
Bloating data
Q1 2014 opened with another backup performance issue
The dump size increased over the time
The database CPU usage increased constantly with no apparent reason
Most of the shards had the tablespace usage at 90%
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 29 / 52
Mostly harmless
Against all odds our DBA addressed the issue.
The table used by the BI database was causing the bloat
The table’s design was technically a materalised view
The table was partitioned in some way
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 30 / 52
Mostly harmless
Against all odds our DBA addressed the issue.
The table used by the BI database was causing the bloat
The table’s design was technically a materalised view
The table was partitioned in some way
The table had an harmless hstore field
Where everybody added new keys just changing the app code
And nobody did housekeeping of their data
The row length jumped from 200 bytes to 1200 bytes in few months
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 30 / 52
Mostly harmless
Against all odds our DBA addressed the issue.
The table used by the BI database was causing the bloat
The table’s design was technically a materalised view
The table was partitioned in some way
The table had an harmless hstore field
Where everybody added new keys just changing the app code
And nobody did housekeeping of their data
The row length jumped from 200 bytes to 1200 bytes in few months
Each BI shard contained up to 2 billion rows...
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 30 / 52
Just a little trick
Despite the impending doom and the CE resistance DBA succeeded in converting
the hstore field to a conventional columnar store (SORRY OLEG!).
The storage usage dropped by 30%
The CPU usage dropped by 60%
The speed of ACME’s product boosted
ACME saved $BIG BUNCH OF MONEY in new HW otherwise required to
shard again the dying databases
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 31 / 52
In the meanwhile...
DBA knew the fix was just a workaround
He asked the CE to help him in the schema redesign
He told them things would be problematic again in just one year
Nobody listened
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 32 / 52
Table of contents
1 2012 - Who am I? What I’m doing?
2 2013 - On thin ice
3 2014 - The battle of five armies
4 2015 - THIS IS SPARTA!
5 2016 - Breathe
6 Wrap up
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 33 / 52
2015 - THIS IS SPARTA!
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 34 / 52
I hate to say that, but I told you so
As predicted by our DBA the time required for backing up the BI databases
increased again, approaching dangerously the 24 hours.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 35 / 52
Parallel is da way!
Back in the 2013 PG 9.3 added the parallel export. But, to DBA great
disappointment, the version 9.3 was initially cursed by some bugs causing data
corruption. DBA could not use the parallel dump.
However...
The parallel backup takes advantage of the snapshot export introduced in the
PG 9.2
The debian packaging allows different PG’s major versions on the same
machine
DBA installed the client 9.3 and used its pg dump to dump the 9.2 in parallel
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 36 / 52
It worked very well...
The wrapper script required some adjustments
Accept the -j parameter
Check if the 9.3+ client is installed
Override the format to directory if the parallel backup is possible
Adapt the checksum procedure to check the files in the dump directory
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 37 / 52
...with just a little infinitesimal catch
All fine right?
Not exactly
The restore test complained about the unknown parameter lock timeout
The backup hit the speed record since 2013
The schema was still the same of 2013
The databases performance were massively affected with 6 parallel jobs
DBA found that with just 4 parallel jobs the databases worked with minimal
disruption
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 38 / 52
In the meanwhile...
Our DBA upgraded PG to the latest version 9.4.
THANK YOU AGAIN BRUCE!!!!!
No more errors for the restore test.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 39 / 52
Table of contents
1 2012 - Who am I? What I’m doing?
2 2013 - On thin ice
3 2014 - The battle of five armies
4 2015 - THIS IS SPARTA!
5 2016 - Breathe
6 Wrap up
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 40 / 52
2016 - Breathe
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 41 / 52
A new hope
The upgrade to PG 9.4 improved the performance issues and DBA had some time
to breath.
The script to ship the archived wal was improved to support multiple slaves
in cascading replica
Each slave had a dedicated rsync process configurable with compression and
protocol (rsync or rsync +ssh)
The script determined automatically the farthest slave querying the remote
controlfiles and cleaned the local archive accordingly
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 42 / 52
A new hope
The init standby script switched to the rsync protocol
The automated restore script used the ALTER SYSTEM added to the PG 9.4
to switch between the restore and production configuration
Therefore the restore time improved to at most 9 hours for the largest BI
database (4.5 TB)
Working with BOFH JR, DBA wrapped the backup script in the
$BACKUP MANAGER pre and post execution hooks
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 43 / 52
The rise of the machines
In the 2016 Q2, finally, DBA completed the configuration for $DEVOP TOOL and
deployed the several scripts to the 17 BI databases with minimal effort.
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 44 / 52
Table of contents
1 2012 - Who am I? What I’m doing?
2 2013 - On thin ice
3 2014 - The battle of five armies
4 2015 - THIS IS SPARTA!
5 2016 - Breathe
6 Wrap up
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 45 / 52
BI database at a glance
Year N. Databases Average size Total size Version
2012 1 2 TB 2 TB 9.1
2013 5 3 TB 15 TB 9.2
2014 9 2.2 TB 19 TB 9.2
2015 13 2.7 TB 32 TB 9.4
2016 16 2.5 TB 40 TB 9.4
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 46 / 52
Few words of wisdom
Reading the products source code is always a good practice.
Bad design can lead to disasters, in particular if the business is successful.
It’s never too early to book the CE to a SQL training course.
“One bad programmer can easily create two new jobs a year.” – David Parnas
If in doubt ask your DBA for advice.
If you don’t have a DBA, get one hired ASAP!
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 47 / 52
Did you say hire?
WE ARE HIRING!
https://transferwise.com/jobs/
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 48 / 52
That’s all folks!
QUESTIONS?
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 49 / 52
Boring legal stuff
LAPD badge - source wikicommons
Montparnasse derailment - source wikipedia
Base jumper - copyright Chris McNaught
Disaster girl - source memegenerator
Blue elephant - source memecenter
Commodore 64 - source memecenter
Deadpool- source memegenerator
Thin ice - source Boating on Lake Winnebago
Boromir - source memegenerator
Sparta birds - source memestorage
Dart Vader - source memegenerator
Angry old man - source memegenerator
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 50 / 52
Contacts and license
Twitter: 4thdoctor scarf
Blog:http://www.pgdba.co.uk
Brighton PostgreSQL Meetup:
http://www.meetup.com/Brighton-PostgreSQL-Meetup/
This document is distributed under the terms of the Creative Commons
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 51 / 52
Life on a rollercoaster
Scaling the PostgreSQL backup and recovery
Federico Campoli
Transferwise
2 November 2016
Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 52 / 52

Más contenido relacionado

La actualidad más candente

Backup recovery with PostgreSQL
Backup recovery with PostgreSQLBackup recovery with PostgreSQL
Backup recovery with PostgreSQLFederico Campoli
 
A couple of things about PostgreSQL...
A couple of things  about PostgreSQL...A couple of things  about PostgreSQL...
A couple of things about PostgreSQL...Federico Campoli
 
Pg chameleon MySQL to PostgreSQL replica
Pg chameleon MySQL to PostgreSQL replicaPg chameleon MySQL to PostgreSQL replica
Pg chameleon MySQL to PostgreSQL replicaFederico Campoli
 
PostgreSql query planning and tuning
PostgreSql query planning and tuningPostgreSql query planning and tuning
PostgreSql query planning and tuningFederico Campoli
 
pg_chameleon a MySQL to PostgreSQL replica
pg_chameleon a MySQL to PostgreSQL replicapg_chameleon a MySQL to PostgreSQL replica
pg_chameleon a MySQL to PostgreSQL replicaFederico Campoli
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQLMark Wong
 
pg_chameleon MySQL to PostgreSQL replica made easy
pg_chameleon  MySQL to PostgreSQL replica made easypg_chameleon  MySQL to PostgreSQL replica made easy
pg_chameleon MySQL to PostgreSQL replica made easyFederico Campoli
 
Using Elasticsearch as the Primary Data Store
Using Elasticsearch as the Primary Data StoreUsing Elasticsearch as the Primary Data Store
Using Elasticsearch as the Primary Data StoreVolkan Yazıcı
 
Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsAlexander Korotkov
 
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff DavisDeep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff DavisCitus Data
 
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...Citus Data
 
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...Citus Data
 
London Spark Meetup Project Tungsten Oct 12 2015
London Spark Meetup Project Tungsten Oct 12 2015London Spark Meetup Project Tungsten Oct 12 2015
London Spark Meetup Project Tungsten Oct 12 2015Chris Fregly
 
Softshake 2013: Introduction to NoSQL with Couchbase
Softshake 2013: Introduction to NoSQL with CouchbaseSoftshake 2013: Introduction to NoSQL with Couchbase
Softshake 2013: Introduction to NoSQL with CouchbaseTugdual Grall
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiDatabricks
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Storesandyseaborne
 
Jonathan Coveney: Why Pig?
Jonathan Coveney: Why Pig?Jonathan Coveney: Why Pig?
Jonathan Coveney: Why Pig?mortardata
 
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseBringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseJimmy Angelakos
 
Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...
Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...
Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...Spark Summit
 

La actualidad más candente (20)

Backup recovery with PostgreSQL
Backup recovery with PostgreSQLBackup recovery with PostgreSQL
Backup recovery with PostgreSQL
 
A couple of things about PostgreSQL...
A couple of things  about PostgreSQL...A couple of things  about PostgreSQL...
A couple of things about PostgreSQL...
 
Pg chameleon MySQL to PostgreSQL replica
Pg chameleon MySQL to PostgreSQL replicaPg chameleon MySQL to PostgreSQL replica
Pg chameleon MySQL to PostgreSQL replica
 
PostgreSql query planning and tuning
PostgreSql query planning and tuningPostgreSql query planning and tuning
PostgreSql query planning and tuning
 
pg_chameleon a MySQL to PostgreSQL replica
pg_chameleon a MySQL to PostgreSQL replicapg_chameleon a MySQL to PostgreSQL replica
pg_chameleon a MySQL to PostgreSQL replica
 
Streaming replication
Streaming replicationStreaming replication
Streaming replication
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
 
pg_chameleon MySQL to PostgreSQL replica made easy
pg_chameleon  MySQL to PostgreSQL replica made easypg_chameleon  MySQL to PostgreSQL replica made easy
pg_chameleon MySQL to PostgreSQL replica made easy
 
Using Elasticsearch as the Primary Data Store
Using Elasticsearch as the Primary Data StoreUsing Elasticsearch as the Primary Data Store
Using Elasticsearch as the Primary Data Store
 
Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problems
 
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff DavisDeep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
 
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
 
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
 
London Spark Meetup Project Tungsten Oct 12 2015
London Spark Meetup Project Tungsten Oct 12 2015London Spark Meetup Project Tungsten Oct 12 2015
London Spark Meetup Project Tungsten Oct 12 2015
 
Softshake 2013: Introduction to NoSQL with Couchbase
Softshake 2013: Introduction to NoSQL with CouchbaseSoftshake 2013: Introduction to NoSQL with Couchbase
Softshake 2013: Introduction to NoSQL with Couchbase
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Stores
 
Jonathan Coveney: Why Pig?
Jonathan Coveney: Why Pig?Jonathan Coveney: Why Pig?
Jonathan Coveney: Why Pig?
 
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseBringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
 
Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...
Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...
Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...
 

Destacado

Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
Modern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesModern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesMarkus Winand
 
Teaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTeaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTomek Borek
 
Managing thousands of databases
Managing thousands of databasesManaging thousands of databases
Managing thousands of databasesEmre Hasegeli
 
PostgreSQL, performance for queries with grouping
PostgreSQL, performance for queries with groupingPostgreSQL, performance for queries with grouping
PostgreSQL, performance for queries with groupingAlexey Bashtanov
 
Desventajas y ventajas tecnológicas
Desventajas y ventajas tecnológicasDesventajas y ventajas tecnológicas
Desventajas y ventajas tecnológicasIanelka18
 
C1657 pf martin_cristina_informe
C1657 pf martin_cristina_informeC1657 pf martin_cristina_informe
C1657 pf martin_cristina_informeusuaria1971
 
Overview-of-History-of-Irish-Animation-Copy
Overview-of-History-of-Irish-Animation-CopyOverview-of-History-of-Irish-Animation-Copy
Overview-of-History-of-Irish-Animation-CopyIseult Travers
 
C1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsC1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsusuaria1971
 
Truong-Nhat-Ha-Duyen
Truong-Nhat-Ha-DuyenTruong-Nhat-Ha-Duyen
Truong-Nhat-Ha-DuyenDuyen Nhat Ha
 
C1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsC1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsusuaria1971
 

Destacado (17)

Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
Modern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesModern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial Databases
 
Industria del papel
Industria del papelIndustria del papel
Industria del papel
 
Teaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTeaching PostgreSQL to new people
Teaching PostgreSQL to new people
 
Managing thousands of databases
Managing thousands of databasesManaging thousands of databases
Managing thousands of databases
 
PostgreSQL, performance for queries with grouping
PostgreSQL, performance for queries with groupingPostgreSQL, performance for queries with grouping
PostgreSQL, performance for queries with grouping
 
Expo
ExpoExpo
Expo
 
Desventajas y ventajas tecnológicas
Desventajas y ventajas tecnológicasDesventajas y ventajas tecnológicas
Desventajas y ventajas tecnológicas
 
NEW CV
NEW CVNEW CV
NEW CV
 
C1657 pf martin_cristina_informe
C1657 pf martin_cristina_informeC1657 pf martin_cristina_informe
C1657 pf martin_cristina_informe
 
Overview-of-History-of-Irish-Animation-Copy
Overview-of-History-of-Irish-Animation-CopyOverview-of-History-of-Irish-Animation-Copy
Overview-of-History-of-Irish-Animation-Copy
 
Maphuti
MaphutiMaphuti
Maphuti
 
C1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsC1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontinguts
 
Truong-Nhat-Ha-Duyen
Truong-Nhat-Ha-DuyenTruong-Nhat-Ha-Duyen
Truong-Nhat-Ha-Duyen
 
Sistemas operativos
Sistemas operativosSistemas operativos
Sistemas operativos
 
C1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsC1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontinguts
 
Maphuti
MaphutiMaphuti
Maphuti
 

Similar a Life on a_rollercoaster

Faster and Smaller qcow2 Files with Subcluster-based Allocation
Faster and Smaller qcow2 Files with Subcluster-based AllocationFaster and Smaller qcow2 Files with Subcluster-based Allocation
Faster and Smaller qcow2 Files with Subcluster-based AllocationIgalia
 
FSLogix BriForum 2015 - Ending the Folder Redirection Debate
FSLogix BriForum 2015 - Ending the Folder Redirection DebateFSLogix BriForum 2015 - Ending the Folder Redirection Debate
FSLogix BriForum 2015 - Ending the Folder Redirection DebateFSLogix
 
Circumnavigating the Antarctic with Python and Django during ACE 2016
Circumnavigating the Antarctic with Python and Django during ACE 2016Circumnavigating the Antarctic with Python and Django during ACE 2016
Circumnavigating the Antarctic with Python and Django during ACE 2016Carles Pina Estany
 
Database Migration Assistant for Unicode (DMU)
Database Migration Assistant for Unicode (DMU)Database Migration Assistant for Unicode (DMU)
Database Migration Assistant for Unicode (DMU)Ludovico Caldara
 
Scale-Out Using Spark in Serverless Herd Mode!
Scale-Out Using Spark in Serverless Herd Mode!Scale-Out Using Spark in Serverless Herd Mode!
Scale-Out Using Spark in Serverless Herd Mode!Databricks
 
Pg nordic-day-2014-2 tb-enough
Pg nordic-day-2014-2 tb-enoughPg nordic-day-2014-2 tb-enough
Pg nordic-day-2014-2 tb-enoughRenaud Bruyeron
 
Storing data in windows server 2012 ss
Storing data in windows server 2012 ssStoring data in windows server 2012 ss
Storing data in windows server 2012 ssKamil Bączyk
 
Architecting for a scalable enterprise - John Davies
Architecting for a scalable enterprise - John DaviesArchitecting for a scalable enterprise - John Davies
Architecting for a scalable enterprise - John DaviesJAXLondon_Conference
 
Hoodie: Incremental processing on hadoop
Hoodie: Incremental processing on hadoopHoodie: Incremental processing on hadoop
Hoodie: Incremental processing on hadoopPrasanna Rajaperumal
 
AWS Customer Highlight - Craftsy
AWS Customer Highlight - CraftsyAWS Customer Highlight - Craftsy
AWS Customer Highlight - CraftsyAmazon Web Services
 
Spanner : Google' s Globally Distributed Database
Spanner : Google' s Globally Distributed DatabaseSpanner : Google' s Globally Distributed Database
Spanner : Google' s Globally Distributed DatabaseAhmedmchayaa
 
PGDAY FR 2014 : presentation de Postgresql chez leboncoin.fr
PGDAY FR 2014 : presentation de Postgresql chez leboncoin.frPGDAY FR 2014 : presentation de Postgresql chez leboncoin.fr
PGDAY FR 2014 : presentation de Postgresql chez leboncoin.frjlb666
 
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...OSDC 2018 | The Computer science behind a modern distributed data store by Ma...
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...NETWAYS
 
NHK Challenges for Preserving UHD Materials (HIRAKAZU)
NHK Challenges for Preserving UHD Materials (HIRAKAZU)NHK Challenges for Preserving UHD Materials (HIRAKAZU)
NHK Challenges for Preserving UHD Materials (HIRAKAZU)FIAT/IFTA
 
Castle enhanced Cassandra
Castle enhanced CassandraCastle enhanced Cassandra
Castle enhanced CassandraEric Evans
 
Database Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceDatabase Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceEdwin M Sarmiento
 
Pilot Hadoop Towards 2500 Nodes and Cluster Redundancy
Pilot Hadoop Towards 2500 Nodes and Cluster RedundancyPilot Hadoop Towards 2500 Nodes and Cluster Redundancy
Pilot Hadoop Towards 2500 Nodes and Cluster RedundancyStuart Pook
 
Spark Pipelines in the Cloud with Alluxio with Gene Pang
Spark Pipelines in the Cloud with Alluxio with Gene PangSpark Pipelines in the Cloud with Alluxio with Gene Pang
Spark Pipelines in the Cloud with Alluxio with Gene PangSpark Summit
 

Similar a Life on a_rollercoaster (20)

Faster and Smaller qcow2 Files with Subcluster-based Allocation
Faster and Smaller qcow2 Files with Subcluster-based AllocationFaster and Smaller qcow2 Files with Subcluster-based Allocation
Faster and Smaller qcow2 Files with Subcluster-based Allocation
 
FSLogix BriForum 2015 - Ending the Folder Redirection Debate
FSLogix BriForum 2015 - Ending the Folder Redirection DebateFSLogix BriForum 2015 - Ending the Folder Redirection Debate
FSLogix BriForum 2015 - Ending the Folder Redirection Debate
 
Circumnavigating the Antarctic with Python and Django during ACE 2016
Circumnavigating the Antarctic with Python and Django during ACE 2016Circumnavigating the Antarctic with Python and Django during ACE 2016
Circumnavigating the Antarctic with Python and Django during ACE 2016
 
Super hybrid2016 tdc
Super hybrid2016 tdcSuper hybrid2016 tdc
Super hybrid2016 tdc
 
Database Migration Assistant for Unicode (DMU)
Database Migration Assistant for Unicode (DMU)Database Migration Assistant for Unicode (DMU)
Database Migration Assistant for Unicode (DMU)
 
Scale-Out Using Spark in Serverless Herd Mode!
Scale-Out Using Spark in Serverless Herd Mode!Scale-Out Using Spark in Serverless Herd Mode!
Scale-Out Using Spark in Serverless Herd Mode!
 
Pg nordic-day-2014-2 tb-enough
Pg nordic-day-2014-2 tb-enoughPg nordic-day-2014-2 tb-enough
Pg nordic-day-2014-2 tb-enough
 
Storing data in windows server 2012 ss
Storing data in windows server 2012 ssStoring data in windows server 2012 ss
Storing data in windows server 2012 ss
 
Architecting for a scalable enterprise - John Davies
Architecting for a scalable enterprise - John DaviesArchitecting for a scalable enterprise - John Davies
Architecting for a scalable enterprise - John Davies
 
Hoodie: Incremental processing on hadoop
Hoodie: Incremental processing on hadoopHoodie: Incremental processing on hadoop
Hoodie: Incremental processing on hadoop
 
AWS Customer Highlight - Craftsy
AWS Customer Highlight - CraftsyAWS Customer Highlight - Craftsy
AWS Customer Highlight - Craftsy
 
Spanner : Google' s Globally Distributed Database
Spanner : Google' s Globally Distributed DatabaseSpanner : Google' s Globally Distributed Database
Spanner : Google' s Globally Distributed Database
 
PGDAY FR 2014 : presentation de Postgresql chez leboncoin.fr
PGDAY FR 2014 : presentation de Postgresql chez leboncoin.frPGDAY FR 2014 : presentation de Postgresql chez leboncoin.fr
PGDAY FR 2014 : presentation de Postgresql chez leboncoin.fr
 
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...OSDC 2018 | The Computer science behind a modern distributed data store by Ma...
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...
 
Customer Highlight: Craftsy
Customer Highlight: CraftsyCustomer Highlight: Craftsy
Customer Highlight: Craftsy
 
NHK Challenges for Preserving UHD Materials (HIRAKAZU)
NHK Challenges for Preserving UHD Materials (HIRAKAZU)NHK Challenges for Preserving UHD Materials (HIRAKAZU)
NHK Challenges for Preserving UHD Materials (HIRAKAZU)
 
Castle enhanced Cassandra
Castle enhanced CassandraCastle enhanced Cassandra
Castle enhanced Cassandra
 
Database Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceDatabase Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 Performance
 
Pilot Hadoop Towards 2500 Nodes and Cluster Redundancy
Pilot Hadoop Towards 2500 Nodes and Cluster RedundancyPilot Hadoop Towards 2500 Nodes and Cluster Redundancy
Pilot Hadoop Towards 2500 Nodes and Cluster Redundancy
 
Spark Pipelines in the Cloud with Alluxio with Gene Pang
Spark Pipelines in the Cloud with Alluxio with Gene PangSpark Pipelines in the Cloud with Alluxio with Gene Pang
Spark Pipelines in the Cloud with Alluxio with Gene Pang
 

Último

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 

Último (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
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!
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 

Life on a_rollercoaster

  • 1. Life on a rollercoaster Scaling the PostgreSQL backup and recovery Federico Campoli Transferwise 2 November 2016 Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 1 / 52
  • 2. Table of contents 1 2012 - Who am I? What I’m doing? 2 2013 - On thin ice 3 2014 - The battle of five armies 4 2015 - THIS IS SPARTA! 5 2016 - Breathe 6 Wrap up Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 2 / 52
  • 3. Warning! The story you are about to hear is true. Only the names have been changed to protect the innocent. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 3 / 52
  • 4. Dramatis personae A brilliant startup ACME Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 4 / 52
  • 5. Dramatis personae The clueless engineers CE Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 5 / 52
  • 6. Dramatis personae An elephant on steroids PG Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 6 / 52
  • 7. Dramatis personae The big cheese HW Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 7 / 52
  • 8. Dramatis personae The real hero DBA Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 8 / 52
  • 9. In the beginning Our story starts in the year 2012. The world was young and our DBA started a new brilliant career in ACME. After the usual time required by the onboarding, to our DBA were handed the production’s servers. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 9 / 52
  • 10. Table of contents 1 2012 - Who am I? What I’m doing? 2 2013 - On thin ice 3 2014 - The battle of five armies 4 2015 - THIS IS SPARTA! 5 2016 - Breathe 6 Wrap up Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 10 / 52
  • 11. 2012 - Who am I? What I’m doing? Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 11 / 52
  • 12. Size does matter PG, our powerful and friendly elephant was used for storing the data in a multi shard configuration. Not really big actually but very troubled indeed! A small logger database - 50 GB A larger configuration and auth datababase - 200 GB Two archive db - 4 TB each One db for the business intelligence - 2 TB Each db had an hot standby counterpart hosted on less powerful HW. Our story tells the life of the BI database. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 12 / 52
  • 13. The carnival of monsters In the early 2013 our brave DBA addressed the several problems found on the current backup and recovery configuration. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 13 / 52
  • 14. Lagging standby Suboptimal schema. Churn on large tables and high wal generation rate The slave lagged just because there was autovacuum running rsync used in archive command. The wal were archived over the network using rsync+ssh The *.ready files in the pg xlog increased the risk of the cluster’s crash. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 14 / 52
  • 15. Base backup Rudimentary init standby script. Just a pg start backup call followed by a rsync between the master and the slave The several tablespaces were synced using a single rsync process with the –delete option Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 15 / 52
  • 16. Slow dump Remote pg dump. Each cluster was dumped remotely on a separate server using the custom format. The backup server had limited memory and cpu Dump time between 3 hours and 2 days depending on the database size The BI database was dumped on a daily basis, taking 14/18 hours. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 16 / 52
  • 17. Table of contents 1 2012 - Who am I? What I’m doing? 2 2013 - On thin ice 3 2014 - The battle of five armies 4 2015 - THIS IS SPARTA! 5 2016 - Breathe 6 Wrap up Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 17 / 52
  • 18. 2013 - On thin ice Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 18 / 52
  • 19. Parallel rsync Our DBA took the baby step approach. He started fixing one issue at a time without affecting ACME’s activity. The first enhancement was the init backup script. Two bash arrays listed the origin and destination’s tablespaces An empty bash array stored the rsync pids The script started the pg start backup For each tablespace a rsync process were spawned and the pid was stored in the third array A loop checked that the pids were present in the process list When all the rsync finished pg stop backup were executed An email to DBA was sent to tell him to start the slave Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 19 / 52
  • 20. Local archive The high rate of wal generation required a different archive strategy. The archive command changed to a local copy A simple rsync script copied every minute the archives to the slave The script queried remotely the slave for the last restartpoint The restartpoint was used by pg archivecleanup on the master Implementing this solution solved the *.ready files problem but the autovacuum still caused high lag. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 20 / 52
  • 21. Autovacuum tune down DBA investigated the autovacuum issue and finally addressed the cause. The high lag on the slave was caused when autovacuum (or vacuum) hit a table concurrently updated. This behaviour is normal and is caused by the standby code’s design. With large denormalised tables which are updated constantly the only workaround possible was to increase autovacuum cost delay with a large value (1 second or more). When the autovacuum process reached an arbitrary cost during the execution there was a 1 minute sleep before the activity resumed. . The lag on the standbys disappeared at the cost of longer autovacuum runs. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 21 / 52
  • 22. In the meanwhile... The CE decided to shard the business intelligence database using the hot standby copy The three new databases initially had the same amount of data which was slowly cleaned up later But even with one third of data on each shard, the daily dump was really slow at the point of overlapping over the 24 hours Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 22 / 52
  • 23. A slowish dump pg dump connects to the running cluster like any other backend; it pulls out data using in the copy format With the custom format the compression happens on the server where pg dump runs The backup server were hammered on the network and the cpu Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 23 / 52
  • 24. You got speed! Our DBA wrote a bash script doing the following steps Dump the database in custom format locally Generate the file’s md5 checksum Ship the file on the backup via rsync Check the remote file’s md5 Send a message to nagios for success or failure The backup time per each cluster dropped dramatically to just 5 hours including the copy and the checksum verification. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 24 / 52
  • 25. Growing pains Despite the business growth the CE ignored the problems with the poor schema design. Speed was achieved by brute force using expensive SSD storage The amount of data store in the BI db increased The only accepted solution was to create new shards over and over again By the end of 2013 the BI databases total size was 15 TB Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 25 / 52
  • 26. In the meanwhile... Our DBA upgraded all the PG to the version 9.2 with pg upgrade THANKS BRUCE!!!!! Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 26 / 52
  • 27. Table of contents 1 2012 - Who am I? What I’m doing? 2 2013 - On thin ice 3 2014 - The battle of five armies 4 2015 - THIS IS SPARTA! 5 2016 - Breathe 6 Wrap up Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 27 / 52
  • 28. 2014 - The battle of five armies Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 28 / 52
  • 29. Bloating data Q1 2014 opened with another backup performance issue The dump size increased over the time The database CPU usage increased constantly with no apparent reason Most of the shards had the tablespace usage at 90% Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 29 / 52
  • 30. Mostly harmless Against all odds our DBA addressed the issue. The table used by the BI database was causing the bloat The table’s design was technically a materalised view The table was partitioned in some way Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 30 / 52
  • 31. Mostly harmless Against all odds our DBA addressed the issue. The table used by the BI database was causing the bloat The table’s design was technically a materalised view The table was partitioned in some way The table had an harmless hstore field Where everybody added new keys just changing the app code And nobody did housekeeping of their data The row length jumped from 200 bytes to 1200 bytes in few months Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 30 / 52
  • 32. Mostly harmless Against all odds our DBA addressed the issue. The table used by the BI database was causing the bloat The table’s design was technically a materalised view The table was partitioned in some way The table had an harmless hstore field Where everybody added new keys just changing the app code And nobody did housekeeping of their data The row length jumped from 200 bytes to 1200 bytes in few months Each BI shard contained up to 2 billion rows... Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 30 / 52
  • 33. Just a little trick Despite the impending doom and the CE resistance DBA succeeded in converting the hstore field to a conventional columnar store (SORRY OLEG!). The storage usage dropped by 30% The CPU usage dropped by 60% The speed of ACME’s product boosted ACME saved $BIG BUNCH OF MONEY in new HW otherwise required to shard again the dying databases Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 31 / 52
  • 34. In the meanwhile... DBA knew the fix was just a workaround He asked the CE to help him in the schema redesign He told them things would be problematic again in just one year Nobody listened Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 32 / 52
  • 35. Table of contents 1 2012 - Who am I? What I’m doing? 2 2013 - On thin ice 3 2014 - The battle of five armies 4 2015 - THIS IS SPARTA! 5 2016 - Breathe 6 Wrap up Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 33 / 52
  • 36. 2015 - THIS IS SPARTA! Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 34 / 52
  • 37. I hate to say that, but I told you so As predicted by our DBA the time required for backing up the BI databases increased again, approaching dangerously the 24 hours. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 35 / 52
  • 38. Parallel is da way! Back in the 2013 PG 9.3 added the parallel export. But, to DBA great disappointment, the version 9.3 was initially cursed by some bugs causing data corruption. DBA could not use the parallel dump. However... The parallel backup takes advantage of the snapshot export introduced in the PG 9.2 The debian packaging allows different PG’s major versions on the same machine DBA installed the client 9.3 and used its pg dump to dump the 9.2 in parallel Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 36 / 52
  • 39. It worked very well... The wrapper script required some adjustments Accept the -j parameter Check if the 9.3+ client is installed Override the format to directory if the parallel backup is possible Adapt the checksum procedure to check the files in the dump directory Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 37 / 52
  • 40. ...with just a little infinitesimal catch All fine right? Not exactly The restore test complained about the unknown parameter lock timeout The backup hit the speed record since 2013 The schema was still the same of 2013 The databases performance were massively affected with 6 parallel jobs DBA found that with just 4 parallel jobs the databases worked with minimal disruption Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 38 / 52
  • 41. In the meanwhile... Our DBA upgraded PG to the latest version 9.4. THANK YOU AGAIN BRUCE!!!!! No more errors for the restore test. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 39 / 52
  • 42. Table of contents 1 2012 - Who am I? What I’m doing? 2 2013 - On thin ice 3 2014 - The battle of five armies 4 2015 - THIS IS SPARTA! 5 2016 - Breathe 6 Wrap up Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 40 / 52
  • 43. 2016 - Breathe Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 41 / 52
  • 44. A new hope The upgrade to PG 9.4 improved the performance issues and DBA had some time to breath. The script to ship the archived wal was improved to support multiple slaves in cascading replica Each slave had a dedicated rsync process configurable with compression and protocol (rsync or rsync +ssh) The script determined automatically the farthest slave querying the remote controlfiles and cleaned the local archive accordingly Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 42 / 52
  • 45. A new hope The init standby script switched to the rsync protocol The automated restore script used the ALTER SYSTEM added to the PG 9.4 to switch between the restore and production configuration Therefore the restore time improved to at most 9 hours for the largest BI database (4.5 TB) Working with BOFH JR, DBA wrapped the backup script in the $BACKUP MANAGER pre and post execution hooks Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 43 / 52
  • 46. The rise of the machines In the 2016 Q2, finally, DBA completed the configuration for $DEVOP TOOL and deployed the several scripts to the 17 BI databases with minimal effort. Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 44 / 52
  • 47. Table of contents 1 2012 - Who am I? What I’m doing? 2 2013 - On thin ice 3 2014 - The battle of five armies 4 2015 - THIS IS SPARTA! 5 2016 - Breathe 6 Wrap up Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 45 / 52
  • 48. BI database at a glance Year N. Databases Average size Total size Version 2012 1 2 TB 2 TB 9.1 2013 5 3 TB 15 TB 9.2 2014 9 2.2 TB 19 TB 9.2 2015 13 2.7 TB 32 TB 9.4 2016 16 2.5 TB 40 TB 9.4 Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 46 / 52
  • 49. Few words of wisdom Reading the products source code is always a good practice. Bad design can lead to disasters, in particular if the business is successful. It’s never too early to book the CE to a SQL training course. “One bad programmer can easily create two new jobs a year.” – David Parnas If in doubt ask your DBA for advice. If you don’t have a DBA, get one hired ASAP! Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 47 / 52
  • 50. Did you say hire? WE ARE HIRING! https://transferwise.com/jobs/ Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 48 / 52
  • 51. That’s all folks! QUESTIONS? Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 49 / 52
  • 52. Boring legal stuff LAPD badge - source wikicommons Montparnasse derailment - source wikipedia Base jumper - copyright Chris McNaught Disaster girl - source memegenerator Blue elephant - source memecenter Commodore 64 - source memecenter Deadpool- source memegenerator Thin ice - source Boating on Lake Winnebago Boromir - source memegenerator Sparta birds - source memestorage Dart Vader - source memegenerator Angry old man - source memegenerator Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 50 / 52
  • 53. Contacts and license Twitter: 4thdoctor scarf Blog:http://www.pgdba.co.uk Brighton PostgreSQL Meetup: http://www.meetup.com/Brighton-PostgreSQL-Meetup/ This document is distributed under the terms of the Creative Commons Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 51 / 52
  • 54. Life on a rollercoaster Scaling the PostgreSQL backup and recovery Federico Campoli Transferwise 2 November 2016 Federico Campoli (Transferwise) Life on a rollercoaster 2 November 2016 52 / 52