Re: A micro-optimisation for walkdir()

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A micro-optimisation for walkdir()
Date: 2020-09-07 06:29:02
Message-ID: CA+hUKG+JygK9yL3Qz2NqQXpgcG2wiA+uxn=3TKn274G__H8rng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 7, 2020 at 10:36 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-09-07 06:30:41 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Amit Kapila 2020-09-07 06:24:23 Re: Resetting spilled txn statistics in pg_stat_replication