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

From: Jing Wang <jingwangian(at)gmail(dot)com>
To: Claudio Freire <klaussfreire(at)gmail(dot)com>
Cc: PostgreSQL-Dev <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently
Date: 2017-11-27 05:39:53
Message-ID: CAF3+xMKMxXEZTvJ=F_VqtfKJktRUVZMBZ5q6aASGmoG6D3NHug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A few general comments.

+ FreeSpaceMapVacuum(onerel, 64);

Just want to know why '64' is used here? It's better to give a description.

+ else
+ {
+ newslot = fsm_get_avail(page, 0);
+ }

Since there is only one line in the else the bracket will not be needed.
And there in one more space ahead of else which should be removed.

+ if (nindexes == 0 &&
+ (vacuumed_pages_at_fsm_vac - vacuumed_pages) >
vacuum_fsm_every_pages)
+ {
+ /* Vacuum the Free Space Map */
+ FreeSpaceMapVacuum(onerel, 0);
+ vacuumed_pages_at_fsm_vac = vacuumed_pages;
+ }

vacuumed_pages_at_fsm_vac is initialised with value zero and seems no
chance to go into the bracket.

Regards,
Jing Wang
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2017-11-27 06:28:35 [PATCH] Atomic pgrename on Windows
Previous Message Etsuro Fujita 2017-11-27 05:38:12 Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables