Commit 805c5fc1 authored by Bas Couwenberg's avatar Bas Couwenberg

New upstream version 2.3.3+dfsg

parent 049887b6
# See http://readme.drone.io/0.5/usage/overview
env:
global:
- RUNTESTFLAGS=-v
# See https://git.osgeo.org/gogs/postgis/postgis-docker
test-image: &test-image docker.kbt.io/postgis/build-test:trisquel
......@@ -22,6 +18,6 @@ pipeline:
image: *test-image
commands:
- service postgresql start
- make check
- make check RUNTESTFLAGS=-v
- make install
- utils/check_all_upgrades.sh 2.4.0dev
......@@ -11,7 +11,7 @@ before_install:
postgresql-9.4 postgresql-server-dev-9.4
build-essential autoconf libtool libcunit1-dev
xsltproc docbook-xsl docbook-mathml dblatex
libproj-dev libgdal-dev libgeos-dev libjson0-dev
libproj-dev libgdal1h libgdal-dev libgeos-dev libjson0-dev
- dpkg -l | grep postgresql
- ./autogen.sh
......
2017-06-30 20:43 Regina Obe <lr@pcorp.us>
* [r15469] doc/performance_tips.xml, doc/using_postgis_dataman.xml:
Bring performance tips section up to newer versions
Closes #3746 for PostGIS 2.3 (branch)
2017-06-24 06:18 Regina Obe <lr@pcorp.us>
* [r15463] .travis.yml: try to fix travis gdal related build error
2017-06-24 05:36 Regina Obe <lr@pcorp.us>
* [r15460] doc/installation.xml: fix typo
2017-06-24 05:36 Regina Obe <lr@pcorp.us>
* [r15459] doc/installation.xml: Specify highest version of
PostgreSQL supported.
References #3762 for PostGIS 2.3.3
2017-06-24 05:31 Regina Obe <lr@pcorp.us>
* [r15458] doc/extras_tigergeocoder.xml: change doco for
Geocode_Intersection to agree with function definition.
Closes #3717 for PostGIS 2.3.3
2017-06-24 04:58 Regina Obe <lr@pcorp.us>
* [r15457] NEWS, raster/rt_pg/rtpg_mapalgebra.c: Change ST_Clip
from Error to Notice when ST_Clip can compute no band
Closest #3730 for PostGIS 2.3.3
2017-06-24 04:33 Regina Obe <lr@pcorp.us>
* [r15454] doc/reference_processing.xml: Update 3D example and put
a note about function may return the same geometry.
References #3702 for PostGIS 2.4 (trunk)
2017-06-24 04:06 Regina Obe <lr@pcorp.us>
* [r15452] doc/xsl/postgis_gardentest.sql.xsl: Increase LIMIT
clause on tests so can more readily catch issues like #3704.
2017-06-23 22:57 Sandro Santilli <strk@kbt.io>
* [r15451] postgis/lwgeom_btree.c, regress/operators.sql,
regress/operators_expected: Fix lwgeom_cmp return code
Closes #3777 once again (for 2.3 branch)
2017-06-23 15:07 Sandro Santilli <strk@kbt.io>
* [r15449] topology/postgis_topology.c: Fix compiler warnings about
printf-like formats
This was already fixed in trunk
2017-06-23 14:58 Sandro Santilli <strk@kbt.io>
* [r15448] NEWS, postgis/lwgeom_btree.c, regress/operators.sql,
regress/operators_expected: Fix handling of EMPTY geometries in
btree operator
Includes regress test
Closes #3777 for 2.3 branch
2017-06-23 06:15 Regina Obe <lr@pcorp.us>
* [r15445] NEWS, liblwgeom/lwout_x3d.c, regress/tickets.sql,
regress/tickets_expected: ST_AsX3D handle empty geometries
Closes #3704 for PostGIS 2.3.3
2017-06-23 05:55 Regina Obe <lr@pcorp.us>
* [r15443] regress/dumper/realtable-pre.sql: Backport test sql
script missed in last commit
References #3682 for 2.3.3
References #3701 for 2.3.3
2017-06-23 05:19 Regina Obe <lr@pcorp.us>
* [r15442] NEWS, loader/pgsql2shp-core.c, loader/pgsql2shp-core.h,
regress/dumper/realtable_expected.dbf: Backport fixes for
pgsql2shp for Boolean field length and quote escaping
Includes tests for both
Closes #3682
Closes #3701
2017-06-19 20:37 Sandro Santilli <strk@kbt.io>
* [r15437] postgis/Makefile.in: Avoid ever-growing postgis
extension upgrade scripts
Fixes #3775 for 2.3 branch
2017-06-19 20:37 Sandro Santilli <strk@kbt.io>
* [r15436] postgis/Makefile.in: Style only change: remove trailing
blanks
2017-06-06 12:27 Sandro Santilli <strk@kbt.io>
* [r15421] NEWS, doc/po/de_DE/release_notes.xml.po,
doc/po/es/release_notes.xml.po, doc/po/fr/release_notes.xml.po,
doc/po/it_IT/release_notes.xml.po,
doc/po/ja/release_notes.xml.po,
doc/po/ko_KR/release_notes.xml.po,
doc/po/pl/release_notes.xml.po,
doc/po/pt_BR/release_notes.xml.po,
doc/po/templates/release_notes.xml.pot, doc/release_notes.xml:
Speep up -> Speed up
Thanks Andreas Schild via
https://www.transifex.com/postgis/postgis/translate/#de/release_notesxmlpot/74993598/
2017-06-06 12:22 Sandro Santilli <strk@kbt.io>
* [r15418] NEWS, doc/release_notes.xml: shp2pgsql locale fixes are
#3084, not #3048
Thanks Andreas Schild via
https://www.transifex.com/postgis/postgis/translate/#de/release_notesxmlpot/74993584/
2017-05-04 18:01 Sandro Santilli <strk@kbt.io>
* [r15388] .drone.yml: Set RUNTESTFLAGS env variable locally
global env doesn't seem to work with Drone
2017-05-03 03:50 Regina Obe <lr@pcorp.us>
* [r15383] NEWS, postgis/postgis.sql.in,
raster/rt_pg/rtpostgis.sql.in: @ operator not schema qualified
and ~ not schema qualified in some places
apply patch with adjustments. Patch provided by Shane StClair
(Axiom Data Science)
Closes #3750 for PostGIS 2.3.3
2017-04-25 08:20 Regina Obe <lr@pcorp.us>
* [r15368] regress/subdivide.sql, regress/subdivide_expected:
revise ST_Subdivide regress to use ticket instead of github pull
request
References #3744 for PostGIS 2.3
2017-04-25 06:02 Regina Obe <lr@pcorp.us>
* [r15365] NEWS, doc/Makefile.in, doc/texstyle.sty: PDF manual from
dblatex renders fancy quotes for programlisting
Change to use regular quotes
patch from Mike Toews
References #3726 for PostGIS 2.3
2017-04-24 20:42 Regina Obe <lr@pcorp.us>
* [r15364] NEWS, liblwgeom/lwgeom.c, regress/subdivide.sql,
regress/subdivide_expected: ST_Subdivide loses subparts of
inverted geometries patch from Darafei Praliaskouski (Komzpa)
Closes #3744 for PostGIS 2.3
changed area regress to cast to numeric so doesn't return
scientific notation on windows
2017-04-23 20:34 Regina Obe <lr@pcorp.us>
* [r15362] NEWS, raster/loader/raster2pgsql.c: Get rid of logic
that set out_srid to same as input srid and change to not try to
transform when out_srid is unknown.
Closes #3738 for PostGIS 2.3
2017-04-12 13:35 Sandro Santilli <strk@kbt.io>
* [r15352] README.md: Fix drone build badge url
[ci skip]
2017-04-08 12:25 Regina Obe <lr@pcorp.us>
* [r15348] regress/knn_recheck.sql, regress/knn_recheck_expected:
Get rid of knn tests where multiple records have the same
distances
references #3649 for 2.3
2017-04-04 17:40 Daniel Baston <dbaston@gmail.com>
* [r15346] doc/reference_measure.xml: Fix error in docs for
ST_ClusterDBSCAN
2017-03-11 16:23 Sandro Santilli <strk@kbt.io>
* [r15331] NEWS, liblwgeom/lwgeom_topo.c,
topology/test/regress/topogeo_addlinestring.sql,
topology/test/regress/topogeo_addlinestring_expected_newsnap,
topology/test/regress/topogeo_addlinestring_expected_oldsnap: Fix
azimuth computation for 2.5D edge ends
The change disreguard vertical movemements of the edge and
computes
azimuth of the first segment getting away from the node.
Includes automated testcase
Closes #3711 (in 2.3 branch)
2017-01-31 05:05 Regina Obe <lr@pcorp.us>
* [r15303] Version.config, extensions/upgradeable_versions.mk: Bump
to next dev revision
2017-01-30 05:59 Regina Obe <lr@pcorp.us>
* [r15301] ChangeLog, NEWS, README.postgis, Version.config,
doc/release_notes.xml, extensions/upgradeable_versions.mk: Prep
for PostGIS 2.3.2 release
2017-01-28 04:10 Regina Obe <lr@pcorp.us>
* [r15295] liblwgeom/lwprint.c: Fix for 32-bit lwprint to support
PostGIS 2.3.3
2017/07/01
* Bug Fixes
- #3777, GROUP BY anomaly with empty geometries
- #3711, Azimuth error upon adding 2.5D edges to topology
- #3726, PDF manual from dblatex renders fancy quotes for programlisting
(Mike Toews)
- #3738, raster: Using -s without -Y in raster2pgsql transforms
raster data instead of setting srid
- #3744, ST_Subdivide loses subparts of inverted geometries
(Darafei Praliaskouski Komzpa)
- #3750, @ and ~ operator not always schema qualified in geometry
and raster functions. Causes restore issues.
(Shane StClair of Axiom Data Science)
- #3682, Strange fieldlength for boolean in result of pgsql2shp
- #3701, Escape double quotes issue in pgsql2shp
- #3704, ST_AsX3D crashes on empty geometry
- #3730, Change ST_Clip from Error to Notice when ST_Clip can't compute a band
PostGIS 2.3.2
2017/01/31
......@@ -297,7 +319,7 @@ PostGIS 2.2.0
max extent constraint
- #3018, GROUP BY geography sometimes returns duplicate rows
- #3020, ST_AddBand out-db bug where height using width value
- #3048, shp2pgsql - illegal number format when specific system locale set
- #3084, shp2pgsql - illegal number format when specific system locale set
- #3061, Allow duplicate points in JSON, GML, GML ST_GeomFrom* functions
- #3086, ST_DumpValues() crashes backend on cleanup with invalid
band indexes
......@@ -340,7 +362,7 @@ PostGIS 2.1.6
- #3000, Ensure edge splitting and healing algorithms use indexes
- #3048, Speed up geometry simplification (J.Santana @ CartoDB)
- #3050, Speep up geometry type reading (J.Santana @ CartoDB)
- #3050, Speed up geometry type reading (J.Santana @ CartoDB)
* Bug Fixes *
......
......@@ -5,8 +5,8 @@ Winnie:
[![Build Status](https://debbie.postgis.net:444/buildStatus/icon?job=PostGIS_2.3)]
(https://debbie.postgis.net:444/view/PostGIS/job/PostGIS_2.3/)
Dronie:
[![Build Status](https://drone.osgeo.kbt.io/api/badges/postgis/postgis/status.svg?branch=svn-2.3)]
(https://drone.osgeo.kbt.io/postgis/postgis?branch=svn-2.3)
[![Build Status](https://drone.osgeo.org/api/badges/postgis/postgis/status.svg?branch=svn-2.3)]
(https://drone.osgeo.org/postgis/postgis?branch=svn-2.3)
Travis:
[![Build Status](https://secure.travis-ci.org/postgis/postgis.png?branch=svn-2.3)]
(http://travis-ci.org/postgis/postgis?branch=svn-2.3)
......
PostGIS - Geographic Information Systems Extensions to PostgreSQL
=================================================================
:Version: 2.3.2
:Date: 2017-01-30
:Version: 2.3.3
:Date: 2017-07-01
:Website: http://postgis.net
This distribution contains a module which implements GIS simple features, ties
......@@ -31,7 +31,7 @@ Directory structure::
REQUIREMENTS
------------
PostGIS is compatible with PostgreSQL 9.2 and above.
PostGIS 2.3.3 is compatible with PostgreSQL 9.2-9.6.
You *must* have the full PostgreSQL - including server headers - installed for
this to work.
......@@ -43,8 +43,8 @@ this to work.
http://trac.osgeo.org/proj/
* GEOS (Required, Version 3.3.0 or higher
- 3.4+ is strongly recommended and needed for full features):
* GEOS (Required, Version 3.3.0 or higher
- 3.6+ is strongly recommended and needed for full features):
The GEOS library provides support for exact topological tests such as
ST_Touches(), ST_Contains(), ST_Disjoint() and spatial operations such as
......@@ -77,10 +77,10 @@ this to work.
* GDAL (Optional, Version 1.8.0 or higher 1.9+ is strongly recommended)
GDAL (http://gdal.org) is *required* if you want to compile PostGIS
GDAL (http://gdal.org) is *required* if you want to compile PostGIS
with raster or extension support. To compile without raster support you
must ``./configure --without-raster`` (also disables extension)
* CGAL 4.1+ and SFCGAL (Optional) needed for advanced 3D support
https://github.com/Oslandia/SFCGAL
......@@ -176,11 +176,11 @@ You can change them using ``./configure`` switches. See CONFIGURATION section.
CREATING NEW SPATIAL DATABASES
------------------------------
PostGIS support must be enabled for each database that requires its usage.
PostGIS support must be enabled for each database that requires its usage.
Enabling spatial functionality requires a PostgreSQL super-user.
CREATE EXTENSION postgis;
UPGRADING EXISTING SPATIAL DATABASES
------------------------------------
......@@ -188,8 +188,8 @@ UPGRADING EXISTING SPATIAL DATABASES
Upgrade PostGIS using the "ALTER EXTENSION" facility.
ALTER EXTENSION postgis UPDATE;
USAGE
-----
......
# Version numbering central repository, to be included from various
# Version numbering central repository, to be included from various
# places during the build process
# See HOWTO_RELEASE file in SVN for definitions of those three.
POSTGIS_MAJOR_VERSION=2
POSTGIS_MINOR_VERSION=3
POSTGIS_MICRO_VERSION=2
POSTGIS_MICRO_VERSION=3
# Liblwgeom interface versioning, reset to 0:0:0 (cur:age:rev)
# when changing POSTGIS_MINOR_VERSION
......
......@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2016-04-02'
timestamp='2016-10-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
# to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
......@@ -997,6 +1000,9 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64el:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
......@@ -1029,6 +1035,9 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
......@@ -1408,18 +1417,17 @@ esac
cat >&2 <<EOF
$0: unable to guess system type
This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
This script (version $timestamp), has failed to recognize the
operating system you are using. If your script is old, overwrite
config.guess and config.sub with the latest versions from:
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
provide the necessary information to handle your system.
config.guess timestamp = $timestamp
......
......@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2016-03-30'
timestamp='2016-11-04'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -117,7 +117,7 @@ case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
......@@ -301,6 +301,7 @@ case $basic_machine in
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
......@@ -428,6 +429,7 @@ case $basic_machine in
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pru-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
......@@ -643,6 +645,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
e500v[12])
basic_machine=powerpc-unknown
os=$os"spe"
;;
e500v[12]-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
......@@ -1022,7 +1032,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
......@@ -1032,7 +1042,7 @@ case $basic_machine in
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
......@@ -1389,7 +1399,7 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
......@@ -1399,7 +1409,7 @@ case $os in
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos*)
| -onefs* | -tirtos* | -phoenix* | -fuchsia*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
......
......@@ -19043,7 +19043,6 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services.
......
......@@ -276,6 +276,7 @@ postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSIO
-P figure.warning="${PWD}/html/images/warning" \
-P figure.caution="${PWD}/html/images/caution" \
-P latex.output.revhistory=0 \
-s texstyle \
-o postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}$(DOCSUFFIX).pdf $<; \
fi
......
......@@ -390,7 +390,7 @@ Total query runtime: 245 ms.
<paramdef><type>text </type> <parameter> in_state</parameter></paramdef>
<paramdef choice="opt"><type>text </type> <parameter> in_city</parameter></paramdef>
<paramdef choice="opt"><type>text </type> <parameter> in_zip</parameter></paramdef>
<paramdef choice="opt"><type>integer </type> <parameter>max_results=10</parameter></paramdef>
<paramdef choice="opt"><type>integer </type> <parameter>num_results=10</parameter></paramdef>
<paramdef><type>norm_addy </type> <parameter>OUT addy</parameter></paramdef>
<paramdef><type>geometry </type> <parameter>OUT geomout</parameter></paramdef>
<paramdef><type>integer </type> <parameter>OUT rating</parameter></paramdef>
......@@ -732,7 +732,7 @@ for z in *.zip; do $UNZIPTOOL -o -d $TMPDIR $z; done
</listitem>
</orderedlist>
<para>Availability: 2.0.0 to support Tiger 2010 structured data and load census tract (tract), block groups (bg), and blocks (tabblocks) tables .</para>
<note><para>If you are using pgAdmin 3, be warned that by default pgAdmin 3 truncates long text. To fix, change
<note><para>If you are using pgAdmin 3, be warned that by default pgAdmin 3 truncates long text. To fix, change
<emphasis>File -&gt; Options -&gt; Query Tool -&gt; Query Editor - &gt; Max. characters per column</emphasis> to larger than 50000 characters.</para></note>
......
......@@ -94,7 +94,7 @@ psql -d yourdatabase -f sfcgal_comments.sql
<itemizedlist>
<listitem>
<para>
PostgreSQL &min_postgres_version; or higher. A complete installation
PostgreSQL &min_postgres_version; and &lt;= PostgreSQL 9.6. A complete installation
of PostgreSQL (including server headers) is required. PostgreSQL
is available from
<ulink url="http://www.postgresql.org">
......@@ -1395,7 +1395,7 @@ All 2 tests passed.
<para>You can later run <filename>uninstall_legacy.sql</filename> to get rid of the deprecated functions after you are done with restoring and cleanup.</para>
</sect1>
<sect1 id="create_new_db">
<title>Create a spatially-enabled database without using extensions</title>
......
......@@ -8,7 +8,7 @@
<sect2>
<title>Problem description</title>
<para>Current PostgreSQL versions (including 8.0) suffer from a query
<para>Current PostgreSQL versions (including 9.6) suffer from a query
optimizer weakness regarding TOAST tables. TOAST tables are a kind of
"extension room" used to store large (in the sense of data size) values
that do not fit into normal data pages (like long texts, images or
......@@ -17,7 +17,7 @@
information).</para>
<para>The problem appears if you happen to have a table with rather
large geometries, but not too much rows of them (like a table containing
large geometries, but not too manyrows of them (like a table containing
the boundaries of all European countries in high resolution). Then the
table itself is small, but it uses lots of TOAST space. In our example
case, the table itself had about 80 rows and used only 3 data pages, but
......@@ -26,17 +26,19 @@
<para>Now issue a query where you use the geometry operator &amp;&amp;
to search for a bounding box that matches only very few of those rows.
Now the query optimizer sees that the table has only 3 pages and 80
rows. He estimates that a sequential scan on such a small table is much
faster than using an index. And so he decides to ignore the GIST index.
rows. It estimates that a sequential scan on such a small table is much
faster than using an index. And so it decides to ignore the GIST index.
Usually, this estimation is correct. But in our case, the &amp;&amp;
operator has to fetch every geometry from disk to compare the bounding
boxes, thus reading all TOAST pages, too.</para>
<para>To see whether your suffer from this bug, use the "EXPLAIN
<para>To see whether your suffer from this issue, use the "EXPLAIN
ANALYZE" postgresql command. For more information and the technical
details, you can read the thread on the postgres performance mailing
list:
http://archives.postgresql.org/pgsql-performance/2005-02/msg00030.php</para>
<ulink url="http://archives.postgresql.org/pgsql-performance/2005-02/msg00030.php">http://archives.postgresql.org/pgsql-performance/2005-02/msg00030.php</ulink></para>
<para>and newer thread on PostGIS <ulink url="https://lists.osgeo.org/pipermail/postgis-devel/2017-June/026209.html">https://lists.osgeo.org/pipermail/postgis-devel/2017-June/026209.html</ulink></para>
</sect2>
<sect2>
......@@ -146,7 +148,7 @@ VACUUM FULL ANALYZE mytable;</programlisting>
geometries and rasters are heavy so memory related optimizations generally have more of an impact on PostGIS than other types of PostgreSQL queries.</para>
<para>For general details about optimizing PostgreSQL, refer to <ulink url="https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server">Tuning your PostgreSQL Server</ulink>.</para>
<para>For PostgreSQL 9.4+ all these can be set at the server level without touching postgresql.conf or postgresql.auto.conf
by using the <code>ALTER SYSTEM..</code> command.</para>
<programlisting>ALTER SYSTEM SET work_mem = '256MB';
......@@ -191,17 +193,17 @@ SHOW work_mem;</programlisting>
<itemizedlist>
<listitem>
<para>
Default: ~32MB
Default: ~128MB in PostgreSQL 9.6
</para>
</listitem>
<listitem>
<para>
Set to about 1/3 to 3/4 of available RAM
Set to about 25% to 40% of available RAM. On windows you may not be able to set as high.
</para>
</listitem>
</itemizedlist>
<para>
<ulink url="https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-MAX-WORKER-PROCESSES">max_worker_processes</ulink>
This setting is only available for PostgreSQL 9.4+. For PostgreSQL 9.6+ this setting has additional importance in that it controls the
......@@ -251,7 +253,7 @@ SHOW work_mem;</programlisting>
<para>
If you have lots of RAM and few developers:
<programlisting>
SET work_mem TO '256MB';;
SET work_mem TO '256MB';
</programlisting>
</para>
</listitem>
......@@ -282,10 +284,10 @@ SHOW work_mem;</programlisting>
</para>
</listitem>
</itemizedlist>
<para>
<ulink url="https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-MAX-PARALLEL-WORKERS-PER-GATHER">max_parallel_workers_per_gather</ulink>
This setting is only available for PostgreSQL 9.6+ and will only affect PostGIS 2.3+, since only PostGIS 2.3+ supports parallel queries.
This setting is only available for PostgreSQL 9.6+ and will only affect PostGIS 2.3+, since only PostGIS 2.3+ supports parallel queries.
If set to higher than 0, then some queries such as those involving relation functions like <code>ST_Intersects</code> can use multiple processes and can run
more than twice as fast when doing so. If you have a lot of processors to spare, you should change the value of this to as many processors as you have.
Also make sure to bump up <code>max_worker_processes</code> to at least as high as this number.
......
......@@ -920,7 +920,7 @@ msgstr ""
#. Tag: para
#: release_notes.xml:158
#, no-c-format
msgid "#3050, Speep up geometry type reading (J.Santana @ CartoDB)"
msgid "#3050, Speed up geometry type reading (J.Santana @ CartoDB)"
msgstr ""
#. Tag: para
......
......@@ -922,7 +922,7 @@ msgstr ""
#. Tag: para
#: release_notes.xml:158
#, no-c-format
msgid "#3050, Speep up geometry type reading (J.Santana @ CartoDB)"
msgid "#3050, Speed up geometry type reading (J.Santana @ CartoDB)"
msgstr ""
#. Tag: para
......
......@@ -922,7 +922,7 @@ msgstr ""
#. Tag: para
#: release_notes.xml:158
#, no-c-format
msgid "#3050, Speep up geometry type reading (J.Santana @ CartoDB)"
msgid "#3050, Speed up geometry type reading (J.Santana @ CartoDB)"
msgstr ""
#. Tag: para
......
......@@ -920,7 +920,7 @@ msgstr ""
#. Tag: para
#: release_notes.xml:158
#, no-c-format
msgid "#3050, Speep up geometry type reading (J.Santana @ CartoDB)"
msgid "#3050, Speed up geometry type reading (J.Santana @ CartoDB)"
msgstr ""
#. Tag: para
......
......@@ -920,7 +920,7 @@ msgstr ""
#. Tag: para
#: release_notes.xml:158
#, no-c-format
msgid "#3050, Speep up geometry type reading (J.Santana @ CartoDB)"
msgid "#3050, Speed up geometry type reading (J.Santana @ CartoDB)"
msgstr ""
#. Tag: para
......
......@@ -920,7 +920,7 @@ msgstr ""
#. Tag: para
#: release_notes.xml:158
#, no-c-format
msgid "#3050, Speep up geometry type reading (J.Santana @ CartoDB)"
msgid "#3050, Speed up geometry type reading (J.Santana @ CartoDB)"
msgstr ""
#. Tag: para
......
......@@ -921,7 +921,7 @@ msgstr ""
#. Tag: para
#: release_notes.xml:158
#, no-c-format
msgid "#3050, Speep up geometry type reading (J.Santana @ CartoDB)"
msgid "#3050, Speed up geometry type reading (J.Santana @ CartoDB)"
msgstr ""
#. Tag: para
......
......@@ -923,7 +923,7 @@ msgstr ""
#. Tag: para
#: release_notes.xml:158
#, no-c-format