[Mobilitydb-dev] Configuring for a Particular PostgreSQL on Ubuntu

Esteban Zimanyi estebanzimanyi at gmail.com
Wed May 25 07:05:17 PDT 2022


Dear Regina

The patch for PG 15 is now on the develop branch
https://github.com/MobilityDB/MobilityDB/blob/develop/src/point/tpoint.c#L49

I will look at the other issue ASAP.

Regards

Esteban

On Wed, May 25, 2022 at 3:41 PM Regina Obe <lr at pcorp.us> wrote:

> I put the postgis-3.0 in shared libraries and I tried and restarted my
> service but I get the same issue failing at CREATE EXTENSION on my PG14.3
> instance during the tests.
>
> Works fine when I run things.
>
>
>
> I see you are creating a new cluster and have the shared happen during
> that.  All paths at a in the test.sh look okay.
>
>
>
> The logs show:
>
> 3/112 Testing: create_extension
>
> 3/112 Test: create_extension
>
> Command: "/home/robe/projects/MobilityDB/build/test/scripts/test.sh"
> "create_ext"
>
> Directory: /home/robe/projects/MobilityDB/build/test/scripts
>
> "create_extension" start time: May 25 13:31 UTC
>
> Output:
>
> ----------------------------------------------------------
>
> pg_ctl: server is running (PID: 7237)
>
> /usr/lib/postgresql/14/bin/postgres "-D"
> "/home/robe/projects/MobilityDB/build/tmptest/db" "-k"
> "/home/robe/projects/MobilityDB/build/tmptest/lock" "-h" ""
>
> <end of output>
>
> Test time =  18.62 sec
>
> ----------------------------------------------------------
>
> Test Failed.
>
> "create_extension" end time: May 25 13:31 UTC
>
> "create_extension" time elapsed: 00:00:18
>
> ----------------------------------------------------------
>
>
>
>
>
>
>
> BTW is there a reason you removed your PG15 patch fix branch.  I didn’t
> see the code committed anywhere yet and I made the mistake of updating and
> now can’t CREATE EXTENSION against PG15 doesn’t work anymore L
>
>
>
> *From:* Esteban Zimanyi [mailto:estebanzimanyi at gmail.com]
> *Sent:* Monday, May 23, 2022 4:19 PM
> *To:* Regina Obe <lr at pcorp.us>
> *Cc:* SAKR Mahmoud <mahmoud.sakr at ulb.be>; SCHOEMANS Maxime <
> Maxime.Schoemans at ulb.be>; mobilitydb-dev at lists.osgeo.org
> *Subject:* Re: [Mobilitydb-dev] Configuring for a Particular PostgreSQL
> on Ubuntu
>
>
>
> Maybe you can test on your PG 14 installation to preload PostGIS and run
> the tests. This should work
>
>
> https://github.com/MobilityDB/MobilityDB/runs/6557831697?check_suite_focus=true
>
>
>
>
>
> On Mon, May 23, 2022, 22:11 Esteban Zimanyi <estebanzimanyi at gmail.com>
> wrote:
>
> Dear Regina
>
>
>
> I suspect that a possible cause for this problem is that PG 15 does not
> really preload the postgis-3 extension. This is why you have the output as
> myself that the MobilityDB extension failed at test 3/114. The output I
> sent you in the previous email was the log of this operation.
>
>
>
> How to test whether the PostGIS extension is fully loaded before running
> the SQL script of the MobilityDB extension ?
>
>
>
>
>
> On Mon, May 23, 2022, 21:50 Regina Obe <lr at pcorp.us> wrote:
>
> Esteban,
>
>
>
> I tried your branch and was able to do
>
>
>
> CREATE EXTENSION mobilitydb;
>
>
>
> It took longer than the PG14 install though for that to run.  Noticably
> slower but not a hug deal:
>
>
>
> CREATE EXTENSION Query returned successfully in 6 secs 898 msec.
>
>
>
> As far as running the tests, it fails for me too, but I’m not sure it’s
> targeting the right thing, is there a debug setting (sorry not too familiar
> with cmake).
>
> I however did not bother pre-loading postgis-3, the PG14, PG15 tests I did
> worked without preload, but maybe it was because I had run some postgis
> stuff beforehand.
>
>
>
> Test project /home/robe/projects/MobilityDB/build
>
>         Start   1: build
>
>   1/114 Test   #1: build ..............................   Passed    0.35
> sec
>
>         Start   2: setup
>
>   2/114 Test   #2: setup ..............................   Passed    5.03
> sec
>
>         Start   3: create_extension
>
>   3/114 Test   #3: create_extension ...................***Failed   18.16
> sec
>
>         Start   5: load_tables
>
> Failed test dependencies: create_extension
>
>   4/114 Test   #5: load_tables ........................***Not Run   0.00
> sec
>
>         Start   6: 001_period
>
>
>
>
>
>
>
>
>
> *From:* Regina Obe [mailto:lr at pcorp.us]
> *Sent:* Monday, May 23, 2022 11:49 AM
> *To:* 'Esteban Zimanyi' <estebanzimanyi at gmail.com>
> *Cc:* 'SAKR Mahmoud' <mahmoud.sakr at ulb.be>; 'SCHOEMANS Maxime' <
> Maxime.Schoemans at ulb.be>; 'mobilitydb-dev at lists.osgeo.org' <
> mobilitydb-dev at lists.osgeo.org>
> *Subject:* RE: [Mobilitydb-dev] Configuring for a Particular PostgreSQL
> on Ubuntu
>
>
>
> Great news.  Thanks.  I’ll give it another try. I’ll check on the tests.
>
>
>
> I couldn’t run the tests when I changed to compile against PG14 (but
> queries ran fine), so I suspect the tests might be hard-wired to run
> against your default PostgreSQL, which in my case is PG15.
>
>
>
> *From:* Esteban Zimanyi [mailto:estebanzimanyi at gmail.com
> <estebanzimanyi at gmail.com>]
> *Sent:* Monday, May 23, 2022 11:38 AM
> *To:* Regina Obe <lr at pcorp.us>
> *Cc:* SAKR Mahmoud <mahmoud.sakr at ulb.be>; SCHOEMANS Maxime <
> Maxime.Schoemans at ulb.be>
> *Subject:* Re: [Mobilitydb-dev] Configuring for a Particular PostgreSQL
> on Ubuntu
>
>
>
> Dear Regina
>
>
>
> Many thanks for giving such detailed feedback for solving the issue of the
> pg_atoi missing function in PG_15. For a quick solution I have copy/pasted
> the original function that I only enable if PG version >= 15.
>
>
>
>
> https://github.com/estebanzimanyi/MobilityDB/blob/pgcall/src/point/tpoint.c#L49
>
>
>
> Now I can compile and use MobilityDB on PG 15 and PGIS 3.3 without any
> problem
>
>
>
>
> --------------------------------------------------------------------------------------------------------------
>
> esteban at ESTEBAN-WORKSTATION:~/src/MobilityDB/build$ psql test
> psql (15beta1)
> Type "help" for help.
>
> test=# create extension mobilitydb cascade;
> NOTICE:  installing required extension "postgis"
> CREATE EXTENSION
> test=# select mobilitydb_full_version();
>                mobilitydb_full_version
> -----------------------------------------------------
>  MobilityDB 1.0.0, PostgreSQL 15beta1, PostGIS 3.3.0
> (1 row)
>
> test=# select tintersects(tgeompoint '[Point(1 1)@2000-01-01, Point(3
> 3)@2000-01-03]',
>   tgeompoint '[Point(1 3)@2000-01-01, Point(3 1)@2000-01-03]');
>                                                  tintersects
>
> --------------------------------------------------------------------------------------------------------------
>  {[f at 2000-01-01 00:00:00+01, t at 2000-01-02 00:00:00+01], (f at 2000-01-02
> 00:00:00+01, f at 2000-01-03 00:00:00+01]}
> (1 row)
>
> test=#
>
>
> --------------------------------------------------------------------------------------------------------------
>
>
>
> However, I cannot run the MobilityDB regression tests
>
>
>
>
> --------------------------------------------------------------------------------------------------------------
>
>
>
> esteban at ESTEBAN-WORKSTATION:~/src/MobilityDB/build$ make test
> Running tests...
> Test project /home/esteban/src/MobilityDB/build
>         Start   1: build
>   1/114 Test   #1: build ..............................   Passed    0.17
> sec
>         Start   2: setup
>   2/114 Test   #2: setup ..............................   Passed    2.97
> sec
>         Start   3: create_extension
>   3/114 Test   #3: create_extension ...................***Failed   16.41
> sec
>         Start   5: load_tables
> Failed test dependencies: create_extension
>
>
> --------------------------------------------------------------------------------------------------------------
>
>
>
> despite I have modified the postgresql.conf file as required by setting
>
>
>
> shared_preload_libraries = 'postgis-3'
>
>
>
> I have the following errors in the file
> \\wsl$\Ubuntu\home\esteban\src\MobilityDB\build\tmptest\log\create_ext.log
>
>
>
>
> --------------------------------------------------------------------------------------------------------------
>
> ...
>
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17652:
> NOTICE:  argument type stbox is only a shell
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17736:
> ERROR:  type box2d does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17740:
> ERROR:  type box3d does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17744:
> ERROR:  type geometry does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17748:
> ERROR:  type geography does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17768:
> ERROR:  type geometry does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17772:
> ERROR:  type geography does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17776:
> ERROR:  type geometry does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17780:
> ERROR:  type geography does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17782:
> ERROR:  type "box2d" does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17783:
> ERROR:  type "box3d" does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17784:
> ERROR:  type "geometry" does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17785:
> ERROR:  type "geography" does not exist
> psql:/home/esteban/src/MobilityDB/build/test_mobilitydb--1.0.0.sql:17800:
> NOTICE:  type "geometry" is not yet defined
>
> ...
>
>
> --------------------------------------------------------------------------------------------------------------
>
>
>
> Do you have any idea why this is the case ?
>
>
>
> Many thanks for your help
>
>
>
> Esteban
>
>
>
>
>
> On Sun, May 22, 2022 at 9:12 PM Regina Obe <lr at pcorp.us> wrote:
>
> I have multiple versions of PostgreSQL installed on my Ubuntu server.
>
> I can't figure out how to install against a particular version.
>
> I've tried this:
>
> cd MobilityDB
> export PGVER=14
> export PGPATH=/usr/lib/postgresql/${PGVER}
> export PATH=$PATH:/usr/lib/postgresql/${PGVER}/bin
> rm -rf build
> mkdir build
> cd build
> cmake  -DPOSTGRES_PG_CONFIG=$PGPATH/bin/pg_config  ..
>
> and I tried this:
>
> cd MobilityDB
> export PGVER=14
> export PGPATH=/usr/lib/postgresql/${PGVER}
> export PATH=$PATH:/usr/lib/postgresql/${PGVER}/bin
> rm -rf build
> mkdir build
> cd build
> cmake  -DPOSTGRES_PG_CONFIG=$PGPATH/bin/pg_config  ..
>
>
> #I also explicitly tried setting the POSTGRESQL_BIN_DIR via cmake.
> Regardless what I do it still outputs:
>
> -- POSTGRESQL_VERSION_MAJOR=15
> -- POSTGRESQL_VERSION_MINOR=0
> -- POSTGRESQL_BIN_DIR: /usr/lib/postgresql/15/bin
> -- POSTGRESQL_INCLUDE_DIR: /usr/include/postgresql/15/server
> -- POSTGRESQL_LIBRARIES: /usr/lib/aarch64-linux-gnu
> -- POSTGRESQL_SHARE_DIR: /usr/share/postgresql/15
> -- POSTGRESQL_DYNLIB_DIR: /usr/lib/postgresql/15/lib
> -- POSTGRESQL_VERSION: 15.0
>
> As I mentioned in this issue, mobilitydb does not work against PostgreSQL
> 15
>
> https://github.com/MobilityDB/MobilityDB/issues/218
>
> Thanks,
> Regina
>
>
>
> _______________________________________________
> Mobilitydb-dev mailing list
> Mobilitydb-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mobilitydb-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mobilitydb-dev/attachments/20220525/60d88169/attachment-0001.htm>


More information about the Mobilitydb-dev mailing list