Re: on_dsm_detach() callback and parallel tuplesort BufFile resource management

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: on_dsm_detach() callback and parallel tuplesort BufFile resource management
Date: 2017-03-10 02:18:19
Message-ID: CA+TgmoYma3sGv-0pXfXojhVhRJCEOdf93tmT-EsDOQ0cqOjCgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 9, 2017 at 2:19 PM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> Quite a lot of thought seems to have gone into making the
> fd.c/resowner mechanism leak-proof in the face of errors. So, quite
> apart from what that approaches misses out on, I really don't want to
> change resource management too much. As I went into in my "recap", it
> seems useful to change as little as possible about temp files.

I think this is just wishful thinking. resowners are backend-private,
and they are robust as long as they are managing files accessed by a
single backend. Trying to bend them into some kind of a state where
they can manage a resource shared across multiple cooperating backends
is fundamentally changing the model. What matters is not whether the
old model was any good but whether the new one is any good.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-03-10 02:18:24 Re: [COMMITTERS] pgsql: Fix hard-coded relkind constants in pg_dump.c.
Previous Message Tom Lane 2017-03-10 02:17:33 Re: Speed up Clog Access by increasing CLOG buffers