Professional Documents
Culture Documents
Agenda
Part 1: Scenario Using Postgres for your Enterprise Geodatabase and how to
get started.
What is Postgres?
Getting Started
-
Configuring Postgres
Connecting to Postgres
Administrative Tools
Spatial Types
PostgreSQL
A Free Open Source Option
Introduction to PostgreSQL
-
http://www.postgresql.org/
Learn more:
-
planet.postgresql.org,
PGCON: http://www.pgcon.org/2012/
PostgreSQL Installation
st_geometry library
-
9.3
10.3
9.2.2
10.2.2, 10.2.1
9.1.3
9.0.5
10.0
Configuring PostgreSQL
postgresql.conf
-
Memory
-
#shared_buffers=32MB
Query Optimization
-
Connections
-
#max_connections=100 (default)
Logging
-
#log_statement = 'none'
Vacuum/ Analyze
-
#autovacuum = on
/home/ags/arcgis/server/usr
Init_user_param.sh
PostgreSQL Section:
# For Direct Connect with PostgreSQL
#
export PGHOME=/opt/PostgreSQL/9.0
export PATH=$PGHOME/bin:$PATH
export LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATH
10.2
9.1
9.2
9.0
Esri UC 2014
4 | Technical Workshop | Administering your PostgreSQL Geodatabase
Administration Tools
Administration Tools
Data Viewer
Data Editor
Data Creator
login and schema must be same name for logins that will own
objects in the geodatabase.
PostgreSQL
L Tools
Create Role
Instance
Database
Schema
Schema
Schema
Schema
Geodatabase
SDE
Schema
Schema
Schema
Geodatabase
Administrative
Schema
Database
Feature Cl
Class
(Data)
Behaviors
Complex Features
Versioning
Distributed Data
Archiving
Spatial Type
Transactions
Authorization/Security
Data Management
Backup
Geodatabase
Schema
Schema
Schema
SDE
Esri UC 2014
014 | Technical Workshop |
Connecting to Geodatabase
Spatial Types
Test
Connecting to PostgreSQL
If instance is listening on a different port than the default (5432), include the port
number in the instance. For example: gisprod4, 5435
Connection Architectures
Direct Connect recommended and only method post 10.2.2
ArcSDE
libraries
PostgreSQL
Client
5432
Geodatabase
Database Server
giomgr
5151
gsrvr
Geodatabase
10.2
sde:postgresql:localhost
prod
10.0
Esri UC 2014 | Technical Workshop | Administering your PostgreSQL Geodatabase
Administering
Ad
dmi
mn
niisstter
erin
ng your
your
yo
our
ur PostgreSQL
Pos
ostgre
tgre
tg
reS
eSQ
SQL Geodatabase
Geodatab
basse
Geodatabase
Administrative
Schema
Database
Behaviors
Complex Features
Long Transactions
s
Archiving
Cross-RDBMS
Spatial Types
ST_Geometry
PG_Geometry
ArcGIS
SQL
64-bit: linux build for 1.5 and 2.0, windows build only 2.0
point-in-time recovery
Other options
-
Backup
pg_dump, pg_dumpall and other methods
VM backup
Restore
pg_restore
Restoring pg_restore
-
Some Notes
-
may get errors if trying to drop via pgadminIII, use psql with
cascade
Demo:
Setting up an
Enterprise
Geodatabase on
PostgreSQL
James Gough
Client compatibility
Upgrading
In same instance
If using same name in multiple
instances (e.g. clone prod to stage)
Production
Esri UC 2014 | Technical Workshop |
Publishing
PGDATABASE
PGHOST
PGPORT
PGUSER
Administering
Ad
miniist
mi
steri
t ing your
your PostgreSQL
Pos
osttgreSQ
SQL
L Geodatabase
Geod
Ge
dattab
abas
basse
Purposes
-
Methods
-
pg_dump/pg_restore commands
-
Restore PUBLIC schema first, then SDE, then data owner schemas
run as superuser
re-create Tablespaces
Upgrading
Upgrade Process
Upgrade
-
Services
Desktops
Editing vs Viewing/Analysis
Geodatabase
Database
Geodatabase
Reconcile
c
cile
Post
Compress
r
ress
I d Maintenance
Index
Database
m
Vacuum
i (Analyz
ics
ze)
Statistics
(Analyze)
Review annually as new workflows are introduced and with new major releases of technology
Assist in troubleshooting
-
What to monitor?
Client Performance
-
PostgreSQL Performance
-
Monitor Resources
Physical and Virtual Environments
If Cloud deployment
-
Performance Considerations
Excessive normalization
-
Vacuum
-
Statistics (Analyze)
-
shared_preload_libraries =
'"E:\\PostgreSQL\\9.2\\lib\\pg_stat_statements.dll"'
Indexes (Rebuildx)
OpenSCGs pgHA (PITR and pgbouncer), also PITR and Slony replication
Pgpool
http://wiki.postgresql.org/wiki/LDAP_Authentication_against_AD
http://wiki.postgresql.org/wiki/Configuring_for_single_sign-on_using_SSPI_on_Windows
http://support.esri.com/en/knowledgebase/techarticles/detail/38151
PostgreSQL
L Authentica
Authenticated Users
A
SDE Administ
Administrative User
Data Owner
# IPv4 local connections:
host
all
sde
0.0.0.0/0
md5
host
all
gisdata 0.0.0.0/0
md5
host
all
postgres 0.0.0.0/0
md5
all
all
127.0.0.1/32
md5
host
127.0.0.1/3
host
all
all
0 0 0 0/0
0.0.0.0/0
0
ldap
ldapserver=vmtester.bos.esri.com
ldapserver=v
ldapserver=vmtester.bos.esr
erver=vmtester.bos.esr
tester
.esr
ldapprefix
ix TESTIN
ix=TESTING
NG\
G\"
# IPv6 local connections:
host
all
all
::1/128
md5
host
all
all
::/0
md5
Editors and Viewers via LDAP
PGGDB
Datatype Mapping
ArcGIS has 8