This repository will contain tests we can test across many versions of PostGIS. It will also stress test with real data.
 
 
 
Go to file
Regina Obe ab81b30077 Change to test 3.4 against 3.3 2022-10-23 22:51:25 -04:00
ci Change to test 3.4 against 3.3 2022-10-23 22:51:25 -04:00
pgtap Get rid of GIST_BUILD variable. No longer needed now that PG15 it is enabled for 3.3. Change armmie and reallie to test against PG 15 2022-04-28 12:50:52 -04:00
run_results Minor cleanup 2022-01-17 20:13:54 -05:00
.editorconfig Define editorconfig, relevant lines copied from postgis to enforce consistency 2021-08-27 11:33:47 -04:00
.gitignore Only defined DOWNLOAD_DATA folder if one is not already defined 2021-08-27 11:21:05 -04:00
Makefile Get rid of GIST_BUILD variable. No longer needed now that PG15 it is enabled for 3.3. Change armmie and reallie to test against PG 15 2022-04-28 12:50:52 -04:00
README.md add * in poly tests 2021-11-30 10:38:28 -05:00
download_data.sh Incorporate pramsey's 3d road dataset and bbox / intersect tests 2021-11-29 21:43:44 -05:00
run_template.sh Get rid of GIST_BUILD variable. No longer needed now that PG15 it is enabled for 3.3. Change armmie and reallie to test against PG 15 2022-04-28 12:50:52 -04:00
setupdb_postgis.sql.in Get rid of GIST_BUILD variable. No longer needed now that PG15 it is enabled for 3.3. Change armmie and reallie to test against PG 15 2022-04-28 12:50:52 -04:00
setupdb_raster.sql.in Add sfcgal tests. Add countries as new downloadable data set 2021-08-27 18:37:21 -04:00
setupdb_sfcgal.sql.in Add sfcgal tests. Add countries as new downloadable data set 2021-08-27 18:37:21 -04:00
setupdb_tiger_geocoder.sql.in 1. Selectively download data based on prep requirements. Closes #2 2021-08-28 02:07:30 -04:00
setupdb_topology.sql.in Add more tests. Quiet the load process 2021-08-26 13:27:34 -04:00

README.md

PostGIS Performance

Reallie | Build Status

Winnie | Build Status

This project is an attempt at building a performance test suite for PostGIS.

Requirements for running:

Goals:

  1. Be able to detect regressions in performance from PostGIS present to previous versions
  2. Be able to test with real-world data and actual ways people are using PostGIS.

The project is divided into several folders (may be reorganized later)

  1. ci folder -- each folder represents a ci bot and scripts needed to have the bot (build postgis, some) and run the tests
  2. pgtap - contains pgtap tests divided into folders by postgis extension. Each file contains one or more tests.
  • run_template.sh -- this is a sample script you can copy from for your needs. Copy to a file run_tests_local.sh and make custom changes as needed. The run_tests_local.sh is ignored by git.
  • Makefile - Has the core commands
  • The ci bots test multiple versions of PostGIS and build PostGIS versions as needed, take a look at ci/reallie/run_tests.sh for an example

For help run:

make help

outputs:

help                           Show this help screen
download-data                  Downloads all data files from postgis.net. Puts in folder defined by env $DOWNLOAD_DATADIR
clean                          Delete generated files
prep-postgis                   Create database and load with data
test-postgis                   Run postgis tests
prep-tiger-geocoder            Create tiger database and load with data
test-tiger-geocoder            Run tiger geocoder tests
prep-topology                  Create topology database and load with data
test-topology                  Run topology tests
prep-raster                    Create database for raster tests and load with data
test-raster                    Run raster tests
prep-sfcgal                    Create database for sfcgal tests and load with data
test-sfcgal                    Run sfcgal tests

How to experiment with one test

When developing tests you might want to focus your attention on one test. Here is how you run for a specific test:

export POSTGIS_PERF_DB=postgis_topo_perf #define custom db for experimenting
make prep-topology  #only need to do this once, can reuse across custom tests
pg_prove --failures --verbose -d ${POSTGIS_PERF_DB} pgtap/topology/totopogeom.sql

You might also want to focus on a suite of tests

export POSTGIS_PERF_DB=postgis_perf #define custom db for experimenting
make prep-postgis
  pg_prove --failures --timer --comments --verbose -d ${POSTGIS_PERF_DB} pgtap/postgis/01*.sql pgtap/postgis/03*.sql pgtap/postgis/04*.sql

Data used in these tests is store at http://postgis.net/extra/test-data

Data in http://postgis.net/extra/test-data is currently sourced from Census Tiger, OSM data, and Natural Earth data sources and is packaged in a format suitable for load by psql.

Look at sample script run_template.sh for variables you can override to control behavior.

The data sources available there are as follows:

tiger_national.sql.bz2 - this requires the postgis_tiger_geocoder extension to be loaded before hand as it inherits from the tables packaged with that. The data is from https://www2.census.gov/geo/tiger/TIGER2020/ (zcta5, state, county)

tiger_dc.sql.bz2 - this requires the postgis_tiger_geocoder extension. Data sourced from https://www2.census.gov/geo/tiger/TIGER2020//tl_2020_11_*.zip files

tiger_ma.sql.bz2 - this requires the postgis_tiger_geocoder extension. Data sourced from https://www2.census.gov/geo/tiger/TIGER2020//tl_2020_25_*.zip files

osm_belarus.sql.bz2 - this is sourced from https://download.geofabrik.de/europe/belarus-latest.osm.pbf dated 2021-06-28T20:21:42Z

osm_china.sql.bz2 - this is sourced from https://download.geofabrik.de/asia/china-140101-free.shp.zip dated 2018-05-03 16:26

countries.sql.bz2 - this is sourced from https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip (4.1.0) 2021-08-27