SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
PostgreSQL Write-Ahead Log
                                     Heikki Linnakangas




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 1
What is Write-Ahead Log?

        • Also known as the transaction log or redo log
        • Practically every database management system
          has one
        • Also used by journaling file systems, transaction
          managers etc.




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 2
Write-Ahead Log concepts

        • A transaction log is a sequence of log records
        • One log record for every change
        • Each WAL record is assigned an LSN (Log
          Sequence Number)




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 3
PostgreSQL Write-Ahead-Log

        • Introduced in version 7.1 by Vadim B. Mikheev
               – Released in 2001


        • REDO log only
               – No UNDO log
               – Instantaneous rollbacks
               – No limit on transaction size




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 4
PostgreSQL Example

        INSERT INTO tbl (id, data) VALUES (123, 'foo')

        @ 0/D023940: xid 734: Heap - insert: rel
        1663/12040/16402; tid 0/2
        @ 0/D023988: xid 734: Btree - insert: rel
        1663/12040/16404; tid 1/2
        @ 0/D0239D0: xid 734: Transaction - commit:
        2012-03-30 19:08:10.262228+03

        LOG: xlog flush request 0/D023A00



pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 5
PostgreSQL WAL structure

        • WAL is divided into WAL segments
               – Each segment is a file in pg_xlog directory

        $ ls ­l pgsql/data/pg_xlog/
        ­rw­­­­­­­ 1 heikki heikki      239 2009­11­03 10:39 
        000000010000000000000034.00000020.backup
        ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 15:26 00000001000000000000003A
        ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 15:26 00000001000000000000003B
        ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 10:39 00000001000000000000003C
        ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 13:49 00000001000000000000003D
        ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 15:14 00000001000000000000003E
        drwx­­­­­­ 2 heikki heikki      160 2009­11­03 15:26 archive_status




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 6
Tools

        • Developer tools
               – WAL_DEBUG compile option
               – Xlogdump http://xlogviewer.projects.postgresql.org/




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 7
WAL-first rule

        • The log record for an operation is always written
          to disk before the affected data pages
               – WAL first rule!


        • In case of a crash, the WAL is replayed to
          reconstruct the unsaved changes




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 8
Checkpoints

        • WAL grows indefinitely
        • Checkpoints allow us to truncate it

        1. Flush all data pages to disk
        2. Write a checkpoint record
        3. Truncate away old WAL




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 9
WAL filenames



              00000001000000000000003E
                                             Log id                 Seg no
                        TLI                                 LSN

        • Timeline ID is used to distinguish WAL generated
          before and after a PITR recovery




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 10
Crash-safety

        • Many database actions involve modifying more
          than one page.
           – Example: Splitting an index page.
        • Writing two data pages A and B is not atomic.
        • One write must happen before the other.
           – We need to give the operating system and disk
             controller freedom to reorder the writes; we
             don't even know which one will happen first.
        • We could crash in between.




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 11
WAL Summary

        Write-Ahead Logging is critical for:

        • Durability
               – Once you commit, your data is safe
        • Consistency
               – No corruption on crash




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 12
Advanced features

        But there's more!

        The Write-Ahead Log also allows:

        • Online backup
        • Point-in-time Recovery
        • Replication




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 13
WAL Archiving

        • Normally, old WAL is deleted at a checkpoint.
        • But it can also be archived

        • Archive can be anything
               – Directory on another server
               – Tape drive




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 14
WAL Archiving

        In your postgresql.conf file:

        archive_mode=on
        wal_level=archive
        archive_command = 'cp %p /mnt/walarchive/%f'

        Restart server, and it will copy all WAL files to
        /mnt/walarchive as they're generated




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 15
WAL archive

        ~$ ls -l /mnt/walarchive/
        yhteensä 114688
        -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000001
        -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000002
        -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000003
        -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000004
        -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000005
        -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000006
        -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000007




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 16
Online Backup

        • Normally, you need to shut down the database
          while you take a backup
               – or use a filesystem snapshot (e.g ZFS or a SAN)


        • WAL archiving makes that unnecessary




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 17
Online Backup

        1. SELECT pg_start_backup()
        2. rsync / tar / whatever
        3. SELECT pg_stop_backup();
        4. Include all archived WAL files from archive
           directory in the backup




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 18
Online backup: Step 1

        /mnt$ ls ­l
        yhteensä 8
        drwxr­xr­x  2 heikki heikki 4096 30.3. 18:11 archivedir
        drwx­­­­­­ 14 heikki heikki 4096 30.3. 18:10 data


        /mnt$ psql ­c "SELECT pg_start_backup('my first backup')"
         pg_start_backup 
        ­­­­­­­­­­­­­­­­­
         0/C000020
        (1 row)




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 19
Online backup: Step 2

        /mnt$ tar czf ~/backup.tar.gz data
        /mnt$ ls -l ~/backup.tar.gz
        -rw-r--r-- 1 heikki heikki 39670143 30.3. 18:33
        /home/heikki/backup.tar.gz




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 20
Online backup: Step 3

        /mnt$ psql -c "SELECT pg_stop_backup()"
        NOTICE: pg_stop_backup complete, all required
        WAL segments have been archived
         pg_stop_backup
        ----------------
         0/C0000A8
        (1 row)




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 21
Online backup: Step 4

        /mnt$ tar czf ~/backup-xlog.tar.gz archivedir/*

        /mnt$ ls -l /home/heikki/backup*.tar.gz
        -rw-r--r-- 1 heikki heikki 39670143 30.3. 18:33
        /home/heikki/backup.tar.gz
        -rw-r--r-- 1 heikki heikki 41937910 30.3. 18:38
        /home/heikki/backup-xlog.tar.gz




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 22
Point-in-Time Recovery

        postgres=# DROP TABLE customers;
        DROP TABLE

        Oops!

        • Once you've enabled WAL archiving and taken a
          backup, you can use the archived WAL to restore
          to any point in time




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 23
Point-in-Time Recovery

        Recovery.conf:

        # By default, recovery will rollforward to the end of the WAL log.
        # If you want to stop rollforward at a specific point, you
        # must set a recovery target.
        ...
        #recovery_target_name = ''         # e.g. 'daily backup 2011-01-26'
        #
        #recovery_target_time = '' # e.g. '2004-07-14 22:39:00 EST'
        #
        #recovery_target_xid = ''
        #
        #recovery_target_inclusive = true



pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 24
Replication

        • You can transmit WAL as it is generated to a
          standby server
               – Replication!
        • This can be done using the WAL archive, or by
          streaming directly from the server over a TCP
          connection
        • Standby server can be used for read-only queries
          (Hot Standby)




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 25
Thank you

        Write-Ahead Logging makes it possible for a
        database to maintain consistency. It also allows
        many advanced features: online backup, PITR and
        replication

        Questions?




pyright 2009 EnterpriseDB Corporation. All rights Reserved.
                                                      <presentation title goes here, edit in the slide master >   Slide: 26

Weitere ähnliche Inhalte

Was ist angesagt?

Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogicalUmair Shahid
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015PostgreSQL-Consulting
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Denish Patel
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practiceAlexey Lesovsky
 
Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2 Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2 Denish Patel
 
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...Equnix Business Solutions
 
12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All EditionsFranck Pachot
 
Streaming replication in PostgreSQL
Streaming replication in PostgreSQLStreaming replication in PostgreSQL
Streaming replication in PostgreSQLAshnikbiz
 
Managing terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigManaging terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigSelena Deckelmann
 
Building Spark as Service in Cloud
Building Spark as Service in CloudBuilding Spark as Service in Cloud
Building Spark as Service in CloudInMobi Technology
 
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaAutovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaPostgreSQL-Consulting
 
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
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on awsEmanuel Calvo
 
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedPGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedEqunix Business Solutions
 
Linux internals for Database administrators at Linux Piter 2016
Linux internals for Database administrators at Linux Piter 2016Linux internals for Database administrators at Linux Piter 2016
Linux internals for Database administrators at Linux Piter 2016PostgreSQL-Consulting
 
Tuning Linux for Databases.
Tuning Linux for Databases.Tuning Linux for Databases.
Tuning Linux for Databases.Alexey Lesovsky
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesInMobi Technology
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
Dbvisit replicate: logical replication made easy
Dbvisit replicate: logical replication made easyDbvisit replicate: logical replication made easy
Dbvisit replicate: logical replication made easyFranck Pachot
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesDeiby Gómez
 

Was ist angesagt? (20)

Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
 
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
 
Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2 Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2
 
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
 
12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions
 
Streaming replication in PostgreSQL
Streaming replication in PostgreSQLStreaming replication in PostgreSQL
Streaming replication in PostgreSQL
 
Managing terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigManaging terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets big
 
Building Spark as Service in Cloud
Building Spark as Service in CloudBuilding Spark as Service in Cloud
Building Spark as Service in Cloud
 
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 ViennaAutovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
Autovacuum, explained for engineers, new improved version PGConf.eu 2015 Vienna
 
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...
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on aws
 
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedPGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
 
Linux internals for Database administrators at Linux Piter 2016
Linux internals for Database administrators at Linux Piter 2016Linux internals for Database administrators at Linux Piter 2016
Linux internals for Database administrators at Linux Piter 2016
 
Tuning Linux for Databases.
Tuning Linux for Databases.Tuning Linux for Databases.
Tuning Linux for Databases.
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major Features
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
Dbvisit replicate: logical replication made easy
Dbvisit replicate: logical replication made easyDbvisit replicate: logical replication made easy
Dbvisit replicate: logical replication made easy
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New Features
 

Ähnlich wie PostgreSQL Write-Ahead Log (Heikki Linnakangas)

Replication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionReplication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionBen Mildren
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) Frazer Clement
 
MySQL Binary Log API Presentation - OSCON 2011
MySQL Binary Log API Presentation - OSCON 2011MySQL Binary Log API Presentation - OSCON 2011
MySQL Binary Log API Presentation - OSCON 2011Mats Kindahl
 
2012 replication
2012 replication2012 replication
2012 replicationsqlhjalp
 
DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4Pranav Prakash
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia DatabasesJaime Crespo
 
Data guard &amp; nologging new features in 18c
Data guard &amp; nologging   new features in 18cData guard &amp; nologging   new features in 18c
Data guard &amp; nologging new features in 18cUwe Hesse
 
Lockless in Seattle - Using In-Memory OLTP for Transaction Processing
Lockless in Seattle -  Using In-Memory OLTP for Transaction ProcessingLockless in Seattle -  Using In-Memory OLTP for Transaction Processing
Lockless in Seattle - Using In-Memory OLTP for Transaction ProcessingMark Broadbent
 
2012 scale replication
2012 scale replication2012 scale replication
2012 scale replicationsqlhjalp
 
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...VirtualTech Japan Inc.
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesSven Sandberg
 
Using The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamUsing The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamLuís Soares
 
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』Insight Technology, Inc.
 
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...Continuent
 
ibbackup vs mysqldump对比测试 - 20080718
ibbackup vs mysqldump对比测试 - 20080718ibbackup vs mysqldump对比测试 - 20080718
ibbackup vs mysqldump对比测试 - 20080718Jinrong Ye
 
Become a MySQL DBA - slides: Deciding on a relevant backup solution
Become a MySQL DBA - slides: Deciding on a relevant backup solutionBecome a MySQL DBA - slides: Deciding on a relevant backup solution
Become a MySQL DBA - slides: Deciding on a relevant backup solutionSeveralnines
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - SlidesSeveralnines
 
Solaris 11 Consolidation Tools
Solaris 11 Consolidation ToolsSolaris 11 Consolidation Tools
Solaris 11 Consolidation ToolsRoman Ivanov
 

Ähnlich wie PostgreSQL Write-Ahead Log (Heikki Linnakangas) (20)

Replication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionReplication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party Extinction
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014)
 
MySQL Binary Log API Presentation - OSCON 2011
MySQL Binary Log API Presentation - OSCON 2011MySQL Binary Log API Presentation - OSCON 2011
MySQL Binary Log API Presentation - OSCON 2011
 
2012 replication
2012 replication2012 replication
2012 replication
 
DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4DB2UDB_the_Basics Day 4
DB2UDB_the_Basics Day 4
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
 
Data guard &amp; nologging new features in 18c
Data guard &amp; nologging   new features in 18cData guard &amp; nologging   new features in 18c
Data guard &amp; nologging new features in 18c
 
Lockless in Seattle - Using In-Memory OLTP for Transaction Processing
Lockless in Seattle -  Using In-Memory OLTP for Transaction ProcessingLockless in Seattle -  Using In-Memory OLTP for Transaction Processing
Lockless in Seattle - Using In-Memory OLTP for Transaction Processing
 
2012 scale replication
2012 scale replication2012 scale replication
2012 scale replication
 
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
 
Using The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change StreamUsing The Mysql Binary Log As A Change Stream
Using The Mysql Binary Log As A Change Stream
 
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
 
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
Tungsten Use Case: How Gittigidiyor (a subsidiary of eBay) Replicates Data In...
 
ibbackup vs mysqldump对比测试 - 20080718
ibbackup vs mysqldump对比测试 - 20080718ibbackup vs mysqldump对比测试 - 20080718
ibbackup vs mysqldump对比测试 - 20080718
 
PostgreSQL replication
PostgreSQL replicationPostgreSQL replication
PostgreSQL replication
 
Become a MySQL DBA - slides: Deciding on a relevant backup solution
Become a MySQL DBA - slides: Deciding on a relevant backup solutionBecome a MySQL DBA - slides: Deciding on a relevant backup solution
Become a MySQL DBA - slides: Deciding on a relevant backup solution
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
 
Solaris 11 Consolidation Tools
Solaris 11 Consolidation ToolsSolaris 11 Consolidation Tools
Solaris 11 Consolidation Tools
 

Mehr von Ontico

One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...Ontico
 
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)Ontico
 
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)Ontico
 
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Ontico
 
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...Ontico
 
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)Ontico
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Ontico
 
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...Ontico
 
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)Ontico
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)Ontico
 
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...Ontico
 
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...Ontico
 
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...Ontico
 
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)Ontico
 
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)Ontico
 
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)Ontico
 
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)Ontico
 
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...Ontico
 
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...Ontico
 
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...Ontico
 

Mehr von Ontico (20)

One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
 
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
 
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
 
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
 
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
 
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
 
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
 
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
 
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
 
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
 
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
 
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
 
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
 
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
 
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
 
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
 
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
 
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
 

Kürzlich hochgeladen

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

PostgreSQL Write-Ahead Log (Heikki Linnakangas)

  • 1. PostgreSQL Write-Ahead Log Heikki Linnakangas pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 1
  • 2. What is Write-Ahead Log? • Also known as the transaction log or redo log • Practically every database management system has one • Also used by journaling file systems, transaction managers etc. pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 2
  • 3. Write-Ahead Log concepts • A transaction log is a sequence of log records • One log record for every change • Each WAL record is assigned an LSN (Log Sequence Number) pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 3
  • 4. PostgreSQL Write-Ahead-Log • Introduced in version 7.1 by Vadim B. Mikheev – Released in 2001 • REDO log only – No UNDO log – Instantaneous rollbacks – No limit on transaction size pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 4
  • 5. PostgreSQL Example INSERT INTO tbl (id, data) VALUES (123, 'foo') @ 0/D023940: xid 734: Heap - insert: rel 1663/12040/16402; tid 0/2 @ 0/D023988: xid 734: Btree - insert: rel 1663/12040/16404; tid 1/2 @ 0/D0239D0: xid 734: Transaction - commit: 2012-03-30 19:08:10.262228+03 LOG: xlog flush request 0/D023A00 pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 5
  • 6. PostgreSQL WAL structure • WAL is divided into WAL segments – Each segment is a file in pg_xlog directory $ ls ­l pgsql/data/pg_xlog/ ­rw­­­­­­­ 1 heikki heikki      239 2009­11­03 10:39  000000010000000000000034.00000020.backup ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 15:26 00000001000000000000003A ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 15:26 00000001000000000000003B ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 10:39 00000001000000000000003C ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 13:49 00000001000000000000003D ­rw­­­­­­­ 1 heikki heikki 16777216 2009­11­03 15:14 00000001000000000000003E drwx­­­­­­ 2 heikki heikki      160 2009­11­03 15:26 archive_status pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 6
  • 7. Tools • Developer tools – WAL_DEBUG compile option – Xlogdump http://xlogviewer.projects.postgresql.org/ pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 7
  • 8. WAL-first rule • The log record for an operation is always written to disk before the affected data pages – WAL first rule! • In case of a crash, the WAL is replayed to reconstruct the unsaved changes pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 8
  • 9. Checkpoints • WAL grows indefinitely • Checkpoints allow us to truncate it 1. Flush all data pages to disk 2. Write a checkpoint record 3. Truncate away old WAL pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 9
  • 10. WAL filenames 00000001000000000000003E Log id Seg no TLI LSN • Timeline ID is used to distinguish WAL generated before and after a PITR recovery pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 10
  • 11. Crash-safety • Many database actions involve modifying more than one page. – Example: Splitting an index page. • Writing two data pages A and B is not atomic. • One write must happen before the other. – We need to give the operating system and disk controller freedom to reorder the writes; we don't even know which one will happen first. • We could crash in between. pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 11
  • 12. WAL Summary Write-Ahead Logging is critical for: • Durability – Once you commit, your data is safe • Consistency – No corruption on crash pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 12
  • 13. Advanced features But there's more! The Write-Ahead Log also allows: • Online backup • Point-in-time Recovery • Replication pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 13
  • 14. WAL Archiving • Normally, old WAL is deleted at a checkpoint. • But it can also be archived • Archive can be anything – Directory on another server – Tape drive pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 14
  • 15. WAL Archiving In your postgresql.conf file: archive_mode=on wal_level=archive archive_command = 'cp %p /mnt/walarchive/%f' Restart server, and it will copy all WAL files to /mnt/walarchive as they're generated pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 15
  • 16. WAL archive ~$ ls -l /mnt/walarchive/ yhteensä 114688 -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000001 -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000002 -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000003 -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000004 -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000005 -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000006 -rw------- 1 heikki heikki 16777216 30.3. 18:11 000000010000000000000007 pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 16
  • 17. Online Backup • Normally, you need to shut down the database while you take a backup – or use a filesystem snapshot (e.g ZFS or a SAN) • WAL archiving makes that unnecessary pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 17
  • 18. Online Backup 1. SELECT pg_start_backup() 2. rsync / tar / whatever 3. SELECT pg_stop_backup(); 4. Include all archived WAL files from archive directory in the backup pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 18
  • 19. Online backup: Step 1 /mnt$ ls ­l yhteensä 8 drwxr­xr­x  2 heikki heikki 4096 30.3. 18:11 archivedir drwx­­­­­­ 14 heikki heikki 4096 30.3. 18:10 data /mnt$ psql ­c "SELECT pg_start_backup('my first backup')"  pg_start_backup  ­­­­­­­­­­­­­­­­­  0/C000020 (1 row) pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 19
  • 20. Online backup: Step 2 /mnt$ tar czf ~/backup.tar.gz data /mnt$ ls -l ~/backup.tar.gz -rw-r--r-- 1 heikki heikki 39670143 30.3. 18:33 /home/heikki/backup.tar.gz pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 20
  • 21. Online backup: Step 3 /mnt$ psql -c "SELECT pg_stop_backup()" NOTICE: pg_stop_backup complete, all required WAL segments have been archived pg_stop_backup ---------------- 0/C0000A8 (1 row) pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 21
  • 22. Online backup: Step 4 /mnt$ tar czf ~/backup-xlog.tar.gz archivedir/* /mnt$ ls -l /home/heikki/backup*.tar.gz -rw-r--r-- 1 heikki heikki 39670143 30.3. 18:33 /home/heikki/backup.tar.gz -rw-r--r-- 1 heikki heikki 41937910 30.3. 18:38 /home/heikki/backup-xlog.tar.gz pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 22
  • 23. Point-in-Time Recovery postgres=# DROP TABLE customers; DROP TABLE Oops! • Once you've enabled WAL archiving and taken a backup, you can use the archived WAL to restore to any point in time pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 23
  • 24. Point-in-Time Recovery Recovery.conf: # By default, recovery will rollforward to the end of the WAL log. # If you want to stop rollforward at a specific point, you # must set a recovery target. ... #recovery_target_name = '' # e.g. 'daily backup 2011-01-26' # #recovery_target_time = '' # e.g. '2004-07-14 22:39:00 EST' # #recovery_target_xid = '' # #recovery_target_inclusive = true pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 24
  • 25. Replication • You can transmit WAL as it is generated to a standby server – Replication! • This can be done using the WAL archive, or by streaming directly from the server over a TCP connection • Standby server can be used for read-only queries (Hot Standby) pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 25
  • 26. Thank you Write-Ahead Logging makes it possible for a database to maintain consistency. It also allows many advanced features: online backup, PITR and replication Questions? pyright 2009 EnterpriseDB Corporation. All rights Reserved. <presentation title goes here, edit in the slide master > Slide: 26