Re: Replication identifiers, take 3

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Steve Singer <steve(at)ssinger(dot)info>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Replication identifiers, take 3
Date: 2014-09-29 08:15:39
Message-ID: 20140929081539.GA14652@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-09-27 12:11:16 -0400, Steve Singer wrote:
> On 09/26/2014 06:05 PM, Andres Freund wrote:
> >On 2014-09-26 14:57:12 -0400, Robert Haas wrote:
> >Sure, it'll possibly not be trivial to move them elsewhere. On the other
> >hand, the padding bytes have been unused for 8+ years without somebody
> >laying "claim" on them but "me". I don't think it's a good idea to leave
> >them there unused when nobody even has proposed another use for a long
> >while. That'll just end up with them continuing to be unused. And
> >there's actually four more consecutive bytes on 64bit systems that are
> >unused.
> >
> >Should there really be a dire need after that, we can simply bump the
> >record size. WAL volume wise it'd not be too bad to make the record a
> >tiny bit bigger - the header is only a relatively small fraction of the
> >entire content.
>
> If we were now increasing the WAL record size anyway for some unrelated
> reason, would we be willing to increase it by a further 2 bytes for the node
> identifier?
> If the answer is 'no' then I don't think we can justify using the 2 padding
> bytes just because they are there and have been unused for years. But if
> the answer is yes, we feel this important enough to justfiy a slightly (2
> byte) larger WAL record header then we shouldn't use the excuse of maybe
> needing those 2 bytes for something else. When something else comes along
> that needs the WAL space we'll have to increase the record size.

I don't think that's a good way to see this. By that argument these
bytes will never be used.

Also there's four more free bytes on 64bit systems...

> To say that if some other patch comes along that needs the space we'll redo
> this feature to use the method Robert describes is unrealistic. If we think
> that the replication identifier isn't general/important/necessary to
> justify 2 bytes of WAL header space then we should start out with something
> that doesn't use the WAL header,

Maintaining complexity also has its costs. And I think that's much more
concrete than some imaginary feature (of which nothing was heard for the
last 8+ years) also needing two bytes.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Abhijit Menon-Sen 2014-09-29 08:39:01 initdb -S and tablespaces
Previous Message Simon Riggs 2014-09-29 08:10:26 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}