Re: pgsql: Add GUC to enable compression of full page images stored in WAL.

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Fujii Masao <fujii(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add GUC to enable compression of full page images stored in WAL.
Date: 2015-03-11 14:30:58
Message-ID: CAB7nPqSOAwSgUBmCr4LBWLb71Z0uN=RTvqnKCuhMWMY9rkhBrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Mar 11, 2015 at 11:18 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> On 2015-03-11 06:54:16 +0000, Fujii Masao wrote:
>> Add GUC to enable compression of full page images stored in WAL.
>
> This triggers a couple warnings here (gcc 4.9 and 5):
>
> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c: In function 'XLogInsert':
> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c:670:5: warning: 'cbimg.hole_length' may be used uninitialized in this function [-Wmaybe-uninitialized]
> memcpy(scratch, &cbimg,
> ^
> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c:494:33: note: 'cbimg.hole_length' was declared here
> XLogRecordBlockCompressHeader cbimg;
> ^
> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c:668:20: warning: 'hole_length' may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (hole_length != 0 && is_compressed)
> ^
> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c:497:10: note: 'hole_length' was declared here
> uint16 hole_length;
>
> I've not checked whether they're spurious or not.

That's a little bit surprising, hole_offset is set and used only when
needs_backup == true, same with cbigm.hole_offset when (needs_backup
&& is_compressed && hole_offset != 0).
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-03-11 14:58:33 pgsql: Suggest to the user the column they may have meant to reference.
Previous Message Andres Freund 2015-03-11 14:18:19 Re: pgsql: Add GUC to enable compression of full page images stored in WAL.