Re: Add support for AT LOCAL - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add support for AT LOCAL
Date
Msg-id ZSyYqySa74x_RAH_@paquier.xyz
Whole thread Raw
In response to Re: Add support for AT LOCAL  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Add support for AT LOCAL
List pgsql-hackers
On Mon, Oct 16, 2023 at 11:50:08AM +1300, Thomas Munro wrote:
> On Mon, Oct 16, 2023 at 11:24 AM Thomas Munro <thomas.munro@gmail.com> wrote:
>> On Mon, Oct 16, 2023 at 10:57 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I'm tempted to wonder if this helps:
>>>
>>> -       result->time = t->time + (t->zone - tz) * USECS_PER_SEC;
>>> +       result->time = t->time + (int64) (t->zone - tz) * USECS_PER_SEC;

All that should use TZNAME_FIXED_OFFSET as timezone type, and I don't
really see why this would overflow..

Perhaps a more aggressive (int64) ((t->zone - (int64) tz) *
USECS_PER_SEC) would help?

>> I wanted to be able to try this and any other theories and managed to
>> build the tip of master on cfarm111 with the same CC and CFLAGS as
>> Noah used, but the problem didn't reproduce!  Hmm, I didn't enable any
>> extra options, so now I'm wondering if something in some random header
>> somewhere is involved here...  trying again with more stuff turned
>> on...
>
> Oh, I can't use any of the handrolled packages in ~nm due to
> permissions.  I tried enabling perl from /opt/freeware (perl is my
> usual first guess for who is !@#$ing with the system headers), but the
> test passes.

Another theory would be one of these weird compiler optimization issue
from xlc?  In recent history, there was 8d2a01ae12cd.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add support for AT LOCAL
Next
From: Michael Paquier
Date:
Subject: Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag