pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Asif Naeem <anaeem.it@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: gettimeofday cause crash on Windows
Date: Thu, 12 Feb 2015 14:13:16 +0100
Message-ID: <20150212131316.GB9449@alap3.anarazel.de> (raw)
In-Reply-To: <CAB7nPqRwBtN-AZhXL=gqLipiq-ASDg=cYREDPQrsLQ0VA93ZAA@mail.gmail.com>
References: <CAEB4t-NQ4gSnFC8GfDgAeLx-rKm4-LwtUQMp-TdC6u_xRZdv1A@mail.gmail.com>
	<CAB7nPqTUVZSz0JxvQ6wJT3LKd5hrNTeC7Kv=97pC=rPFJFPhFg@mail.gmail.com>
	<20150212125412.GA9449@alap3.anarazel.de>
	<CAB7nPqRwBtN-AZhXL=gqLipiq-ASDg=cYREDPQrsLQ0VA93ZAA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2015-02-12 22:09:43 +0900, Michael Paquier wrote:
> On Thu, Feb 12, 2015 at 9:54 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> > On 2015-02-12 04:48:00 -0800, Michael Paquier wrote:
> >> I didn't follow much the thread implementing this feature, but this
> >> commit has somewhat not taken into account the fact that the contents
> >> of src/port could as well be used for the frontends, per se the
> >> comments on top of init_win32_gettimeofday mentioning only the backend
> >> startup, something not wrong in itself, but not completely right
> >> either. So what we have now is an unpleasant crash trigger for any
> >> client applications on Windows < 2k12 linking to libpqport that call
> >> gettimeofday(). I would not be surprised that we would get bug reports
> >> of the type "why my client binary crashes suddendly with 9.5" if we
> >> keep the code as-is.
> >
> >> So ISTM that your patch does the correct thing by setting
> >> pg_get_system_time to &GetSystemTimeAsFileTime to not break any
> >> existing applications, and that we should as well update any in-core
> >> binary tools to switch to the precise API
> >
> > I think I'd rather have it crash so people are forced to adjust the
> > client applications. The number of things linking to pgport should be
> > rather low.
> 
> I'd take it on the safe side, not the hard one :)

Meh. If this were libpq, I'd tend to agree, but it isn't.

> FWIW, applications are not broken if they use GetSystemTimeAsFileTime,
> simply less precise. So we should push for improvements, not mandatory
> moves without a deprecation period.

pgport isn't an actual enduser library. And we feel free to yank stuff
in/out of it all the time.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (16+ messages)  latest in thread

Message-ID: <20150212131316.GB9449@alap3.anarazel.de>
Permalink:  ../20150212131316.GB9449@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20150212131316.GB9449@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@2ndquadrant.com, michael.paquier@gmail.com, anaeem.it@gmail.com
  Subject: Re: gettimeofday cause crash on Windows
  In-Reply-To: <20150212131316.GB9449@alap3.anarazel.de>
  References: <CAEB4t-NQ4gSnFC8GfDgAeLx-rKm4-LwtUQMp-TdC6u_xRZdv1A@mail.gmail.com> <CAB7nPqTUVZSz0JxvQ6wJT3LKd5hrNTeC7Kv=97pC=rPFJFPhFg@mail.gmail.com> <20150212125412.GA9449@alap3.anarazel.de> <CAB7nPqRwBtN-AZhXL=gqLipiq-ASDg=cYREDPQrsLQ0VA93ZAA@mail.gmail.com> <20150212131316.GB9449@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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