Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags - Mailing list pgsql-hackers

From Haribabu Kommi
Subject Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags
Date
Msg-id CAJrrPGeXE8aDGYe5dUySens5PVZk2dRbiryyY6Go+iorF83VbA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags  ("Seki, Eiji" <seki.eiji@jp.fujitsu.com>)
Responses Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Feb 24, 2017 at 3:17 PM, Seki, Eiji <seki.eiji@jp.fujitsu.com> wrote:

Thank you for your comments.

I reflected these comments to the attached patch. And I renamed IGNORE_XXX flags to PROCARRAY_XXX flags.

I checked the latest patch and I have some comments.

+static int
+ConvertProcarrayFlagToProcFlag(int flags)

I feel this function is not needed, if we try to maintain same flag values
for both PROC_XXX and PROCARRAY_XXX by writing some comments
in the both the declarations place to make sure that the person modifying
the flag values needs to update them in both the places. I feel it is usually
rare that the flag values gets changed.

+ * Now, flags is used only for ignoring backends with some flags. 

How about writing something like below.

The flags are used to ignore the backends in calculation when any of the
corresponding flags is set.

+#define PROCARRAY_A_FLAG_VACUUM

How about changing the flag name to PROCARRAY_VACUUM_FLAG
(similar changes to other declarations)


+/* Use these flags in GetOldestXmin as "flags" */

Add some comments here to explain how to use these flags.

+#define PROCARRAY_FLAGS_DEFAULT

same here also as PROCARRAY_DEFAULT_FLAGS
(similar changes to other declarations)


Regards,
Hari Babu
Fujitsu Australia

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Write Ahead Logging for Hash Indexes
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] multivariate statistics (v25)