Re: Performance patch for Win32

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Mark Dilger <markdilger(at)yahoo(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: Performance patch for Win32
Date: 2012-08-30 20:37:37
Message-ID: 20120830203737.GU8753@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 29, 2012 at 03:54:59PM -0700, Mark Dilger wrote:
> I was imagining that this would be a trap for linux developers
> who saw nothing wrong with their code until it made it to the
> build/test farm. That's pretty far down the development
> process. Of course, it is also a trap in the other direction, for
> Windows developers who use the pattern but do not include
> anything equivalent for the non-Windows execution path.
>
> On the whole, however, your argument in favor of tighter
> patterns might be more convincing than my argument in favor
> of catching bugs sooner.
>
> I will start implementing your suggestion for patch v2.

Any progress on this?

---------------------------------------------------------------------------

>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> To: Mark Dilger <markdilger(at)yahoo(dot)com>
> Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
> Sent: Tuesday, May 29, 2012 3:42 PM
> Subject: Re: [HACKERS] Performance patch for Win32
>
> Mark Dilger <markdilger(at)yahoo(dot)com> writes:
> > I am hesitant to write a function like AllocateDirWithFilePattern
> > if the pattern is simply ignored on non-Windows. In my patch,
> > the pattern underspecified the files, and the ad-hoc matching code
> > applied to all the returned files tightened that up. But a person
> > could just as well overspecify the pattern and then they would get
> > different behavior on Windows vs. non-Windows, with fewer
> > files returned by FindNextFile() than would have matched the
> > ad-hoc pattern.
>
> Well, if you're imagining that we wouldn't need to test carefully on
> both Windows and non-Windows, I think that's a pipe dream. As an
> example, your proposal of AllocateDirWithFilePrefix would only work
> consistently across platforms if the prefix didn't contain anything
> that Windows thought was a pattern metacharacter. (This might never
> come up, but I'm not too sure what the metacharacters are on Windows.)
>
> Having said that, I have nothing particularly against the idea of
> specifying a prefix rather than an arbitrary pattern. I'm just
> saying it'll still need testing. Also, I wonder how many of the
> potential stat-equivalent operations we'll be unable to optimize
> away with the more restricted definition. Using a tighter pattern
> on Windows seems basically free (modulo testing) if we accept that
> it's Windows-only.
>
> regards, tom lane
>
>

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-08-30 20:40:48 Re: We're not lax enough about maximum time zone offset from UTC
Previous Message Bruce Momjian 2012-08-30 20:27:17 Re: --disable-shared is entirely broken these days