Re: [Proposal] Page Compression for OLTP

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: chenhj <chjischj(at)163(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, david(at)fetter(dot)org
Subject: Re: [Proposal] Page Compression for OLTP
Date: 2022-11-04 01:32:14
Message-ID: CAB8KJ=hmNWL1TZhA=0ZveQbMRybo1mRCHPaY=2drjwmRY0XE1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2022年7月27日(水) 2:47 chenhj <chjischj(at)163(dot)com>:
>
> Hi hackers,
>
> I have rebase this patch and made some improvements.
>
>
> 1. A header is added to each chunk in the pcd file, which records the chunk of which block the chunk belongs to, and the checksum of the chunk.
>
> Accordingly, all pages in a compressed relation are stored in compressed format, even if the compressed page is larger than BLCKSZ.
>
> The maximum space occupied by a compressed page is BLCKSZ + chunk_size (exceeding this range will report an error when writing the page).
>
> 2. Repair the pca file through the information recorded in the pcd when recovering from a crash
>
> 3. For compressed relation, do not release the free blocks at the end of the relation (just like what old_snapshot_threshold does), reducing the risk of data inconsistency between pcd and pca file.
>
> 4. During backup, only check the checksum in the chunk header for the pcd file, and avoid assembling and decompressing chunks into the original page.
>
> 5. bugfix, doc, code style and so on
>
>
> And see src/backend/storage/smgr/README.compression for detail
>
>
> Other
>
> 1. remove support of default compression option in tablespace, I'm not sure about the necessity of this feature, so don't support it for now.
>
> 2. pg_rewind currently does not support copying only changed blocks from pcd file. This feature is relatively independent and could be implemented later.

Hi

cfbot reports the patch no longer applies. As CommitFest 2022-11 is
currently underway, this would be an excellent time to update the patch.

Thanks

Ian Barwick

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Lawrence Barwick 2022-11-04 01:35:57 Re: Proposal to provide the facility to set binary format output for specific OID's per session
Previous Message Ian Lawrence Barwick 2022-11-04 01:23:34 Re: Commit fest 2022-11