Re: Replication identifiers, take 4 - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: Replication identifiers, take 4
Date
Msg-id 5529B4C1.8030604@2ndquadrant.com
Whole thread Raw
In response to Re: Replication identifiers, take 4  (Andres Freund <andres@anarazel.de>)
Responses Re: Replication identifiers, take 4
List pgsql-hackers
On 10/04/15 18:03, Andres Freund wrote:
> On 2015-04-07 17:08:16 +0200, Andres Freund wrote:
>> I'm starting benchmarks now.
>
> What I'm benchmarking here is the WAL overhead, since that's what we're
> debating.
>
> The test setup I used was a pgbench scale 10 instance. I've run with
> full_page_write=off to have more reproducible results. This of course
> over-emphasizes the overhead a bit. But for a long checkpoint interval
> and a memory resident working set it's not that unrealistic.
>
> I ran 50k transactions in a signle b
> baseline:
> - 20445024
> - 20437128
> - 20436864
> - avg: 20439672
> extern 2byte identifiers:
> - 23318368
> - 23148648
> - 23128016
> - avg: 23198344
> - avg overhead: 13.5%
> padding 2byte identifiers:
> - 21160408
> - 21319720
> - 21164280
> - avg: 21214802
> - avg overhead: 3.8%
> extern 4byte identifiers:
> - 23514216
> - 23540128
> - 23523080
> - avg: 23525808
> - avg overhead: 15.1%
>
> To me that shows pretty clearly that a) reusing the padding is
> worthwhile b) even without that using 2byte instead of 4 byte
> identifiers is beneficial.
>

My opinion is that 10% of WAL size difference is quite high price to pay 
so that we can keep the padding for some other, yet unknown feature that 
hasn't come up in several years, which would need those 2 bytes.

But if we are willing to pay it then we can really go all the way and 
just use Oids...

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



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: FDW oddity
Next
From: David Rowley
Date:
Subject: Remove some duplicated words in comments