new heap with in-place update, powered by undo, for eventual integration into PostgreSQL
C
247
43,848 commits
updated Mar 12, 2020
The purpose of this document is to let users know how they can use zheap (a new storage format for PostgreSQL) and the work that is still pending. This new storage format provides a better control over bloat, reduces the tuple size and reduces the write amplification. The detail design of zheap is present in zheap design document (src/backend/access/zheap/README).
We have provided a storage engine option which you can set when creating a table. For example:
create table t_zheap(c1 int, c2 varchar) USING zheap;
Index creation for zheap tables doesn't need any special syntax.
You can also set the GUC parameter default_table_access_method. The default value is “heap", but you can set it to “zheap”. If you do, all subsequently-created tables will use zheap.
These interfaces will probably change once the storage format API work is integrated into PostgreSQL. We’ll adjust this code to use whatever interfaces are agreed by the PostgreSQL community.
Each zheap page has fixed set of transaction slots each of which contains the transaction information (transaction id and epoch) and the latest undo record pointer for that transaction. By default, we have four transaction slots per page, but this can be changed by setting --with-trans_slots_per_zheap_page=value while configuring zheap.
Tools
The other pending code related items are tracked on zheap wiki page: https://wiki.postgresql.org/wiki/Zheap
You can find overall design of zheap in the README: src/backend/access/zheap/README
(top 30 of 37)
C
83.5%
PLpgSQL
5.6%
C++
2.2%
Perl
2.0%
TSQL
1.8%
Yacc
1.4%
new heap with in-place update, powered by undo, for eventual integration into PostgreSQL
C
247
43,848 commits
updated Mar 12, 2020
The purpose of this document is to let users know how they can use zheap (a new storage format for PostgreSQL) and the work that is still pending. This new storage format provides a better control over bloat, reduces the tuple size and reduces the write amplification. The detail design of zheap is present in zheap design document (src/backend/access/zheap/README).
We have provided a storage engine option which you can set when creating a table. For example:
create table t_zheap(c1 int, c2 varchar) USING zheap;
Index creation for zheap tables doesn't need any special syntax.
You can also set the GUC parameter default_table_access_method. The default value is “heap", but you can set it to “zheap”. If you do, all subsequently-created tables will use zheap.
These interfaces will probably change once the storage format API work is integrated into PostgreSQL. We’ll adjust this code to use whatever interfaces are agreed by the PostgreSQL community.
Each zheap page has fixed set of transaction slots each of which contains the transaction information (transaction id and epoch) and the latest undo record pointer for that transaction. By default, we have four transaction slots per page, but this can be changed by setting --with-trans_slots_per_zheap_page=value while configuring zheap.
Tools
The other pending code related items are tracked on zheap wiki page: https://wiki.postgresql.org/wiki/Zheap
You can find overall design of zheap in the README: src/backend/access/zheap/README
(top 30 of 37)
C
83.5%
PLpgSQL
5.6%
C++
2.2%
Perl
2.0%
TSQL
1.8%
Yacc
1.4%