Re: logical changeset generation v6.8

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical changeset generation v6.8
Date: 2013-12-13 13:33:46
Message-ID: CAApHDvqOsb4nc3OG0xoBoJ2fmA-6AkihuWsAd43RLekqk6SmCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 14, 2013 at 12:12 AM, Andres Freund <andres(at)2ndquadrant(dot)com>wrote:

> On 2013-12-13 20:58:24 +1300, David Rowley wrote:
> > On Wed, Dec 11, 2013 at 1:11 PM, Robert Haas <robertmhaas(at)gmail(dot)com>
> wrote:
> > This introduced a new compiler warning on the visual studios build:
> > d:\postgres\b\src\backend\utils\cache\relcache.c(3958): warning C4715:
> > 'RelationGetIndexAttrBitmap' : not all control paths return a value
> > [D:\Postgres\b\postgres.vcxproj]
> >
> > The attached patch fixes it.
>
> I thought we'd managed to get elog(ERROR) properly annotated as noreturn
> on msvc as well?
>
>
It looks like this is down to the elog macro, where the elevel is being
assigned to a variable elevel_ then we're only doing pg_unreachable(); if
elevel_ >= ERROR. The compiler must not be confident enough to optimise out
the if condition even though the elevel is not changed after it is set from
the constant.

Regards

David Rowley

> 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 Fabrízio de Royes Mello 2013-12-13 13:37:58 Re: patch: make_timestamp function
Previous Message Robert Haas 2013-12-13 13:30:41 Re: Changeset Extraction Interfaces