Re: Postmaster holding unlinked files for pg_largeobject table

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>, alexk <alexk(at)commandprompt(dot)com>, Alexander Shulgin <ash(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postmaster holding unlinked files for pg_largeobject table
Date: 2011-06-06 17:04:41
Message-ID: 1307379818-sup-2333@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Excerpts from Tom Lane's message of lun jun 06 12:49:46 -0400 2011:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Mon, Jun 6, 2011 at 12:30 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> On reflection I think this behavior is probably limited to the case
> >> where we've done what we used to call a "blind write" of a block that
> >> is unrelated to our database or tables. For normal SQL-driven accesses,
> >> there's a relcache entry, and flushing of that entry will lead to
> >> closure of associated files. I wonder whether we should go back to
> >> forcibly closing the FD after a blind write. This would suck if a
> >> backend had to do many dirty-buffer flushes for the same relation,
> >> but hopefully the bgwriter is doing most of those. We'd want to make
> >> sure such forced closure *doesn't* occur in the bgwriter. (If memory
> >> serves, it has a checkpoint-driven closure mechanism instead.)
>
> > Instead of closing them immediately, how about flagging the FD and
> > closing all the flagged FDs at the end of each query, or something
> > like that?
>
> Hmm, there's already a mechanism for closing "temp" FDs at the end of a
> query ... maybe blind writes could use temp-like FDs?

OK, I'll have a look at how blind writes work this afternoon and propose
something.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2011-06-06 17:32:57 Re: How to log query's from servers ?
Previous Message Tom Lane 2011-06-06 16:49:46 Re: Postmaster holding unlinked files for pg_largeobject table

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2011-06-06 17:13:40 Re: Range Types and extensions
Previous Message Alvaro Herrera 2011-06-06 17:03:01 Re: patch: Allow \dd to show constraint comments