| From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
|---|---|
| To: | Greg Stark <stark(at)mit(dot)edu>, Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, Ants Aasma <ants(at)cybertec(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Markus Wanner <markus(at)bluegap(dot)ch> |
| Subject: | Re: Proposal for CSN based snapshots |
| Date: | 2014-06-13 10:24:19 |
| Message-ID: | 539AD153.9000004@vmware.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 06/03/2014 05:53 PM, Greg Stark wrote:
> On Tue, Jun 3, 2014 at 2:55 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> That doesn't address Bruce's concern about CLOG disk consumption.
>
> Well we would only need the xid->lsn mapping for transactions since
> globalxmin. Anything older we would just need the committed bit. So we
> could maintain two structures, one like our current clog going back
> until the freeze_max_age and one with 32-bits (or 64 bits?) per xid
> but only going back as far as the globalxmin. There are a myriad of
> compression techniques we could use on a sequence of mostly similar
> mostly increasing numbers in a small range too. But I suspect they
> wouldn't really be necessary.
Yeah, that seems like a better design, after all.
Attached is a new patch. It now keeps the current pg_clog unchanged, but
adds a new pg_csnlog besides it. pg_csnlog is more similar to
pg_subtrans than pg_clog: it's not WAL-logged, is reset at startup, and
segments older than GlobalXmin can be truncated.
This addresses the disk space consumption, and simplifies pg_upgrade.
There are no other significant changes in this new version, so it's
still very much WIP. But please take a look!
- Heikki
| Attachment | Content-Type | Size |
|---|---|---|
| csn-2.patch.gz | application/gzip | 107.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2014-06-13 11:27:26 | Re: pg_resetxlog to clear backup start/end locations. |
| Previous Message | Marti Raudsepp | 2014-06-13 10:12:00 | Re: Quantify small changes to predicate evaluation |