Re: Write visibility map during CLUSTER/VACUUM FULL - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Write visibility map during CLUSTER/VACUUM FULL
Date
Msg-id CAPpHfdvVeHGDsry9wdEH_RtA9=Pq7SJDfKtNkrT1qoRv-6XqoA@mail.gmail.com
Whole thread Raw
In response to Re: Write visibility map during CLUSTER/VACUUM FULL  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Write visibility map during CLUSTER/VACUUM FULL
List pgsql-hackers
On Wed, Sep 11, 2019 at 3:30 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Sun, Sep 1, 2019 at 1:37 PM Alexander Korotkov
> <a.korotkov@postgrespro.ru> wrote:
> > I found it weird that CLUSTER/VACUUM FULL don't write visibility map.
> > Attached patch implements writing visibility map in
> > heapam_relation_copy_for_cluster().
> >
> > I've studied previous attempt to implement this [1].  The main problem
> > of that attempt was usage of existing heap_page_is_all_visible() and
> > visibilitymap_set() functions.  These functions works through buffer
> > manager, while heap rewriting is made bypass buffer manager.
> >
> > In my patch visibility map pages are handled in the same way as heap
> > pages are.
> >
>
> I haven't studied this patch in detail, but while glancing I observed
> that this doesn't try to sync the vm pages as we do for heap pages in
> the end (during end_heap_rewrite).  Am I missing something?

You're not missed anything.  Yes, VM need sync.  Will fix this.  And I
just noticed I need a closer look to what is going on with TOAST.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Bug in GiST paring heap comparator
Next
From: Alexander Korotkov
Date:
Subject: Re: [PATCH] ltree, lquery, and ltxtquery binary protocol support