Re: Write visibility map during CLUSTER/VACUUM FULL

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Write visibility map during CLUSTER/VACUUM FULL
Date: 2019-09-11 12:30:09
Message-ID: CAA4eK1JiDDzemcKWP83rVUztj2XW6-QNXwiw2vXpcPJOD2ivrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 1, 2019 at 1:37 PM Alexander Korotkov
<a(dot)korotkov(at)postgrespro(dot)ru> wrote:
>
> Hi!
>
> 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?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2019-09-11 12:32:05 Re: A problem presentaion about ECPG, DECLARE STATEMENT
Previous Message Robert Haas 2019-09-11 12:24:30 Re: Change atoi to strtol in same place