SlideShare a Scribd company logo
© 2013 EDB All rights reserved. 1
zheap: Why is EntepriseDB
developing a new storage format for
PostgreSQL?
• Robert Haas | 2018-06-05
© 2018 EDB All rights reserved. 2
• New storage format being developed by EnterpriseDB
• Work in progress is already released on github under
PostgreSQL license
• Basics work, but much remains to be done
• Goal is to get it integrated into PostgreSQL
zheap: What is it?
© 2018 EDB All rights reserved. 3
• Original motivation for zheap: In some workloads,
PostgreSQL tables tend to bloat, and when they do, it’s
hard to get rid of the bloat.
• Bloat occurs when the table and indexes grow even
though the amount of real data being stored has not
increased.
• Bloat is caused mainly by updates, because we must
keep both the old and new row versions for a period of
time.
• Bloat can be a concern because of increased disk
consumption, but typically a bigger concern is
performance loss – if a table is twice as big as it
“should be”, scanning it takes twice as long.
Bloat: Motivation and Definition
© 2018 EDB All rights reserved. 4
• All systems that use MVCC must deal with multiple row
versions, but they store them in different places.
– PostgreSQL and Firebird put all row versions in the
table.
– Oracle and MySQL put old row versions in the
undo log.
– SQL Server puts old row versions in tempdb.
• Leaving old row versions in the table makes cleanup
harder – sometimes need to use CLUSTER or
VACUUM FULL.
• Improving VACUUM helps contain bloat, but can’t
prevent it completely.
Bloat: Why a new storage format?
© 2018 EDB All rights reserved. 5
• Whenever a transaction performs an operation on a
tuple, the operation is also recorded in an undo log.
• If the transaction aborts, the undo log can be used to
reverse all of the operations performed by the
transaction.
• The undo log also contains most of the data we need
for MVCC purposes, so little transactional data needs
to be stored in the table itself. This, and a reduction in
alignment padding, mean that zheap is smaller on disk.
• We avoid dirtying the page except when the data has
been modified, or after an abort. No VACUUM, no
freezing, no “routine maintenance” at all!
zheap: How does it work?
© 2018 EDB All rights reserved. 6
• INSERT: Same as current heap, but in case of an
abort, dead row versions will be removed immediately
by undo, not at a later time by VACUUM.
• DELETE: Same as current heap … mostly.
• UPDATE: Very different! Whenever possible, we want
to update the tuple “in place,” without storing a second
version in the heap.
– The old version of the tuple will be stored in the
undo log.
– In-place updates prevent bloat! The undo log may
bloat, but it will shrink as soon as the relevant
transactions are no longer running.
zheap: Basic Operations
© 2018 EDB All rights reserved. 7
• In the existing heap, every update is either HOT (no
indexes updated) or non-HOT (insert into every index).
• In zheap, every update is either in-place or not. At
present, like a HOT update, an in-place update cannot
modify any indexed columns.
• An “in-place” update is significantly better than a HOT
update because it does not require that the page
contain adequate space for the entire new tuple.
– We don’t need any extra space at all unless the
new version of the tuple is wider than the old one.
• In the future, we will also be able to perform in-place
updates when indexed columns have been modified.
Updates: “In Place” or not?
© 2018 EDB All rights reserved. 8
• Current version of zheap works without any changes to
index access methods.
• We plan to continue supporting the use of unmodified
index access methods with zheap.
• However, if indexes are modified to support “delete-
marking,” we could do in-place updates even when
indexed columns are modified.
• When performing an in-place update, mark the old
index entry as possibly-deleted, and insert a new one.
No changes to indexes where the corresponding
columns aren’t modified!
zheap: Index Support
© 2018 EDB All rights reserved. 9
• In the current heap, each non-HOT update incurs one
insert to every index.
• With zheap, each in-place update will incur one insert
and one delete-marking operation for each index, but
only for indexes where the indexed columns are
modified.
• By removing the restriction that no indexed columns
can be modified, we will be able to perform nearly all
updates in place!
• Only updates that expand the row so that it no longer
fits on the page will need to be performed as not-in-
place.
zheap: Index Support (2)
© 2018 EDB All rights reserved. 10
• If all indexes on the table support delete-marking,
maybe we don’t need VACUUM any more.
• Remember, zheap pages don’t need to be hinted,
frozen, etc. If there are leftover tuples, we can remove
them when we want to reuse the space, rather than in
advance.
• Delete-marked index tuples can be removed “lazily” -
perhaps when they are scanned, or when they are
evicted from shared buffers. Index pages that are
never accessed again might be bloated, but that
doesn’t have much impact on performance.
Eliminating VACUUM
© 2018 EDB All rights reserved. 11
• If we don’t VACUUM, we can’t ever “lose” free space.
This will require changes to free space tracking.
– UPDATE can create free space if the new row
version is narrower than the old one, or if the
update is not-in-place.
– DELETE always creates free space.
– In either case, the free space can’t be used until
the transaction commits.
• VACUUM could still be an option for users wanting to
clean up more aggressively.
Eliminating VACUUM (2)
© 2018 EDB All rights reserved. 12
• pgbench, scale factor 1000
• Simple-update test (1 select, 1 insert, 1 update)
• 64-bit Linux, x86, 2 sockets, 14 cores/socket, 64GB
• shared_buffers=32GB, min_wal_size=15GB,
max_wal_size=20GB, checkpoint_timeout=1200,
maintenance_work_mem=1GB,
checkpoint_completion_target=0.9,
synchronous_commit=off
Performance Data – Test Setup
© 2018 EDB All rights reserved. 13
●
Initial size of accounts table is 13GB in heap – only 11GB in zheap.
●
heap grows to 19GB at 8 clients count test and 26GB at 64-clients. zheap stays
at 11GB!
●
All the undo generated during test gets discarded within a few seconds after the
open transaction is ended.
●
TPS for zheap is ~40% more than heap in above tests at 8 client-count. In some
other high-end machines, we have seen up to ~100% improvement for similar
test.
© 2018 EDB All rights reserved. 14
• Because zheap is smaller on-disk, we get a small
performance boost.
• No worries about VACUUM kicking in unexpectedly.
• Undo bloat is self-healing – good for cloud or other
“unattended” workloads.
• In workloads where the heap bloats and zheap only
bloats the undo, we get a massive performance boost.
• Discarding undo happens in the background and is
cheaper than HOT pruning; that helps, too!
Benefits
© 2018 EDB All rights reserved. 15
• Transaction abort will be more expensive.
• Deletes might not perform as well.
• Could be slow if most/all indexed columns are updated
at the same time.
• Huge amount of development work.
Drawbacks
© 2018 EDB All rights reserved. 16
• Allow PostgreSQL to support pluggable storage
formats.
• Allows innovation – major changes to the heap are
impossible because everyone relies on it. Can’t go
backwards for any use case!
• Allows for user choice – if there are multiple storage
formats available, pick the one that is best for your use
case.
• Hope to see this in PostgreSQL 12 (Fall 2019).
Pluggable Storage: Plan
© 2018 EDB All rights reserved. 17
• Columnar storage
– Most queries don’t need all columns.
• Write-once read-many (WORM)
– No support UPDATE, DELETE, or SELECT FOR UPDATE/SHARE.
• Index-organized storage
– One index is more important than all of the others.
• In-memory storage
– No need to spill to disk.
• Non-transactional storage.
– No MVCC.
Pluggable Storage: Examples
© 2018 EDB All rights reserved. 18
• PostgreSQL 12 or 13
• There will still be much more to do for “v2”.
When?
© 2018 EDB All rights reserved. 19
zheap
• Amit Kapila
(development lead)
• Dilip Kumar
• Kuntal Ghosh
• Mithun CY
• Ashutosh Sharma
• Rafia Sabih
• Beena Emerson
• Amit Khandekar
• Thomas Munro
Who?
Pluggable Storage
• Haribabu Kommi
(Fujitsu)
• Alexander Korotkov
(Postgres Pro)
• Andres Freund
• Ashutosh Bapat
© 2018 EDB All rights reserved. 20
• Any Questions?
Thanks

More Related Content

PDF
Postgres Vision 2018: Making Postgres Even Faster
 
PDF
Postgres Vision 2018: WAL: Everything You Want to Know
 
PDF
PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PDF
PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...
PDF
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
PDF
Big Data and PostgreSQL
PDF
PostgreSQL WAL for DBAs
PDF
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQL
Postgres Vision 2018: Making Postgres Even Faster
 
Postgres Vision 2018: WAL: Everything You Want to Know
 
PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PGConf.ASIA 2019 Bali - Setup a High-Availability and Load Balancing PostgreS...
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
Big Data and PostgreSQL
PostgreSQL WAL for DBAs
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQL

What's hot (20)

PDF
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PDF
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PDF
Oracle to Postgres Migration - part 2
PPTX
How many ways to monitor oracle golden gate-Collaborate 14
PDF
Go faster with_native_compilation Part-2
PDF
Postgres clusters
PDF
Spil Storage Platform (Erlang) @ EUG-NL
PPTX
Low Level CPU Performance Profiling Examples
PDF
20190909_PGconf.ASIA_KaiGai
PDF
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PDF
Setup oracle golden gate 11g replication
PDF
PGConf APAC 2018 Keynote: PostgreSQL goes eleven
PDF
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
PPTX
Oracle Database 12.1.0.2 New Features
PDF
In Memory Database In Action by Tanel Poder and Kerry Osborne
PPTX
Tanel Poder Oracle Scripts and Tools (2010)
PDF
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
PDF
PGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo Hirose
PDF
PostgreSQL 9.5 - Major Features
DOC
Some osdb migration_question_for_the_certification_tadm70
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
Oracle to Postgres Migration - part 2
How many ways to monitor oracle golden gate-Collaborate 14
Go faster with_native_compilation Part-2
Postgres clusters
Spil Storage Platform (Erlang) @ EUG-NL
Low Level CPU Performance Profiling Examples
20190909_PGconf.ASIA_KaiGai
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
Setup oracle golden gate 11g replication
PGConf APAC 2018 Keynote: PostgreSQL goes eleven
Flink Forward Berlin 2017: Stefan Richter - A look at Flink's internal data s...
Oracle Database 12.1.0.2 New Features
In Memory Database In Action by Tanel Poder and Kerry Osborne
Tanel Poder Oracle Scripts and Tools (2010)
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
PGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo Hirose
PostgreSQL 9.5 - Major Features
Some osdb migration_question_for_the_certification_tadm70
Ad

Similar to Postgres vision 2018: The Promise of zheap (20)

PDF
Learn how zheap works
 
PDF
Learn how zheap works
 
PDF
The Future of zHeap
 
PDF
Bloat and Fragmentation in PostgreSQL
PDF
Vacuum in PostgreSQL
PDF
12 in 12 – A closer look at twelve or so new things in Postgres 12
PDF
Btree. Explore the heart of PostgreSQL.
PDF
Flexible Indexing with Postgres
 
DOCX
The internals
PDF
Postgres can do THAT?
PDF
Grokking TechTalk #20: PostgreSQL Internals 101
PPTX
SQL Server 2014 Memory Optimised Tables - Advanced
PDF
Managing terabytes: When Postgres gets big
PDF
Rob Sullivan at Heroku's Waza 2013: Your Database -- A Story of Indifference
PDF
PostgreSQL High_Performance_Cheatsheet
PDF
SQL Server 2014 In-Memory Tables (XTP, Hekaton)
PPTX
Geek Sync | Tips for Data Warehouses and Other Very Large Databases
PDF
Strategic autovacuum
PDF
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
PDF
Don't Do This [FOSDEM 2023]
Learn how zheap works
 
Learn how zheap works
 
The Future of zHeap
 
Bloat and Fragmentation in PostgreSQL
Vacuum in PostgreSQL
12 in 12 – A closer look at twelve or so new things in Postgres 12
Btree. Explore the heart of PostgreSQL.
Flexible Indexing with Postgres
 
The internals
Postgres can do THAT?
Grokking TechTalk #20: PostgreSQL Internals 101
SQL Server 2014 Memory Optimised Tables - Advanced
Managing terabytes: When Postgres gets big
Rob Sullivan at Heroku's Waza 2013: Your Database -- A Story of Indifference
PostgreSQL High_Performance_Cheatsheet
SQL Server 2014 In-Memory Tables (XTP, Hekaton)
Geek Sync | Tips for Data Warehouses and Other Very Large Databases
Strategic autovacuum
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
Don't Do This [FOSDEM 2023]
Ad

More from EDB (20)

PDF
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
 
PDF
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
PDF
Migre sus bases de datos Oracle a la nube
 
PDF
EFM Office Hours - APJ - July 29, 2021
 
PDF
Benchmarking Cloud Native PostgreSQL
 
PDF
Las Variaciones de la Replicación de PostgreSQL
 
PDF
NoSQL and Spatial Database Capabilities using PostgreSQL
 
PDF
Is There Anything PgBouncer Can’t Do?
 
PDF
Data Analysis with TensorFlow in PostgreSQL
 
PDF
Practical Partitioning in Production with Postgres
 
PDF
A Deeper Dive into EXPLAIN
 
PDF
IOT with PostgreSQL
 
PDF
A Journey from Oracle to PostgreSQL
 
PDF
Psql is awesome!
 
PDF
EDB 13 - New Enhancements for Security and Usability - APJ
 
PPTX
Comment sauvegarder correctement vos données
 
PDF
Cloud Native PostgreSQL - Italiano
 
PDF
New enhancements for security and usability in EDB 13
 
PPTX
Best Practices in Security with PostgreSQL
 
PDF
Cloud Native PostgreSQL - APJ
 
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
Migre sus bases de datos Oracle a la nube
 
EFM Office Hours - APJ - July 29, 2021
 
Benchmarking Cloud Native PostgreSQL
 
Las Variaciones de la Replicación de PostgreSQL
 
NoSQL and Spatial Database Capabilities using PostgreSQL
 
Is There Anything PgBouncer Can’t Do?
 
Data Analysis with TensorFlow in PostgreSQL
 
Practical Partitioning in Production with Postgres
 
A Deeper Dive into EXPLAIN
 
IOT with PostgreSQL
 
A Journey from Oracle to PostgreSQL
 
Psql is awesome!
 
EDB 13 - New Enhancements for Security and Usability - APJ
 
Comment sauvegarder correctement vos données
 
Cloud Native PostgreSQL - Italiano
 
New enhancements for security and usability in EDB 13
 
Best Practices in Security with PostgreSQL
 
Cloud Native PostgreSQL - APJ
 

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
MYSQL Presentation for SQL database connectivity
PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
KodekX | Application Modernization Development
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
MYSQL Presentation for SQL database connectivity
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Understanding_Digital_Forensics_Presentation.pptx
Programs and apps: productivity, graphics, security and other tools
Encapsulation_ Review paper, used for researhc scholars
KodekX | Application Modernization Development
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Per capita expenditure prediction using model stacking based on satellite ima...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”

Postgres vision 2018: The Promise of zheap

  • 1. © 2013 EDB All rights reserved. 1 zheap: Why is EntepriseDB developing a new storage format for PostgreSQL? • Robert Haas | 2018-06-05
  • 2. © 2018 EDB All rights reserved. 2 • New storage format being developed by EnterpriseDB • Work in progress is already released on github under PostgreSQL license • Basics work, but much remains to be done • Goal is to get it integrated into PostgreSQL zheap: What is it?
  • 3. © 2018 EDB All rights reserved. 3 • Original motivation for zheap: In some workloads, PostgreSQL tables tend to bloat, and when they do, it’s hard to get rid of the bloat. • Bloat occurs when the table and indexes grow even though the amount of real data being stored has not increased. • Bloat is caused mainly by updates, because we must keep both the old and new row versions for a period of time. • Bloat can be a concern because of increased disk consumption, but typically a bigger concern is performance loss – if a table is twice as big as it “should be”, scanning it takes twice as long. Bloat: Motivation and Definition
  • 4. © 2018 EDB All rights reserved. 4 • All systems that use MVCC must deal with multiple row versions, but they store them in different places. – PostgreSQL and Firebird put all row versions in the table. – Oracle and MySQL put old row versions in the undo log. – SQL Server puts old row versions in tempdb. • Leaving old row versions in the table makes cleanup harder – sometimes need to use CLUSTER or VACUUM FULL. • Improving VACUUM helps contain bloat, but can’t prevent it completely. Bloat: Why a new storage format?
  • 5. © 2018 EDB All rights reserved. 5 • Whenever a transaction performs an operation on a tuple, the operation is also recorded in an undo log. • If the transaction aborts, the undo log can be used to reverse all of the operations performed by the transaction. • The undo log also contains most of the data we need for MVCC purposes, so little transactional data needs to be stored in the table itself. This, and a reduction in alignment padding, mean that zheap is smaller on disk. • We avoid dirtying the page except when the data has been modified, or after an abort. No VACUUM, no freezing, no “routine maintenance” at all! zheap: How does it work?
  • 6. © 2018 EDB All rights reserved. 6 • INSERT: Same as current heap, but in case of an abort, dead row versions will be removed immediately by undo, not at a later time by VACUUM. • DELETE: Same as current heap … mostly. • UPDATE: Very different! Whenever possible, we want to update the tuple “in place,” without storing a second version in the heap. – The old version of the tuple will be stored in the undo log. – In-place updates prevent bloat! The undo log may bloat, but it will shrink as soon as the relevant transactions are no longer running. zheap: Basic Operations
  • 7. © 2018 EDB All rights reserved. 7 • In the existing heap, every update is either HOT (no indexes updated) or non-HOT (insert into every index). • In zheap, every update is either in-place or not. At present, like a HOT update, an in-place update cannot modify any indexed columns. • An “in-place” update is significantly better than a HOT update because it does not require that the page contain adequate space for the entire new tuple. – We don’t need any extra space at all unless the new version of the tuple is wider than the old one. • In the future, we will also be able to perform in-place updates when indexed columns have been modified. Updates: “In Place” or not?
  • 8. © 2018 EDB All rights reserved. 8 • Current version of zheap works without any changes to index access methods. • We plan to continue supporting the use of unmodified index access methods with zheap. • However, if indexes are modified to support “delete- marking,” we could do in-place updates even when indexed columns are modified. • When performing an in-place update, mark the old index entry as possibly-deleted, and insert a new one. No changes to indexes where the corresponding columns aren’t modified! zheap: Index Support
  • 9. © 2018 EDB All rights reserved. 9 • In the current heap, each non-HOT update incurs one insert to every index. • With zheap, each in-place update will incur one insert and one delete-marking operation for each index, but only for indexes where the indexed columns are modified. • By removing the restriction that no indexed columns can be modified, we will be able to perform nearly all updates in place! • Only updates that expand the row so that it no longer fits on the page will need to be performed as not-in- place. zheap: Index Support (2)
  • 10. © 2018 EDB All rights reserved. 10 • If all indexes on the table support delete-marking, maybe we don’t need VACUUM any more. • Remember, zheap pages don’t need to be hinted, frozen, etc. If there are leftover tuples, we can remove them when we want to reuse the space, rather than in advance. • Delete-marked index tuples can be removed “lazily” - perhaps when they are scanned, or when they are evicted from shared buffers. Index pages that are never accessed again might be bloated, but that doesn’t have much impact on performance. Eliminating VACUUM
  • 11. © 2018 EDB All rights reserved. 11 • If we don’t VACUUM, we can’t ever “lose” free space. This will require changes to free space tracking. – UPDATE can create free space if the new row version is narrower than the old one, or if the update is not-in-place. – DELETE always creates free space. – In either case, the free space can’t be used until the transaction commits. • VACUUM could still be an option for users wanting to clean up more aggressively. Eliminating VACUUM (2)
  • 12. © 2018 EDB All rights reserved. 12 • pgbench, scale factor 1000 • Simple-update test (1 select, 1 insert, 1 update) • 64-bit Linux, x86, 2 sockets, 14 cores/socket, 64GB • shared_buffers=32GB, min_wal_size=15GB, max_wal_size=20GB, checkpoint_timeout=1200, maintenance_work_mem=1GB, checkpoint_completion_target=0.9, synchronous_commit=off Performance Data – Test Setup
  • 13. © 2018 EDB All rights reserved. 13 ● Initial size of accounts table is 13GB in heap – only 11GB in zheap. ● heap grows to 19GB at 8 clients count test and 26GB at 64-clients. zheap stays at 11GB! ● All the undo generated during test gets discarded within a few seconds after the open transaction is ended. ● TPS for zheap is ~40% more than heap in above tests at 8 client-count. In some other high-end machines, we have seen up to ~100% improvement for similar test.
  • 14. © 2018 EDB All rights reserved. 14 • Because zheap is smaller on-disk, we get a small performance boost. • No worries about VACUUM kicking in unexpectedly. • Undo bloat is self-healing – good for cloud or other “unattended” workloads. • In workloads where the heap bloats and zheap only bloats the undo, we get a massive performance boost. • Discarding undo happens in the background and is cheaper than HOT pruning; that helps, too! Benefits
  • 15. © 2018 EDB All rights reserved. 15 • Transaction abort will be more expensive. • Deletes might not perform as well. • Could be slow if most/all indexed columns are updated at the same time. • Huge amount of development work. Drawbacks
  • 16. © 2018 EDB All rights reserved. 16 • Allow PostgreSQL to support pluggable storage formats. • Allows innovation – major changes to the heap are impossible because everyone relies on it. Can’t go backwards for any use case! • Allows for user choice – if there are multiple storage formats available, pick the one that is best for your use case. • Hope to see this in PostgreSQL 12 (Fall 2019). Pluggable Storage: Plan
  • 17. © 2018 EDB All rights reserved. 17 • Columnar storage – Most queries don’t need all columns. • Write-once read-many (WORM) – No support UPDATE, DELETE, or SELECT FOR UPDATE/SHARE. • Index-organized storage – One index is more important than all of the others. • In-memory storage – No need to spill to disk. • Non-transactional storage. – No MVCC. Pluggable Storage: Examples
  • 18. © 2018 EDB All rights reserved. 18 • PostgreSQL 12 or 13 • There will still be much more to do for “v2”. When?
  • 19. © 2018 EDB All rights reserved. 19 zheap • Amit Kapila (development lead) • Dilip Kumar • Kuntal Ghosh • Mithun CY • Ashutosh Sharma • Rafia Sabih • Beena Emerson • Amit Khandekar • Thomas Munro Who? Pluggable Storage • Haribabu Kommi (Fujitsu) • Alexander Korotkov (Postgres Pro) • Andres Freund • Ashutosh Bapat
  • 20. © 2018 EDB All rights reserved. 20 • Any Questions? Thanks