Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL-Dev <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently
Date: 2018-02-27 15:06:04
Message-ID: CAGTBQpbHkWJ3NzAhGTVv=h-MQW2c74e-fPnuzhF_i2VZN+NC0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 26, 2018 at 10:20 PM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> Thank you for updating patches!
>
> 0001 patch looks good to me except for the following unnecessary empty lines.
>
> + * If there are no indexes then we should periodically
> vacuum the FSM
> + * on huge relations to make free space visible early.
> + */
> + else if (nindexes == 0 && fsm_updated_pages >
> vacuum_fsm_every_pages)
> + {
> + /* Vacuum the Free Space Map */
> + FreeSpaceMapVacuum(onerel, max_freespace);
> + fsm_updated_pages = 0;
> + max_freespace = 0;
> + }
> +
> +
> + /*
>
> @@ -913,10 +967,14 @@ lazy_scan_heap(Relation onerel, int options,
> LVRelStats *vacrelstats,
>
> vmbuffer, InvalidTransactionId,
>
> VISIBILITYMAP_ALL_VISIBLE | VISIBILITYMAP_ALL_FROZEN);
> END_CRIT_SECTION();
> +
> }
>
> 0002 patch looks good to me.
>
> For 0003 patch, I think fsm_set() function name could lead misreading
> because it actually not only sets the value but also returns the
> value. fsm_set_and_get() might be better?

Attached is the patchset modified as requested

Attachment Content-Type Size
0001-Vacuum-Update-FSM-more-frequently-v7.patch text/x-patch 14.9 KB
0002-Vacuum-do-a-partial-FSM-vacuum-at-the-beginning-v4.patch text/x-patch 2.2 KB
0003-FSM-Fix-relation-extension-FSM-update-v2.patch text/x-patch 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2018-02-27 15:21:26 Re: MSVC builld of 9.5.12 is broken?
Previous Message Anastasia Lubennikova 2018-02-27 14:41:38 Reopen logfile on SIGHUP