Nov 2020

5 commits
Stop gap fix for __attribute__((cold)) compiler bug in MinGW 8.1
25 Nov 2020David Rowleymaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 99% suremodified before commitlight changesfrom patchset #33

Matches the MinGW64 GCC 8.1 workaround in #33, defining both attribute macros as empty on that compiler. The only edit is formatting the closing #endif comment across two lines.

Tidy up definitions of pg_attribute_hot and pg_attribute_cold
24 Nov 2020David Rowleymaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 99% surewritten from the discussion, no matching patch

Implements the fallback __has_attribute definition proposed inline by Andres Freund in #3 and reiterated by Dagfinn Ilmari Mannsåker in #23; no attachment contains this cleanup. It also moves pg_attribute_cold before the return type in the errstart_cold declaration.

Fix unportable usage of __has_attribute
24 Nov 2020David Rowleymaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 99% surewritten from the discussion, no matching patch

Responds to Greg Nancarrow's GCC 4.8.5 failure and documentation analysis in #21 by separating the __has_attribute existence test from its invocation. David Rowley reports testing and committing the repair in #22; no corrective patch was attached.

Improve compiler code layout in elog/ereport ERROR calls
23 Nov 2020David Rowleymaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #121 of 2 reviewers saw the final version

Commits the elog.c and elog.h portions of #12, preserving its errstart_cold wrapper and ERROR-only dispatch while expanding comments and adjusting attribute placement. The src/include/c.h portion landed separately in 697e1d02f5.

  • Andres Freundsaw an earlier versiontrailerIn #3 he reviewed the original wrapper, suggested inlining and DEBUG handling, and requested eliminating macro duplication; subsequent revisions changed conditional wrapper compilation and dispatch availability.
  • Peter Eisentrautsaw the final versiontrailerHe reviewed the alternatives in #9 and benchmarked the final ERROR-only patch on Intel and ARM laptops in #18, after which this portion received only comment and formatting edits.
Define pg_attribute_cold and pg_attribute_hot macros
23 Nov 2020David Rowleymaster14beta1REL_19_STABLE14beta1REL_18_STABLE14beta1REL_17_STABLE14beta1REL_16_STABLE14beta1REL_15_STABLE14beta1REL_14_STABLE14beta1
LLM analysis, 100% surepart of a posted patchsetmoderate changesfrom patchset #120 of 2 reviewers saw the final version

Extracts the pg_attribute_hot and pg_attribute_cold definitions from src/include/c.h in #12. The committer replaced nested __has_attribute guards with combined expressions, introducing the older-GCC failure subsequently reported in #21.

  • Andres Freundsaw an earlier versiontrailerIn #3 he proposed __has_attribute detection and an empty fallback operator, but the committed detection logic differed materially from both the original patch and his proposal.
  • Peter Eisentrautsaw an earlier versiontrailerHe reviewed attribute detection in #9 and tested the final attachment in #18, but the unreviewed combined preprocessor guards introduced at commit changed compiler compatibility.

Credits across 5 commits

Author
David Rowley1 LLM3
Reviewer
Andres Freund2
Peter Eisentraut2
Reported by
Greg Nancarrow1
Committer
David Rowley5

N LLM means N of the credits come from LLM analysis, not from commit trailers.