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

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
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:35:25Z
Lists: pgsql-hackers
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]

David

[1] https://osdn.net/projects/mingw/releases/



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