Re: A micro-optimisation for walkdir() - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: A micro-optimisation for walkdir()
Date
Msg-id CA+hUKG+JygK9yL3Qz2NqQXpgcG2wiA+uxn=3TKn274G__H8rng@mail.gmail.com
Whole thread Raw
In response to Re: A micro-optimisation for walkdir()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Sep 7, 2020 at 10:36 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
> > Excellent.  I'd like to commit these soon, unless someone has a better
> > idea for how to name file_utils_febe.c.
>
> As long as it's in src/port or src/common, isn't it implicit that
> it's probably FE/BE common code?
>
> I think it'd make more sense to insert all this stuff into file_utils.c,
> and then just "#ifdef FRONTEND" the existing code there that doesn't work
> in backend.  For one thing, that gives us a saner upgrade path whenever
> somebody gets ambitious enough to make that code work for the backend.

True.  Ok, I committed the Unix patch that way.  I know it works on
Linux, FreeBSD, macOS and Windows (without Juan José's patch), but
I'll have to check the build farm later to make sure HPUX, AIX and
Solaris are OK with this.  It's remotely possible that one of them
defines DT_REG etc but doesn't have d_type; I'm hoping to get away
with not adding a configure check.

I'll wait a bit longer for comments on the Windows patch.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Resetting spilled txn statistics in pg_stat_replication
Next
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions