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

Esteban Zimanyi estebanzimanyi at gmail.com
Wed May 25 07:57:06 PDT 2022


I have just installed the sources and compiled PG 14.3 and I was able to
run the tests without any problems.

-----------------------------------------------------------------------------

esteban at ESTEBAN-WORKSTATION:~/src/MobilityDB/build$ make test
Running tests...
Test project /home/esteban/src/MobilityDB/build
        Start   1: build
  1/113 Test   #1: build ..............................   Passed    0.18 sec
        Start   2: setup
  2/113 Test   #2: setup ..............................   Passed    3.07 sec
        Start   3: create_extension
  3/113 Test   #3: create_extension ...................   Passed   17.20 sec
        Start   5: load_tables
  4/113 Test   #5: load_tables ........................   Passed    3.16 sec
        Start   6: 001_period
  5/113 Test   #6: 001_period .........................   Passed    0.02 sec
        Start   7: 001_period_tbl
  6/113 Test   #7: 001_period_tbl .....................   Passed    0.05 sec
        Start   8: 003_timestampset
....
110/113 Test #110: 096_tnpoint_spatialrels_tbl ........   Passed   29.10 sec
        Start 111: 096_tnpoint_spatialrels_tbl_pg12
111/113 Test #111: 096_tnpoint_spatialrels_tbl_pg12 ...   Passed    0.12 sec
        Start 112: 097_tnpoint_tempspatialrels
112/113 Test #112: 097_tnpoint_tempspatialrels ........   Passed    0.09 sec
        Start 113: 097_tnpoint_tempspatialrels_tbl
113/113 Test #113: 097_tnpoint_tempspatialrels_tbl ....   Passed    0.45 sec

100% tests passed, 0 tests failed out of 113

Total Test time (real) = 484.15 sec
esteban at ESTEBAN-WORKSTATION:~/src/MobilityDB/build$ dropdb test
esteban at ESTEBAN-WORKSTATION:~/src/MobilityDB/build$ createdb test
esteban at ESTEBAN-WORKSTATION:~/src/MobilityDB/build$ psql test
psql (14.3)
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 14.3, PostGIS 3.2.1
(1 row)

test=#
-----------------------------------------------------------------------------


On Wed, May 25, 2022 at 4:05 PM Esteban Zimanyi <estebanzimanyi at gmail.com>
wrote:

> 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/efb493eb/attachment-0001.htm>


More information about the Mobilitydb-dev mailing list