Re: folder:lk/lk date:yesterday..

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: folder:lk/lk date:yesterday..
Date: 2014-05-05 13:27:23
Message-ID: 536791BB.9020602@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/30/2014 06:39 PM, Andres Freund wrote:
> Hi,
>
> Coverity flagged a couple of issues that seem to worth addressing by
> changing the code instead of ignoring them:
>
> 01) heap_xlog_update() looks to coverity as if it could trigger a NULL
> pointer dereference. That's because it thinks that oldtup.t_data is
> NULL if XLR_BKP_BLOCK(0) while reconstructing incremental
> tuples. That fortunately can't happen as incremental updates are
> only performed if the tuples are on the same page.
> Add an Assert().
> 02) Be a bit more consistent in what type to use for a size
> variable. Inconsequential, but more consistent.
> 03) Don't leak memory after connection aborts in pg_recvlogical.
> 04) Use a sensible parameter for memset() when randomizing memory in
> reorderbuffer. Inconsequential.
>
> Could somebody please pick these up?

Committed, thanks.

> I have to say, I am not particularly happy with the complexity of the
> control flow in heap_xlog_update() :(.

Agreed :-(. It might be good to split it into two functions, one for
same-page updates and another for others. And have two different WAL
record structs for the cases, too.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-05-05 13:28:39 Re: 9.4 release notes
Previous Message Michael Renner 2014-05-05 13:19:41 Cascading replication and archive_command