Re: Postgresql backend to perform vacuum automatically - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Postgresql backend to perform vacuum automatically
Date
Msg-id 9864.1015513300@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgresql backend to perform vacuum automatically  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
List pgsql-hackers
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
>> Not possible unless you are willing to have SELECTs grab much stronger
>> locks than they do now (viz, the same kind of lock that VACUUM does).

> I am talking about slots, that are marked deleted before oldest tx in progress.
> It should be possible to overwrite those only with the "pin" on the page.

No, it is not.

You can't physically remove a tuple before you've removed all index
entries that point to it.  That requires, at minimum, a table lock that
ensures that no new indexes are being created meanwhile.  Which is what
VACUUM uses.

There's also a serious question about whether this would really improve
performance.  "Retail" deletion of index tuples would be fairly
inefficient over the long run, compared to the bulk deletion technique
used by VACUUM.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: [SQL] Uniqueness of rule, constraint, and trigger names
Next
From: Fernando Nasser
Date:
Subject: Current cvs source regression: create_function_1.out