Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Andres Freund <andres@anarazel.de>, joseph.ayers@crunchydata.com, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2020-11-25T01:47:42Z
Lists: pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> On Wed, 25 Nov 2020 at 14:28, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So maybe, rather than hacking up the attribute stuff for
>> a bug that might bite us again anyway in future, we ought
>> to press walleye's owner to install a more recent compiler.

> I think that seems like a better idea.  I had thoughts about
> installing a quick for now to give the owner of walleye a bit of time
> for the upgrade.  From what I can tell, the latest version of minGW
> comes with GCC 9.2 [1]

mingw and mingw-w64 seem to be distinct projects with separate
release schedules.  The latter's webpage isn't too clear about
which gcc version is in each of their releases.  But they seem
to be organized enough to put out releases roughly annually,
so I'm supposing they aren't falling too far behind gcc upstream.

			regards, tom lane



Commits

  1. Stop gap fix for __attribute__((cold)) compiler bug in MinGW 8.1

  2. Tidy up definitions of pg_attribute_hot and pg_attribute_cold

  3. Fix unportable usage of __has_attribute

  4. Improve compiler code layout in elog/ereport ERROR calls

  5. Define pg_attribute_cold and pg_attribute_hot macros