Re: Proposal: GetOldestXminExtend for ignoring arbitrary vacuum flags

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: "Seki, Eiji" <seki(dot)eiji(at)jp(dot)fujitsu(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Subject: Re: Proposal: GetOldestXminExtend for ignoring arbitrary vacuum flags
Date: 2017-03-16 04:29:17
Message-ID: CAJrrPGeXE8aDGYe5dUySens5PVZk2dRbiryyY6Go+iorF83VbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 24, 2017 at 3:17 PM, Seki, Eiji <seki(dot)eiji(at)jp(dot)fujitsu(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-03-16 04:36:51 Re: multivariate statistics (v25)
Previous Message Amit Kapila 2017-03-16 04:09:37 Re: Write Ahead Logging for Hash Indexes