SlideShare a Scribd company logo
PostgreSQL 9.5
New capabilities, new features, new year
James Hanson
jhanson@freedomconsultinggroup.com
jamesphanson@yahoo.com
@jamey_hanson
Freedom Consulting Group
http://www.freedomconsultinggroup.com
11-Feb-16
PostgreSQL: mission capable database platform
PostgreSQL MigrationTeam 11-Feb-162
v.
PostgreSQL retains its position as the most advanced relational
database platform*
with unique NoSQL,
text, geospatial,
analytic, network,
and development
language capabilities.
* For data on a single-
server scale of a few TB.
} JSON CRUD operations and pretty-print
} Row-level security … saved for a later presentation
} UPSERT “UPDATE if matching, otherwise INSERT”
} Password complexity, expiration and management (EDB*)
} Re-sync replication partners after failover
} Foreign table constraints and inheritance
} New analytics for CUBE and ROLLUP with GROUP BY
} New versions of PostGIS with added geospatial tools
} Lots and lots of administrative improvements
*EnterpriseDB PostgreSQL Plus Advanced Server
PostgreSQL and PPAS* new capabilities
PostgreSQL MigrationTeam 11-Feb-163
} PostgreSQL now speaks
JSON* fluently.
You have two choices
for full JSON support:
MongoDB
and PostgreSQL
We are JSONic!
PostgreSQL MigrationTeam 11-Feb-164
* and GeoJSON too!
} Why is this such a really, really big deal?
} From Gartner Group’s 2015 Magic Quadrant on Operational Databases
By 2017,the“NoSQL” label will cease to distinguish DBMSs,
which will reduce its value and result in it falling out of use. By
2017,all leading operational DBMSs will offer multiple data
models,relational and NoSQL, in a single platform.
}
* Oracle and MySQL include a read-only JSON data type, but no UPDATE functions. MS
SQLServer can present SQL results as JSON, but there is no JSON data type.
JSON CRUD operations and pretty-print
PostgreSQL MigrationTeam 11-Feb-165
PostgreSQL is for first, best and
only RDBMS* to support CRUD
and pretty-print on JSON.
} JSON documents in RDBMSs read-only and indexable.
The model was …
} Create a JSON document
} Store and index it in the database
} Retreive the JSON document
} Make changes to the document in the application
} Put the changed JSON back in the database
} PostgreSQL 9.5 adds ...
} UPDATE values,included array elements and nested JSON
} REMOVE nulls,which are common when converting from
RDBMS
} ADD elements or UPDATE if the element already exists
JSON CRUD operations
PostgreSQL MigrationTeam 11-Feb-166
} JSON is intended to be both machine and human readable
} But a JSON document is all on one line, without returns … not
very human readable
} Traditionally,JSON is “prettied” in the applicaiton code of with
MongoDB
} PostgreSQL 9.5 includes JSONB_PRETTY(), which
presents JSON in human-readable form
} Example from a table of airport JSON documents:
SELECT JSONB_PRETTY(airports)
FROM airports_json
WHERE airports ->> 'ident' = 'KCGS';
JSON pretty-print
PostgreSQL MigrationTeam 11-Feb-167
College Park Airport, KCGS
8
{
"name": "College Park Airport",
"type": "small_airport",
"ident": "KCGS",
"region": "Maryland",
"country": "United States",
"elevation_ft": 48,
"airport_keywords": [
"DC3",
"ADIZ"
],
"location": {
"type": "Point",
"coordinates": [
-76.9223022461,
38.9805984497
]
},
"airport_home_link": "http://www.collegeparkairport.aero/",
"runways": [
{
"he_ident": "33",
"length_ft": 2607,
"he_location": {
"type": "Point",
"coordinates": [
-76.9192,
38.9779
} Database user accounts can have a security-function
applied to all of their SQL
} “tables can have row security policies that restrict,on a per-user
basis,which rows can be returned by normal queries or
inserted,updated,or deleted by data modification commands”
PostgreSQL 9.5 documentation, 5.7 Row Security Policies
Row-level security … for a later presentation
PostgreSQL MigrationTeam 11-Feb-169
} INSERT operator adds optional ON CONFLICT clause
} DO NOTHING
} DO UPDATE SET …
COLUMN_NAME = <value_expression_or_subselect>
WHERE ...
} Ex.
CREATE TABLE distributors (
id BIGSERIAL PRIMARY KEY,
name TEXT);
INSERT INTO distributors (name) VALUES
('Kirkland'),
('Peapod');
UPSERT: “UPDATE if matching, otherwise INSERT”
PostgreSQL MigrationTeam 11-Feb-1610
} Option I: if the record exists, do nothing
INSERT INTO distributors (id, name) VALUES
(2, 'Nature''s Promise')
ON CONFLICT (id) DO NOTHING;
} Option II: if the id exists, update the name
INSERT INTO distributors (id, name) VALUES
(2, 'Nature''s Promise')
ON CONFLICT (id) DO UPDATE
SET name = 'Nature''s Promise';
UPSERT: “UPDATE if matching, otherwise INSERT”
PostgreSQL MigrationTeam 11-Feb-1611
} Accounts get PROFILEs, which can define …
} Failed login
attempts
} Password
complexity
function,
re-use,
expiration,
etc.
Password PROFILES for complexity and mgmt. (EDB)
PostgreSQL MigrationTeam 11-Feb-1612
} DEFAULT profile specifies
FAILED_LOGIN_ATTEMPTS UNLIMITED
PASSWORD_LOCK_TIME UNLIMITED
PASSWORD_LIFE_TIME UNLIMITED
PASSWEORD_GRACE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_FUNCTION NULL
} Database superusers can ALTER PROFILE
} Functional equivalent and 100% syntactically compatible
with Oracle RDBMS
Password PROFILES for complexity and mgmt. (EDB)
PostgreSQL MigrationTeam 11-Feb-1613
} Previously, PostgreSQL audit logs only included the
database username, such as JBOSS_USER
} Logged the database user,not the person using the application
} edb_audit_tagallows the application to “tag” each
database session with an identifier that is written to the
csv or xml audit log
} Similar to Oracle application_context
Audit application user (EDB)
PostgreSQL MigrationTeam 11-Feb-1614
vs.
} UTL_RAW package
UTL_HTTP
.WRITE_LINE &
.WRITE_TEXT
DBMS_SESSION.
.SET_ROLE
} WAIT n seconds in FOR UPDATE statements
} Limits statement failures caused by locks
(Even) more Oracle compatibility (EDB)
PostgreSQL MigrationTeam 11-Feb-1615
} PostgreSQL already has simple, stable and fast replication
} Automatic or manual failover in MASTER => SLAVE
partnerships
} Now, the original MASTER database can be re-
synchronized after a failover without a full database copy
using pg_rewind
} Makes replication failover a much smaller deal
} Suitable for testing,patches,upgrades and other new business
cases
Re-sync replication partners after failover
PostgreSQL MigrationTeam 11-Feb-1616
} External data sources can appear as PostgreSQL tables,
including constraints and inheritance
} OS files,including JSON!
} Other RDBMSs (Oracle, MySQL, etc.) via O/JDBC
} Anything you have a connector for (pgbson for MongoDB)
} Constraints are not enforced, but it means that a foreign
table can be part of a foreign key
Foreign table constraints and inheritance
PostgreSQL MigrationTeam 11-Feb-1617
} GROUP BY multiple columns …
SELECT * FROM items_sold;
brand | size | sales
Foo | L | 10
Foo | M | 20
Bar | M | 15
Bar | L | 5
SELECT brand, size, sum(sales)
FROM items_sold
GROUP BY GROUPING SETS ((brand), (size), ());
brand | size | sum
Foo | | 30
Bar | | 20
| L | 15
| M | 35
| | 50
New analytics for CUBE & ROLLUP with GROUP BY
PostgreSQL MigrationTeam 11-Feb-1618
1`
} More capabilities for aggregate functions using all sorts of
combinations of columns and values …
} Plus native support for many languages ...
New analytics for CUBE & ROLLUP with GROUP BY
PostgreSQL MigrationTeam 11-Feb-1619
} PostGIS 2.2 installed with PostgreSQL and PPAS 9.5
included with PostgreSQL. Simpler &
cheaper the Oracle and ESRI
} ST_SubDivide divides
large shapes
} 3D operators for Known Nearest
Neighbor (KNN)
} Compressed output toTiny
Well Known Text (TWKB)
} GeoJSON generator
} More & faster functions for geometry data type
New PostGIS with added geospatial tools
PostgreSQL MigrationTeam 11-Feb-1620
} New index type for sorted ranges of data (like
timestamps) BRIN
} Select sample data from
large tables
} Speed up CREATE INDEX
} SSL diagnostic view
} View into progress of
replication
} Hint suggestions for
mistyped column names
} SELECT with skip locked option
Lots and lots of administrative improvements
PostgreSQL MigrationTeam 11-Feb-1621
} Example
SELECT elevation
FROM airports
LIMIT 10;
… but the actual column is airports.elevation_ft
ERROR: column "elevation" does not exist
HINT: Perhaps you meant to reference the
column "airports.location" or the column
"airports.elevation_ft".
Hint suggestions for mistyped column names
PostgreSQL MigrationTeam 11-Feb-1622
} JSON CRUD operations and pretty-print
} Row-level security … saved for a later presentation
} UPSERT“UPDATE if matching, otherwise INSERT”
} Password complexity, expiration and management (EDB*)
} Re-sync replication partners after failover
} Foreign table constraints and inheritance
} New analytics for CUBE and ROLLUP with GROUP BY
} New versions of PostGIS with added geospatial tools
} Lots and lots of administrative improvements
*EnterpriseDB PostgreSQL Plus Advanced Server
PostgreSQL and PPAS new capabilities
PostgreSQL MigrationTeam 11-Feb-1623
Are
there
any
questions or
follow up?
24

More Related Content

What's hot

Search at Twitter
Search at TwitterSearch at Twitter
Search at Twitter
lucenerevolution
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucene
lucenerevolution
 
Major features postgres 11
Major features postgres 11Major features postgres 11
Major features postgres 11
EDB
 
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxData
 
Big Data - Load CSV File & Query the EZ way - HPCC Systems
Big Data - Load CSV File & Query the EZ way - HPCC SystemsBig Data - Load CSV File & Query the EZ way - HPCC Systems
Big Data - Load CSV File & Query the EZ way - HPCC Systems
Fujio Turner
 
Extending Apache Spark – Beyond Spark Session Extensions
Extending Apache Spark – Beyond Spark Session ExtensionsExtending Apache Spark – Beyond Spark Session Extensions
Extending Apache Spark – Beyond Spark Session Extensions
Databricks
 
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
Chengjen Lee
 
Spark performance tuning eng
Spark performance tuning engSpark performance tuning eng
Spark performance tuning eng
haiteam
 
Elasticsearch speed is key
Elasticsearch speed is keyElasticsearch speed is key
Elasticsearch speed is key
Enterprise Search Warsaw Meetup
 
PGConf APAC 2018 - Monitoring PostgreSQL at Scale
PGConf APAC 2018 - Monitoring PostgreSQL at ScalePGConf APAC 2018 - Monitoring PostgreSQL at Scale
PGConf APAC 2018 - Monitoring PostgreSQL at Scale
PGConf APAC
 
Azure search
Azure searchAzure search
Azure search
Alexej Sommer
 
Introduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizerIntroduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizer
Mydbops
 
EKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern FragmentsEKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern Fragments
Ruben Taelman
 
Nutch and lucene_framework
Nutch and lucene_frameworkNutch and lucene_framework
Nutch and lucene_framework
samuelhard
 
Big Data - Load, Index & Query the EZ way - HPCC Systems
Big Data - Load, Index & Query the EZ way - HPCC SystemsBig Data - Load, Index & Query the EZ way - HPCC Systems
Big Data - Load, Index & Query the EZ way - HPCC Systems
Fujio Turner
 
From Overnight to Always On @ Jfokus 2019
From Overnight to Always On @ Jfokus 2019From Overnight to Always On @ Jfokus 2019
From Overnight to Always On @ Jfokus 2019
Enno Runne
 
Big Data - In-Memory Index / Sub Second Query engine - Roxie - HPCC Systems
Big Data - In-Memory Index / Sub Second Query engine - Roxie - HPCC SystemsBig Data - In-Memory Index / Sub Second Query engine - Roxie - HPCC Systems
Big Data - In-Memory Index / Sub Second Query engine - Roxie - HPCC Systems
Fujio Turner
 
Building a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationBuilding a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management Application
Jonathan Katz
 
a look at the postgresql engine
a look at the postgresql enginea look at the postgresql engine
a look at the postgresql engine
Federico Campoli
 
Xephon K A Time series database with multiple backends
Xephon K A Time series database with multiple backendsXephon K A Time series database with multiple backends
Xephon K A Time series database with multiple backends
University of California, Santa Cruz
 

What's hot (20)

Search at Twitter
Search at TwitterSearch at Twitter
Search at Twitter
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucene
 
Major features postgres 11
Major features postgres 11Major features postgres 11
Major features postgres 11
 
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
 
Big Data - Load CSV File & Query the EZ way - HPCC Systems
Big Data - Load CSV File & Query the EZ way - HPCC SystemsBig Data - Load CSV File & Query the EZ way - HPCC Systems
Big Data - Load CSV File & Query the EZ way - HPCC Systems
 
Extending Apache Spark – Beyond Spark Session Extensions
Extending Apache Spark – Beyond Spark Session ExtensionsExtending Apache Spark – Beyond Spark Session Extensions
Extending Apache Spark – Beyond Spark Session Extensions
 
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
 
Spark performance tuning eng
Spark performance tuning engSpark performance tuning eng
Spark performance tuning eng
 
Elasticsearch speed is key
Elasticsearch speed is keyElasticsearch speed is key
Elasticsearch speed is key
 
PGConf APAC 2018 - Monitoring PostgreSQL at Scale
PGConf APAC 2018 - Monitoring PostgreSQL at ScalePGConf APAC 2018 - Monitoring PostgreSQL at Scale
PGConf APAC 2018 - Monitoring PostgreSQL at Scale
 
Azure search
Azure searchAzure search
Azure search
 
Introduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizerIntroduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizer
 
EKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern FragmentsEKAW - Publishing with Triple Pattern Fragments
EKAW - Publishing with Triple Pattern Fragments
 
Nutch and lucene_framework
Nutch and lucene_frameworkNutch and lucene_framework
Nutch and lucene_framework
 
Big Data - Load, Index & Query the EZ way - HPCC Systems
Big Data - Load, Index & Query the EZ way - HPCC SystemsBig Data - Load, Index & Query the EZ way - HPCC Systems
Big Data - Load, Index & Query the EZ way - HPCC Systems
 
From Overnight to Always On @ Jfokus 2019
From Overnight to Always On @ Jfokus 2019From Overnight to Always On @ Jfokus 2019
From Overnight to Always On @ Jfokus 2019
 
Big Data - In-Memory Index / Sub Second Query engine - Roxie - HPCC Systems
Big Data - In-Memory Index / Sub Second Query engine - Roxie - HPCC SystemsBig Data - In-Memory Index / Sub Second Query engine - Roxie - HPCC Systems
Big Data - In-Memory Index / Sub Second Query engine - Roxie - HPCC Systems
 
Building a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationBuilding a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management Application
 
a look at the postgresql engine
a look at the postgresql enginea look at the postgresql engine
a look at the postgresql engine
 
Xephon K A Time series database with multiple backends
Xephon K A Time series database with multiple backendsXephon K A Time series database with multiple backends
Xephon K A Time series database with multiple backends
 

Similar to Pg 95 new capabilities

What's New in Postgres 9.4
What's New in Postgres 9.4What's New in Postgres 9.4
What's New in Postgres 9.4
EDB
 
Trivadis TechEvent 2017 PostgreSQL für die (Orakel) DBA by Ludovico Caldara
Trivadis TechEvent 2017 PostgreSQL für die (Orakel) DBA by Ludovico CaldaraTrivadis TechEvent 2017 PostgreSQL für die (Orakel) DBA by Ludovico Caldara
Trivadis TechEvent 2017 PostgreSQL für die (Orakel) DBA by Ludovico Caldara
Trivadis
 
Postgresql quick guide
Postgresql quick guidePostgresql quick guide
Postgresql quick guide
Ashoka Vanjare
 
Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014
Michael Renner
 
PostgreSQL 10; Long Awaited Enterprise Solutions
PostgreSQL 10; Long Awaited Enterprise SolutionsPostgreSQL 10; Long Awaited Enterprise Solutions
PostgreSQL 10; Long Awaited Enterprise Solutions
Julyanto SUTANDANG
 
20181116 Massive Log Processing using I/O optimized PostgreSQL
20181116 Massive Log Processing using I/O optimized PostgreSQL20181116 Massive Log Processing using I/O optimized PostgreSQL
20181116 Massive Log Processing using I/O optimized PostgreSQL
Kohei KaiGai
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
EDB
 
Postgre sql best_practices
Postgre sql best_practicesPostgre sql best_practices
Postgre sql best_practices
Jacques Kostic
 
Postgre sql best_practices
Postgre sql best_practicesPostgre sql best_practices
Postgre sql best_practices
Emiliano Fusaglia
 
Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5
Trieu Dao Minh
 
Postgresql
PostgresqlPostgresql
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
Kohei KaiGai
 
TechEvent PostgreSQL Best Practices
TechEvent PostgreSQL Best PracticesTechEvent PostgreSQL Best Practices
TechEvent PostgreSQL Best Practices
Trivadis
 
Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD
Elephants vs. Dolphins:  Comparing PostgreSQL and MySQL for use in the DoDElephants vs. Dolphins:  Comparing PostgreSQL and MySQL for use in the DoD
Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD
Jamey Hanson
 
CloverDX 6.2 Release
CloverDX 6.2 ReleaseCloverDX 6.2 Release
CloverDX 6.2 Release
CloverDX
 
Enterprise Postgres
Enterprise PostgresEnterprise Postgres
Enterprise Postgres
Oracle Korea
 
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Grant McAlister
 
An Introduction to Postgresql
An Introduction to PostgresqlAn Introduction to Postgresql
An Introduction to Postgresql
عباس بني اسدي مقدم
 
Osgis 2010 notes
Osgis 2010 notesOsgis 2010 notes
Osgis 2010 notes
Joanne Cook
 
Getting started with PostGIS geographic database
Getting started with PostGIS geographic databaseGetting started with PostGIS geographic database
Getting started with PostGIS geographic database
EDINA, University of Edinburgh
 

Similar to Pg 95 new capabilities (20)

What's New in Postgres 9.4
What's New in Postgres 9.4What's New in Postgres 9.4
What's New in Postgres 9.4
 
Trivadis TechEvent 2017 PostgreSQL für die (Orakel) DBA by Ludovico Caldara
Trivadis TechEvent 2017 PostgreSQL für die (Orakel) DBA by Ludovico CaldaraTrivadis TechEvent 2017 PostgreSQL für die (Orakel) DBA by Ludovico Caldara
Trivadis TechEvent 2017 PostgreSQL für die (Orakel) DBA by Ludovico Caldara
 
Postgresql quick guide
Postgresql quick guidePostgresql quick guide
Postgresql quick guide
 
Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014
 
PostgreSQL 10; Long Awaited Enterprise Solutions
PostgreSQL 10; Long Awaited Enterprise SolutionsPostgreSQL 10; Long Awaited Enterprise Solutions
PostgreSQL 10; Long Awaited Enterprise Solutions
 
20181116 Massive Log Processing using I/O optimized PostgreSQL
20181116 Massive Log Processing using I/O optimized PostgreSQL20181116 Massive Log Processing using I/O optimized PostgreSQL
20181116 Massive Log Processing using I/O optimized PostgreSQL
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
 
Postgre sql best_practices
Postgre sql best_practicesPostgre sql best_practices
Postgre sql best_practices
 
Postgre sql best_practices
Postgre sql best_practicesPostgre sql best_practices
Postgre sql best_practices
 
Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5
 
Postgresql
PostgresqlPostgresql
Postgresql
 
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
GPU/SSD Accelerates PostgreSQL - challenge towards query processing throughpu...
 
TechEvent PostgreSQL Best Practices
TechEvent PostgreSQL Best PracticesTechEvent PostgreSQL Best Practices
TechEvent PostgreSQL Best Practices
 
Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD
Elephants vs. Dolphins:  Comparing PostgreSQL and MySQL for use in the DoDElephants vs. Dolphins:  Comparing PostgreSQL and MySQL for use in the DoD
Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD
 
CloverDX 6.2 Release
CloverDX 6.2 ReleaseCloverDX 6.2 Release
CloverDX 6.2 Release
 
Enterprise Postgres
Enterprise PostgresEnterprise Postgres
Enterprise Postgres
 
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
Amazon RDS for PostgreSQL: What's New and Lessons Learned - NY 2017
 
An Introduction to Postgresql
An Introduction to PostgresqlAn Introduction to Postgresql
An Introduction to Postgresql
 
Osgis 2010 notes
Osgis 2010 notesOsgis 2010 notes
Osgis 2010 notes
 
Getting started with PostGIS geographic database
Getting started with PostGIS geographic databaseGetting started with PostGIS geographic database
Getting started with PostGIS geographic database
 

Recently uploaded

University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
soxrziqu
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Fernanda Palhano
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
Lars Albertsson
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
Social Samosa
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
Timothy Spann
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
apvysm8
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 

Recently uploaded (20)

University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 

Pg 95 new capabilities

  • 1. PostgreSQL 9.5 New capabilities, new features, new year James Hanson jhanson@freedomconsultinggroup.com jamesphanson@yahoo.com @jamey_hanson Freedom Consulting Group http://www.freedomconsultinggroup.com 11-Feb-16
  • 2. PostgreSQL: mission capable database platform PostgreSQL MigrationTeam 11-Feb-162 v. PostgreSQL retains its position as the most advanced relational database platform* with unique NoSQL, text, geospatial, analytic, network, and development language capabilities. * For data on a single- server scale of a few TB.
  • 3. } JSON CRUD operations and pretty-print } Row-level security … saved for a later presentation } UPSERT “UPDATE if matching, otherwise INSERT” } Password complexity, expiration and management (EDB*) } Re-sync replication partners after failover } Foreign table constraints and inheritance } New analytics for CUBE and ROLLUP with GROUP BY } New versions of PostGIS with added geospatial tools } Lots and lots of administrative improvements *EnterpriseDB PostgreSQL Plus Advanced Server PostgreSQL and PPAS* new capabilities PostgreSQL MigrationTeam 11-Feb-163
  • 4. } PostgreSQL now speaks JSON* fluently. You have two choices for full JSON support: MongoDB and PostgreSQL We are JSONic! PostgreSQL MigrationTeam 11-Feb-164 * and GeoJSON too!
  • 5. } Why is this such a really, really big deal? } From Gartner Group’s 2015 Magic Quadrant on Operational Databases By 2017,the“NoSQL” label will cease to distinguish DBMSs, which will reduce its value and result in it falling out of use. By 2017,all leading operational DBMSs will offer multiple data models,relational and NoSQL, in a single platform. } * Oracle and MySQL include a read-only JSON data type, but no UPDATE functions. MS SQLServer can present SQL results as JSON, but there is no JSON data type. JSON CRUD operations and pretty-print PostgreSQL MigrationTeam 11-Feb-165 PostgreSQL is for first, best and only RDBMS* to support CRUD and pretty-print on JSON.
  • 6. } JSON documents in RDBMSs read-only and indexable. The model was … } Create a JSON document } Store and index it in the database } Retreive the JSON document } Make changes to the document in the application } Put the changed JSON back in the database } PostgreSQL 9.5 adds ... } UPDATE values,included array elements and nested JSON } REMOVE nulls,which are common when converting from RDBMS } ADD elements or UPDATE if the element already exists JSON CRUD operations PostgreSQL MigrationTeam 11-Feb-166
  • 7. } JSON is intended to be both machine and human readable } But a JSON document is all on one line, without returns … not very human readable } Traditionally,JSON is “prettied” in the applicaiton code of with MongoDB } PostgreSQL 9.5 includes JSONB_PRETTY(), which presents JSON in human-readable form } Example from a table of airport JSON documents: SELECT JSONB_PRETTY(airports) FROM airports_json WHERE airports ->> 'ident' = 'KCGS'; JSON pretty-print PostgreSQL MigrationTeam 11-Feb-167
  • 8. College Park Airport, KCGS 8 { "name": "College Park Airport", "type": "small_airport", "ident": "KCGS", "region": "Maryland", "country": "United States", "elevation_ft": 48, "airport_keywords": [ "DC3", "ADIZ" ], "location": { "type": "Point", "coordinates": [ -76.9223022461, 38.9805984497 ] }, "airport_home_link": "http://www.collegeparkairport.aero/", "runways": [ { "he_ident": "33", "length_ft": 2607, "he_location": { "type": "Point", "coordinates": [ -76.9192, 38.9779
  • 9. } Database user accounts can have a security-function applied to all of their SQL } “tables can have row security policies that restrict,on a per-user basis,which rows can be returned by normal queries or inserted,updated,or deleted by data modification commands” PostgreSQL 9.5 documentation, 5.7 Row Security Policies Row-level security … for a later presentation PostgreSQL MigrationTeam 11-Feb-169
  • 10. } INSERT operator adds optional ON CONFLICT clause } DO NOTHING } DO UPDATE SET … COLUMN_NAME = <value_expression_or_subselect> WHERE ... } Ex. CREATE TABLE distributors ( id BIGSERIAL PRIMARY KEY, name TEXT); INSERT INTO distributors (name) VALUES ('Kirkland'), ('Peapod'); UPSERT: “UPDATE if matching, otherwise INSERT” PostgreSQL MigrationTeam 11-Feb-1610
  • 11. } Option I: if the record exists, do nothing INSERT INTO distributors (id, name) VALUES (2, 'Nature''s Promise') ON CONFLICT (id) DO NOTHING; } Option II: if the id exists, update the name INSERT INTO distributors (id, name) VALUES (2, 'Nature''s Promise') ON CONFLICT (id) DO UPDATE SET name = 'Nature''s Promise'; UPSERT: “UPDATE if matching, otherwise INSERT” PostgreSQL MigrationTeam 11-Feb-1611
  • 12. } Accounts get PROFILEs, which can define … } Failed login attempts } Password complexity function, re-use, expiration, etc. Password PROFILES for complexity and mgmt. (EDB) PostgreSQL MigrationTeam 11-Feb-1612
  • 13. } DEFAULT profile specifies FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWORD_LOCK_TIME UNLIMITED PASSWORD_LIFE_TIME UNLIMITED PASSWEORD_GRACE_TIME UNLIMITED PASSWORD_REUSE_TIME UNLIMITED PASSWORD_REUSE_MAX UNLIMITED PASSWORD_VERIFY_FUNCTION NULL } Database superusers can ALTER PROFILE } Functional equivalent and 100% syntactically compatible with Oracle RDBMS Password PROFILES for complexity and mgmt. (EDB) PostgreSQL MigrationTeam 11-Feb-1613
  • 14. } Previously, PostgreSQL audit logs only included the database username, such as JBOSS_USER } Logged the database user,not the person using the application } edb_audit_tagallows the application to “tag” each database session with an identifier that is written to the csv or xml audit log } Similar to Oracle application_context Audit application user (EDB) PostgreSQL MigrationTeam 11-Feb-1614 vs.
  • 15. } UTL_RAW package UTL_HTTP .WRITE_LINE & .WRITE_TEXT DBMS_SESSION. .SET_ROLE } WAIT n seconds in FOR UPDATE statements } Limits statement failures caused by locks (Even) more Oracle compatibility (EDB) PostgreSQL MigrationTeam 11-Feb-1615
  • 16. } PostgreSQL already has simple, stable and fast replication } Automatic or manual failover in MASTER => SLAVE partnerships } Now, the original MASTER database can be re- synchronized after a failover without a full database copy using pg_rewind } Makes replication failover a much smaller deal } Suitable for testing,patches,upgrades and other new business cases Re-sync replication partners after failover PostgreSQL MigrationTeam 11-Feb-1616
  • 17. } External data sources can appear as PostgreSQL tables, including constraints and inheritance } OS files,including JSON! } Other RDBMSs (Oracle, MySQL, etc.) via O/JDBC } Anything you have a connector for (pgbson for MongoDB) } Constraints are not enforced, but it means that a foreign table can be part of a foreign key Foreign table constraints and inheritance PostgreSQL MigrationTeam 11-Feb-1617
  • 18. } GROUP BY multiple columns … SELECT * FROM items_sold; brand | size | sales Foo | L | 10 Foo | M | 20 Bar | M | 15 Bar | L | 5 SELECT brand, size, sum(sales) FROM items_sold GROUP BY GROUPING SETS ((brand), (size), ()); brand | size | sum Foo | | 30 Bar | | 20 | L | 15 | M | 35 | | 50 New analytics for CUBE & ROLLUP with GROUP BY PostgreSQL MigrationTeam 11-Feb-1618
  • 19. 1` } More capabilities for aggregate functions using all sorts of combinations of columns and values … } Plus native support for many languages ... New analytics for CUBE & ROLLUP with GROUP BY PostgreSQL MigrationTeam 11-Feb-1619
  • 20. } PostGIS 2.2 installed with PostgreSQL and PPAS 9.5 included with PostgreSQL. Simpler & cheaper the Oracle and ESRI } ST_SubDivide divides large shapes } 3D operators for Known Nearest Neighbor (KNN) } Compressed output toTiny Well Known Text (TWKB) } GeoJSON generator } More & faster functions for geometry data type New PostGIS with added geospatial tools PostgreSQL MigrationTeam 11-Feb-1620
  • 21. } New index type for sorted ranges of data (like timestamps) BRIN } Select sample data from large tables } Speed up CREATE INDEX } SSL diagnostic view } View into progress of replication } Hint suggestions for mistyped column names } SELECT with skip locked option Lots and lots of administrative improvements PostgreSQL MigrationTeam 11-Feb-1621
  • 22. } Example SELECT elevation FROM airports LIMIT 10; … but the actual column is airports.elevation_ft ERROR: column "elevation" does not exist HINT: Perhaps you meant to reference the column "airports.location" or the column "airports.elevation_ft". Hint suggestions for mistyped column names PostgreSQL MigrationTeam 11-Feb-1622
  • 23. } JSON CRUD operations and pretty-print } Row-level security … saved for a later presentation } UPSERT“UPDATE if matching, otherwise INSERT” } Password complexity, expiration and management (EDB*) } Re-sync replication partners after failover } Foreign table constraints and inheritance } New analytics for CUBE and ROLLUP with GROUP BY } New versions of PostGIS with added geospatial tools } Lots and lots of administrative improvements *EnterpriseDB PostgreSQL Plus Advanced Server PostgreSQL and PPAS new capabilities PostgreSQL MigrationTeam 11-Feb-1623