Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

From: Max Johnson <max(dot)johnson(at)novatechautomation(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.
Date: 2024-09-27 14:48:01
Message-ID: CO1PR07MB9052F0E98A65881F38775C7D8D6B2@CO1PR07MB9052.namprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I think that it would be a good idea to include these fixes in the next minor release. After working for a couple months on getting our embedded systems 2038 compliant, it has become very apparent that 2038 will be a substantial ordeal. Maximizing the number of systems that include this fix would make things a little easier when that time comes around.

Thanks,

Max
________________________________
From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Sent: Thursday, September 26, 2024 9:38 PM
To: Max Johnson <max(dot)johnson(at)novatechautomation(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org <pgsql-hackers(at)postgresql(dot)org>; tgl(at)sss(dot)pgh(dot)pa(dot)us <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

On Wed, Sep 25, 2024 at 08:04:59PM +0000, Max Johnson wrote:
> I think your patch looks good, no objections. I am happy to have contributed.

Great. I've attached what I have staged for commit.

My first instinct was to not bother back-patching this since all
currently-supported versions will have been out of support for over 8 years
by the time this becomes a practical issue. However, I wonder if it makes
sense to back-patch for the kinds of 32-bit embedded systems you cited
upthread. I can imagine that such systems might need to work for a very
long time without any software updates, in which case it'd probably be a
good idea to make this fix available in the next minor release. What do
you think?

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-09-27 15:34:42 Re: MAINTAIN privilege -- what do we need to un-revert it?
Previous Message Shubham Khanna 2024-09-27 14:46:54 Re: Pgoutput not capturing the generated columns