Re: autovacuum and orphaned large objects - Mailing list pgsql-hackers

From Robert Haas
Subject Re: autovacuum and orphaned large objects
Date
Msg-id CA+TgmobAmtD51E=V5nOZSkWSPA1+Y_XaBsXcynFakd-Y2BqkDw@mail.gmail.com
Whole thread Raw
In response to autovacuum and orphaned large objects  (Euler Taveira de Oliveira <euler@timbira.com>)
Responses Re: autovacuum and orphaned large objects  (Euler Taveira de Oliveira <euler@timbira.com>)
List pgsql-hackers
On Mon, Oct 24, 2011 at 12:56 AM, Euler Taveira de Oliveira
<euler@timbira.com> wrote:
> The main point of autovacuum is maintenance tasks. Currently, it executes
> VACUUM and ANALYZE commands. I want to propose that we incorporate vacuumlo
> functionality into it. While dealing with large objects (LO), we have lo
> contrib module that helps with LO maintenance but has some limitations (does
> not handle DROP TABLE and TRUNCATE cases) and vacuumlo that does an
> excellent job but have to be executed outside DBMS. The proposal is to clean
> up LO when autovacuum triggers VACUUM; cleanup LO routine will starts
> after(?) VACUUM command.
>
> In a near future I want to propose that orphaned LO be cleaned up by VACUUM
> but that a history for another thread...
>
> Comments?

I think the main reason why vacuumlo is a contrib module rather than
in core is that it is just a heuristic, and it might not be what
everyone wants to do.  You could store a bunch of large objects in the
database and use the returned OIDs to generate links that you email to
users, and then when the user clicks on the link we retrieve the
corresponding LO and send it to the user over HTTP.  In that design,
there are no tables in the database at all, yet the large objects
aren't orphaned.

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


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: loss of transactions in streaming replication
Next
From: Jan Urbański
Date:
Subject: Re: [9.1] unusable for large views