pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone.
@ 2023-10-17 17:10 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2023-10-17 17:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Dodge a compiler bug affecting timetz_zone/timetz_izone.

Use a modulo operator instead of implementing the same behavior
with a loop.  The loop solution is doubtless microscopically
faster for the typical case of only wrapping into the very next
day, but maybe not so much for large interval values.  In any
case, timetz is such a backwater that it's doubtful anybody
would notice any performance change anyway.

This avoids a compiler bug occurring in AIX's xlc, even in pretty
late-model revisions.

We did not have test coverage for the case where the initial
result->time value is negative, so add that.

For the moment, install this only in HEAD.  My plan is to
back-patch the test case, and then the code change assuming that
buildfarm testing proves the bug occurs in the back branches.
(That seems pretty likely, but let's find out for sure.)

Per buildfarm results from commits 97957fdba and 2f0472030.
Thanks to Michael Paquier for the idea to use a modulo operation
to replace the faulty loop.

Discussion: https://postgr.es/m/CA+hUKGK=DOC+hE-62FKfZy=Ybt5uLkrg3zCZD-jFykM-iPn8yw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/19fa977311b9da9c6c84f0108600e78213751a38

Modified Files
--------------
src/backend/utils/adt/date.c         | 10 ++++++----
src/test/regress/expected/timetz.out | 21 +++++++++++++++++++++
src/test/regress/sql/timetz.sql      |  5 +++++
3 files changed, 32 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone.
@ 2023-10-20 17:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2023-10-20 17:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Dodge a compiler bug affecting timetz_zone/timetz_izone.

This avoids a compiler bug occurring in AIX's xlc, even in pretty
late-model revisions.  Buildfarm testing has now confirmed that
only 64-bit xlc is affected.  Although we are contemplating
dropping support for xlc in v17, it's still supported in the
back branches, so we need this fix.

Back-patch of code changes from HEAD commit 19fa97731.
(The test cases were already back-patched, in 4a427b82c et al.)

Discussion: https://postgr.es/m/CA+hUKGK=DOC+hE-62FKfZy=Ybt5uLkrg3zCZD-jFykM-iPn8yw@mail.gmail.com

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1ad3a7bd396a802566239fa37e3435df20603d8b

Modified Files
--------------
src/backend/utils/adt/date.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone.
@ 2023-10-20 17:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2023-10-20 17:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Dodge a compiler bug affecting timetz_zone/timetz_izone.

This avoids a compiler bug occurring in AIX's xlc, even in pretty
late-model revisions.  Buildfarm testing has now confirmed that
only 64-bit xlc is affected.  Although we are contemplating
dropping support for xlc in v17, it's still supported in the
back branches, so we need this fix.

Back-patch of code changes from HEAD commit 19fa97731.
(The test cases were already back-patched, in 4a427b82c et al.)

Discussion: https://postgr.es/m/CA+hUKGK=DOC+hE-62FKfZy=Ybt5uLkrg3zCZD-jFykM-iPn8yw@mail.gmail.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5463319acd19771ac0c986d305f66ea8fb3cc801

Modified Files
--------------
src/backend/utils/adt/date.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone.
@ 2023-10-20 17:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2023-10-20 17:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Dodge a compiler bug affecting timetz_zone/timetz_izone.

This avoids a compiler bug occurring in AIX's xlc, even in pretty
late-model revisions.  Buildfarm testing has now confirmed that
only 64-bit xlc is affected.  Although we are contemplating
dropping support for xlc in v17, it's still supported in the
back branches, so we need this fix.

Back-patch of code changes from HEAD commit 19fa97731.
(The test cases were already back-patched, in 4a427b82c et al.)

Discussion: https://postgr.es/m/CA+hUKGK=DOC+hE-62FKfZy=Ybt5uLkrg3zCZD-jFykM-iPn8yw@mail.gmail.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/85c9dda818878149f3d248d5e09e03c4f26f436c

Modified Files
--------------
src/backend/utils/adt/date.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone.
@ 2023-10-20 17:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2023-10-20 17:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Dodge a compiler bug affecting timetz_zone/timetz_izone.

This avoids a compiler bug occurring in AIX's xlc, even in pretty
late-model revisions.  Buildfarm testing has now confirmed that
only 64-bit xlc is affected.  Although we are contemplating
dropping support for xlc in v17, it's still supported in the
back branches, so we need this fix.

Back-patch of code changes from HEAD commit 19fa97731.
(The test cases were already back-patched, in 4a427b82c et al.)

Discussion: https://postgr.es/m/CA+hUKGK=DOC+hE-62FKfZy=Ybt5uLkrg3zCZD-jFykM-iPn8yw@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f4f55d5124a9d77158f93ac5a5861a0c80d27893

Modified Files
--------------
src/backend/utils/adt/date.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone.
@ 2023-10-20 17:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2023-10-20 17:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Dodge a compiler bug affecting timetz_zone/timetz_izone.

This avoids a compiler bug occurring in AIX's xlc, even in pretty
late-model revisions.  Buildfarm testing has now confirmed that
only 64-bit xlc is affected.  Although we are contemplating
dropping support for xlc in v17, it's still supported in the
back branches, so we need this fix.

Back-patch of code changes from HEAD commit 19fa97731.
(The test cases were already back-patched, in 4a427b82c et al.)

Discussion: https://postgr.es/m/CA+hUKGK=DOC+hE-62FKfZy=Ybt5uLkrg3zCZD-jFykM-iPn8yw@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d8c2877b9efafd37505f3cbb2cc2a7072d955667

Modified Files
--------------
src/backend/utils/adt/date.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone.
@ 2023-10-20 17:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2023-10-20 17:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Dodge a compiler bug affecting timetz_zone/timetz_izone.

This avoids a compiler bug occurring in AIX's xlc, even in pretty
late-model revisions.  Buildfarm testing has now confirmed that
only 64-bit xlc is affected.  Although we are contemplating
dropping support for xlc in v17, it's still supported in the
back branches, so we need this fix.

Back-patch of code changes from HEAD commit 19fa97731.
(The test cases were already back-patched, in 4a427b82c et al.)

Discussion: https://postgr.es/m/CA+hUKGK=DOC+hE-62FKfZy=Ybt5uLkrg3zCZD-jFykM-iPn8yw@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e98f47d570a22e7aaaf71b79d6ce6852701bbd8d

Modified Files
--------------
src/backend/utils/adt/date.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2023-10-20 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17 17:10 pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone. Tom Lane <tgl@sss.pgh.pa.us>
2023-10-20 17:40 pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone. Tom Lane <tgl@sss.pgh.pa.us>
2023-10-20 17:40 pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone. Tom Lane <tgl@sss.pgh.pa.us>
2023-10-20 17:40 pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone. Tom Lane <tgl@sss.pgh.pa.us>
2023-10-20 17:40 pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone. Tom Lane <tgl@sss.pgh.pa.us>
2023-10-20 17:40 pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone. Tom Lane <tgl@sss.pgh.pa.us>
2023-10-20 17:40 pgsql: Dodge a compiler bug affecting timetz_zone/timetz_izone. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox