gistVacuumUpdate

Lists: pgsql-hackers
From: yamt(at)mwd(dot)biglobe(dot)ne(dot)jp (YAMAMOTO Takashi)
To: pgsql-hackers(at)postgresql(dot)org
Subject: gistVacuumUpdate
Date: 2012-01-13 04:24:12
Message-ID: 20120113042412.564D814A1A0@mail.netbsd.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

hi,

gistVacuumUpdate was removed when old-style VACUUM FULL was removed.
i wonder why.
it was not practical and REINDEX is preferred?

anyway, the removal seems incomplete and there are some leftovers:
F_TUPLES_DELETED
F_DELETED
XLOG_GIST_PAGE_DELETE

YAMAMOTO Takashi


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: YAMAMOTO Takashi <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: gistVacuumUpdate
Date: 2012-01-18 15:05:57
Message-ID: 4F16DFD5.1000506@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 13.01.2012 06:24, YAMAMOTO Takashi wrote:
> hi,
>
> gistVacuumUpdate was removed when old-style VACUUM FULL was removed.
> i wonder why.
> it was not practical and REINDEX is preferred?
>
> anyway, the removal seems incomplete and there are some leftovers:
> F_TUPLES_DELETED
> F_DELETED
> XLOG_GIST_PAGE_DELETE

Hmm, in theory we might bring back support for deleting pages in the
future, I'm guessing F_DELETED and the WAL record type were left in
place because of that. Either that, or it was an oversight. It's also
good to have the F_DELETED/F_TUPLES_DELETED around, so that new versions
don't get confused if they see those set in GiST indexes that originate
from an old cluster, upgraded to new version with pg_upgrade. For that
purpose, a comment explaining what those used to be would've been
enough, though.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: yamt(at)mwd(dot)biglobe(dot)ne(dot)jp (YAMAMOTO Takashi)
To: heikki(dot)linnakangas(at)enterprisedb(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: gistVacuumUpdate
Date: 2012-01-18 21:38:44
Message-ID: 20120118213844.88E0D14A1E9@mail.netbsd.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

hi,

> On 13.01.2012 06:24, YAMAMOTO Takashi wrote:
>> hi,
>>
>> gistVacuumUpdate was removed when old-style VACUUM FULL was removed.
>> i wonder why.
>> it was not practical and REINDEX is preferred?
>>
>> anyway, the removal seems incomplete and there are some leftovers:
>> F_TUPLES_DELETED
>> F_DELETED
>> XLOG_GIST_PAGE_DELETE
>
> Hmm, in theory we might bring back support for deleting pages in the
> future, I'm guessing F_DELETED and the WAL record type were left in
> place because of that. Either that, or it was an oversight. It's also
> good to have the F_DELETED/F_TUPLES_DELETED around, so that new versions
> don't get confused if they see those set in GiST indexes that originate
> from an old cluster, upgraded to new version with pg_upgrade. For that
> purpose, a comment explaining what those used to be would've been
> enough, though.

the loop in gistvacuumcleanup to search F_DELETED pages seems too expensive
for pg_upgrade purpose.
(while it also checks PageIsNew, is it alone worth the loop?)

i'm wondering because what gistVacuumUpdate used to do does not seem to
be necessarily tied to the old-style VACUUM FULL.
currently, no one will re-union keys after tuple removals, right?

YAMAMOTO Takashi

>
> --
> Heikki Linnakangas
> EnterpriseDB http://www.enterprisedb.com


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: YAMAMOTO Takashi <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: gistVacuumUpdate
Date: 2012-01-20 22:53:45
Message-ID: 4F19F079.6010304@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 18.01.2012 23:38, YAMAMOTO Takashi wrote:
> i'm wondering because what gistVacuumUpdate used to do does not seem to
> be necessarily tied to the old-style VACUUM FULL.
> currently, no one will re-union keys after tuple removals, right?

Right. I believe gistVacuumUpdate needed an AccessExclusiveLock, so now
that VACUUM FULL is gone, there is no good moment to do it.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: YAMAMOTO Takashi <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: gistVacuumUpdate
Date: 2012-01-20 23:54:13
Message-ID: CAJKUy5iiEA-3Sq6WrObJzQrj9eTRtQB0m6_jpLRGuF3=zHHb5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jan 18, 2012 at 10:05 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> On 13.01.2012 06:24, YAMAMOTO Takashi wrote:
>>
>> hi,
>>
>> gistVacuumUpdate was removed when old-style VACUUM FULL was removed.
>> i wonder why.
>> it was not practical and REINDEX is preferred?
>>
>> anyway, the removal seems incomplete and there are some leftovers:
>>        F_TUPLES_DELETED
>>        F_DELETED
>>        XLOG_GIST_PAGE_DELETE
>
>
> Hmm, in theory we might bring back support for deleting pages in the future,
> I'm guessing F_DELETED and the WAL record type were left in place because of
> that.

I guess it was an oversight, because GistPageSetDeleted() is being
used in gistRedoPageDeleteRecord() and GistPageIsDeleted() in a few
other places

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación