On Thu, Aug 22, 2024 at 11:28 AM Mark Dilger
<[email protected]> wrote:
> > On Aug 22, 2024, at 1:36 AM, Alexandra Wang <[email protected]>
> > wrote:
> > "make installcheck" for treeb is causing issues on my end. I can
> > investigate further if it’s not a problem for others.
>
> The test module index AMs are not intended for use in any installed database,
> so 'make installcheck' is unnecessary. A mere 'make check' should suffice.
> However, if you want to run it, you can install the modules, edit
> postgresql.conf to add 'treeb' to shared_preload_libraries, restart the
> server, and run 'make installcheck'. This is necessary for 'treeb' because
> it requests shared memory, and that needs to be done at startup.
Thanks, Mark. This works, and I can run treeb now.
> The v18 patch set includes the changes your patches suggest, though I
> modified the approach a bit. Specifically, rather than standardizing on
> '1.0.0' for the module versions, as your patches do, I went with '1.0', as is
> standard in other modules in neighboring directories. The '1.0.0' numbering
> was something I had been using in versions 1..16 of this patch, and I only
> partially converted to '1.0' before posting v17, so sorry about that. The
> v18 patch also has some whitespace fixes.
>
> To address your comments about the noise in the test failures, v18 modifies
> the clone_tests.pl script to do a little more work translating the expected
> output to expect the module's AM name ("xash", "xtree", "treeb", or whatnot)
> beyond what that script did in v17.
Thanks! I see fewer failures now.
There are a few occurrences of the following error when I run "make
check" in the xtree module:
+ERROR: bogus RowCompare index qualification
I needed to specify `amroutine->amcancrosscompare = true;` in xtree.c
to eliminate them, as below:
diff --git a/src/test/modules/xtree/access/xtree.c
b/src/test/modules/xtree/access/xtree.c
index bd472edb04..960966801d 100644
--- a/src/test/modules/xtree/access/xtree.c
+++ b/src/test/modules/xtree/access/xtree.c
@@ -33,6 +33,7 @@ xtree_indexam_handler(PG_FUNCTION_ARGS)
amroutine->amoptsprocnum = BTOPTIONS_PROC;
amroutine->amcanorder = true;
amroutine->amcanhash = false;
+ amroutine->amcancrosscompare = true;
amroutine->amcanorderbyop = false;
amroutine->amcanbackward = true;
amroutine->amcanunique = true;
After adding that, the regression.diffs for the xtree and treeb
modules are identical in content, with only plan diffs remaining. I
think this change should be either part of
v18-0008-Generalize-hash-and-ordering-support-in-amapi.patch or a
separate commit, similar to
v18-0009-Adjust-treeb-to-use-amcanhash-and-amcancrosscomp.patch.
Best,
Alex