From: | "Bossart, Nathan" <bossartn(at)amazon(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: A few new options for vacuumdb |
Date: | 2019-01-31 02:28:05 |
Message-ID: | ABDB7F5F-C30D-4CEF-855F-9A53B1049F49@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 1/30/19, 6:04 PM, "Michael Paquier" <michael(at)paquier(dot)xyz> wrote:
> Something which was not correct in the patch is the compatibility of
> the query. xid <> xid has been added in 9.6, so the new options will
> not be able to work with older versions. The versions marked as
> compatible in the last patch came from the age-ing functions, but you
> added direct comparisons with relfrozenxid and relminmxid in the
> latest versions of the patch. This implementation goes down a couple
> of released versions, which is useful enough in my opinion, so I would
> keep it as-is.
Agreed. Thanks for catching this.
> I have added as well some markups around "PostgreSQL" in the docs, and
> extra casts for the integer/xid values of the query. The test
> patterns are also simplified, and I added tests for incorrect values
> of --min-xid-age and --min-mxid-age. Does that look correct to you?
It looks good to me. The only thing I noticed is the use of
relfrozenxid instead of relminmxid here:
+ appendPQExpBuffer(&catalog_query,
+ " %s GREATEST(pg_catalog.mxid_age(c.relminmxid),"
+ " pg_catalog.mxid_age(t.relminmxid)) OPERATOR(pg_catalog.>=)"
+ " '%d'::pg_catalog.int4\n"
+ " AND c.relfrozenxid OPERATOR(pg_catalog.!=)"
+ " '0'::pg_catalog.xid\n",
+ has_where ? "AND" : "WHERE", vacopts->min_mxid_age);
However, that may still work as intended.
Nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-01-31 03:07:55 | Re: Proposed refactoring of planner header files |
Previous Message | Michael Paquier | 2019-01-31 02:19:11 | Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well |