From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL-Dev <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] XLogReadRecord returns pointer to currently read page
Date: Fri, 17 Aug 2018 09:25:57 +0500
Message-ID: <0884f09b-4fe4-bd62-e624-741815e4bf15@postgrespro.ru> (raw)
In-Reply-To: <20180817035521.GF1693@paquier.xyz>
References: <c2ea54dd-a1d3-80eb-ddbf-7e6f258e615e@postgrespro.ru>
<20180817035521.GF1693@paquier.xyz>
17.08.2018 08:55, Michael Paquier пишет:
> On Fri, Aug 17, 2018 at 08:47:15AM +0500, Andrey Lepikhov wrote:
>> Previously, in all cases of using WAL this was not a problem. However if you
>> plan to perform some decoding operations before returning the WAL record to
>> the caller (this is my case), this can lead to bugs that are difficult to
>> catch.
>
> What kind of cases with logical decoding are you referring to? If
> any of them can be reproduced with upstream, could you send a
> reproducer, or a way to see it?
> --
> Michael
>
I'm working on the problem of a WAL-record size reducing. One of the
PostgreSQL experimental extensions uses a 64-bit xid, and the XLogRecord
size is increased to 32 bytes.
Representing a 64-bit xid in WAL Segment as a pair (16-bit base, 8-bit
offset) reduces the size of the WAL record header and its body.
So, I encode a WAL-record in XLogInsertRecord() (decreasing the size)
just before writing to a shared memory pages and performs the decoding
just before processing DecodeXLogRecord() operation.
It looks like a layer in the xlog subsystem for additional WAL
compression. However, this is a long story ...
--
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: a.lepikhov@postgrespro.ru, michael@paquier.xyz
Subject: Re: [PATCH] XLogReadRecord returns pointer to currently read page
In-Reply-To: <0884f09b-4fe4-bd62-e624-741815e4bf15@postgrespro.ru>
References: <c2ea54dd-a1d3-80eb-ddbf-7e6f258e615e@postgrespro.ru> <20180817035521.GF1693@paquier.xyz> <0884f09b-4fe4-bd62-e624-741815e4bf15@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox