PostgreSQL On Amazon RDS - Amazon Relational Database Service PDF
PostgreSQL On Amazon RDS - Amazon Relational Database Service PDF
PostgreSQL On Amazon RDS - Amazon Relational Database Service PDF
AWS Documentation (/index.html) » Amazon Relational Database Service (RDS) (/rds/index.html) » User Guide (index.html) »
PostgreSQL on Amazon RDS
You can return to the original look by selecting English in the language selector above.
Amazon RDS supports DB instances running several versions of PostgreSQL. You can create
DB instances and DB snapshots, point-in-time restores and backups. DB instances running
PostgreSQL support Multi-AZ deployments, Read Replicas (version 9.3.5 and later),
Provisioned IOPS, and can be created inside a VPC. You can also use Secure Socket Layer (SSL)
to connect to a DB instance running PostgreSQL.
Before creating a DB instance, you should complete the steps in the Setting Up for Amazon
RDS (CHAP_SettingUp.html) section of this guide.
You can use any standard SQL client application to run commands for the instance from your
client computer. Such applications include pgAdmin, a popular Open Source administration
and development tool for PostgreSQL, or psql, a command line utility that is part of a
PostgreSQL installation. To deliver a managed service experience, Amazon RDS doesn't
provide host access to DB instances, and it restricts access to certain system procedures and
tables that require advanced privileges. Amazon RDS supports access to databases on a DB
instance using any standard SQL client application. Amazon RDS doesn't allow direct host
access to a DB instance by using Telnet or Secure Shell (SSH).
Amazon RDS for PostgreSQL is compliant with many industry standards. For example, you
can use Amazon RDS for PostgreSQL databases to build HIPAA-compliant applications and to
store healthcare-related information, including protected health information (PHI) under an
executed Business Associate Agreement (BAA) with AWS. Amazon RDS for PostgreSQL also
meets Federal Risk and Authorization Management Program (FedRAMP) security
requirements. Amazon RDS for PostgreSQL has received a FedRAMP Joint Authorization
Board (JAB) Provisional Authority to Operate (P-ATO) at the FedRAMP HIGH Baseline within
the AWS GovCloud (US-West) Region. For more information on supported compliance
standards, see AWS Cloud Compliance (https://aws.amazon.com/compliance/) .
To import PostgreSQL data into a DB instance, follow the information in the Importing Data
into PostgreSQL on Amazon RDS (PostgreSQL.Procedural.Importing.html) section.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 1/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Topics
The following are the common management tasks you perform with an Amazon RDS for
PostgreSQL DB instance, with links to relevant documentation for each task.
Task Area
There are prerequisites you must complete before you create your DB instance. For example, D
instances are created by default with a rewall that prevents access to it. You therefore must
create a security group with the correct IP addresses and network con guration to access the
DB instance.
If you are creating a DB instance for production purposes, you should understand how instanc
classes, storage types, and Provisioned IOPS work in Amazon RDS.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 2/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
If your AWS account has a default VPC, then your DB instance is automatically created inside
the default VPC. In some cases, your account might not have a default VPC, and you might
want the DB instance in a VPC. In these cases, create the VPC and subnet groups before you
create the DB instance.
You can use several di erent tools to import data into your PostgreSQL DB instance on Amaz
RDS.
PostgreSQL on Amazon RDS supports Read Replicas in both the same AWS Region and in a
di erent AWS Region from the master instance.
By default, DB instances are created with a rewall that prevents access to them. You therefor
must create a security group with the correct IP addresses and network con guration to acces
the DB instance.
In general, if your DB instance is on the EC2-Classic platform, you need to create a DB security
group. If your DB instance is on the EC2-VPC platform, you need to create a VPC security grou
If your DB instance is going to require speci c database parameters, you should create a
parameter group before you create the DB instance.
Creating Roles
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Roles)
Managing PostgreSQL Database Access
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Access)
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 3/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
After creating a security group and associating it to a DB instance, you can connect to the DB
instance using any standard SQL client application such as pgadmin III.
You can con gure your DB instance to take automated backups, or take manual snapshots, an
then restore instances from the backups or snapshots.
You can monitor a PostgreSQL DB instance by using CloudWatch Amazon RDS metrics, events
and enhanced monitoring.
You can do both major and minor version upgrades for your PostgreSQL DB instance.
You can access the log les for your PostgreSQL DB instance.
Find some of the best practices for working with PostgreSQL on Amazon RDS.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 4/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
When you create a DB instance in Amazon RDS, you know that the PostgreSQL version it's
based on has been tested and is fully supported by Amazon. The PostgreSQL community
releases new versions and new extensions continuously. You can try out new PostgreSQL
versions and extensions before they are fully supported. To do that, you can create a new DB
instance in the Database Preview Environment.
All DB instances are deleted 60 days after you create them, along with any backups and
snapshots.
You can only create a DB instance in a virtual private cloud (VPC) based on the Amazon
VPC service.
You can only create M4, T2, and R4 instance types. For more information about RDS
instance classes, see Choosing the DB Instance Class (Concepts.DBInstanceClass.html) .
You can't get help from AWS Support with DB instances. You can post your questions in
the RDS Database Preview Environment Forum
(https://forums.aws.amazon.com/forum.jspa?forumID=301) .
You can only use General Purpose SSD and Provisioned IOPS SSD storage.
You can't copy a snapshot of a DB instance to a production environment.
Some Amazon RDS features aren't available in the preview environment, as described
following.
Topics
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 5/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
The PostgreSQL extensions supported in the Database Preview Environment are listed in the
following table.
Extension Version
amcheck 1.1
bloom 1.0
btree_gin 1.3
btree_gist 1.5
citext 1.5
cube 1.4
dblink 1.2
dict_int 1.0
dict_xsyn 1.0
earthdistance 1.1
fuzzystrmatch 1.1
hstore 1.5
hstore_plper 1.0
intagg 1.1
antarray 1.2
isn 1.2
log_fdw 1.0
ltree 1.1
pg_freespacemap 1.2
pg_prewarm 1.2
pg_stat_statements 1.5
pg_trgm 1.4
pg_visibility 1.2
pgcrypto 1.3
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 6/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
pgrowlocks 1.2
pgstattuple 1.5
plperl 1.0
plpgsql 1.0
pltcl 1.0
postgres_fdw 1.0
sslinfo 1.2
tablefunc 1.0
test_parser 1.0
tsm_system_rows 1.0
tsm_system_time 1.0
unaccent 1.1
uuid_ossp 1.1
1. Sign in to the AWS Management Console and open the Amazon RDS console at
https://console.aws.amazon.com/rds/ (https://console.aws.amazon.com/rds/) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 7/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
You also can navigate directly to the Database Preview Environment (https://us-east-
2.console.aws.amazon.com/rds-preview/home?region=us-east-2#) .
Note
Amazon RDS supports DB instances running several editions of PostgreSQL. Use this section
to see how to work with PostgreSQL on Amazon RDS. You should also be aware of the limits
for PostgreSQL DB instances.
You can specify any currently supported PostgreSQL version when creating a new DB
instance. You can specify the major version (such as PostgreSQL 10), and any supported
minor version for the speci ed major version. If no version is speci ed, Amazon RDS defaults
to a supported version, typically the most recent version. If a major version is speci ed but a
minor version is not, Amazon RDS defaults to a recent release of the major version you have
speci ed. To see a list of supported versions, as well as defaults for newly created DB
instances, use the describe-db-engine-versions
(https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-engine-versions.html) AWS CLI
command.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 8/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For information about importing PostgreSQL data into a DB instance, see Importing Data into
PostgreSQL on Amazon RDS (PostgreSQL.Procedural.Importing.html) .
Topics
Topics
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 9/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 10/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For information on the Database Preview Environment, see Working with the Database
Preview Environment (CHAP_PostgreSQL.html#working-with-the-database-preview-environment) .
To access the Preview Environment from the console, select
https://console.aws.amazon.com/rds-preview/ (https://console.aws.amazon.com/rds-preview/) .
For information on extensions supported in this version, see PostgreSQL Version 12.x
Extensions and Modules Supported on Amazon RDS in the Database Preview Environment
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.Extensions.12x) .
PostgreSQL version 12 Beta 2 contains several improvements that are described in the
following links:
For information on the Database Preview Environment, see Working with the Database
Preview Environment (CHAP_PostgreSQL.html#working-with-the-database-preview-environment) .
To access the Preview Environment from the console, select
https://console.aws.amazon.com/rds-preview/ (https://console.aws.amazon.com/rds-preview/) .
This release contains an important security x and also bug xes and improvements done by
the PostgreSQL community. For more information on the security x, see the PosgreSQL
community announcement (https://www.postgresql.org/about/news/1949/) and security x CVE-
2019-10164 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=2019-10164) .
With this release, the pg_hint_plan extension has been updated to version 1.3.4.
For more information on the xes in PostgreSQL 11.4, see the PostgreSQL documentation
(https://www.postgresql.org/docs/11/release-11-4.html) .
PostgreSQL version 11.2 contains several bug xes for issues in release 11.1. For more
information on the xes in PostgreSQL 11.2, see the PostgreSQL documentation
(https://www.postgresql.org/docs/11/release-11-2.html) .
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 11.1 contains several improvements that were announced in PostgreSQL
11.1 Released! (https://www.postgresql.org/about/news/1905/) This version includes SQL stored
procedures that enable embedded transactions within a procedure. This version also includes
major improvements to partitioning and parallelism and many useful performance
improvements. For example, by using a non-null constant for a column default, you can now
use an ALTER TABLE command to add a column without causing a table rewrite.
PostgreSQL version 11.1 contains several bug xes for issues in release 11. For complete
details, see the PostgreSQL Release 11.1 documentation
(https://www.postgresql.org/docs/11/release-11-1.html) . Some changes in this version include
the following:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 12/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Segment size – The write-ahead logging (WAL) segment size has been changed from 16
MB to 64 MB.
Autovacuum improvements – To provide valuable logging, the parameter
rds.force_autovacuum_logging is ON by default in conjunction with the
log_autovacuum_min_duration parameter set to 10 seconds. To increase autovacuum
e ectiveness, the values for the autovacuum_max_workers and
autovacuum_vacuum_cost_limit parameters are computed based on host memory
capacity to provide larger default values.
Improved transaction timeout – The parameter
idle_in_transaction_session_timeout is set to 12 hours. Any session that has been
idle more than 12 hours is terminated.
Performance metrics – The pg_stat_statements module is included in
shared_preload_libraries by default. This avoids having to reboot the instance
immediately after creation. However, this functionality still requires you to run the
statement CREATE EXTENSION pg_stat_statements;. Also, track_io_timing is
enabled by default to add more granular data to pg_stat_statements.
The tsearch2 module is no longer supported – If your application uses tsearch2
functions, update it to use the equivalent functions provided by the core PostgreSQL
engine. For more information about the tsearch2 module, see PostgreSQL tsearch2
(https://www.postgresql.org/docs/9.6/static/tsearch2.html) .
The chkpass module is no longer supported – For more information about the chkpass
module, see PostgreSQL chkpass (https://www.postgresql.org/docs/10/chkpass.html) .
Extension updates for RDS PostgreSQL 11.1 include the following:
pgaudit is updated to 1.3.0.
pg_hint_plan is updated to 1.3.2.
pglogical is updated to 2.2.1.
plcoffee is updated to 2.3.8.
plv8 is updated to 2.3.8.
PostGIS is updated to 2.5.1.
prefix is updated to 1.2.8.
wal2json is updated to hash 9e962bad.
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
Note
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 13/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For information on the Database Preview Environment, see Working with the Database
Preview Environment (CHAP_PostgreSQL.html#working-with-the-database-preview-environment) .
To access the Preview Environment from the console, select
https://console.aws.amazon.com/rds-preview/ (https://console.aws.amazon.com/rds-preview/) .
This release contains an important security x and also bug xes and improvements done by
the PostgreSQL community. For more information on the security x, see the PosgreSQL
community announcement (https://www.postgresql.org/about/news/1949/) and security x CVE-
2019-10164 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=2019-10164) .
With this release, the pg_hint_plan extension has been updated to version 1.3.3.
For more information on the xes in PostgreSQL 10.9, see the PostgreSQL documentation
(https://www.postgresql.org/docs/10/release-10-9.html) .
PostgreSQL version 10.7 contains several bug xes for issues in release 10.6. For more
information on the xes in 10.7, see the PostgreSQL documentation
(https://www.postgresql.org/docs/10/release-10-7.html) .
Support for Amazon S3 import. For more information, see Importing Amazon S3 Data
into an RDS for PostgreSQL DB Instance
(PostgreSQL.Procedural.Importing.html#USER_PostgreSQL.S3Import) .
Multiple major version upgrade is available to PostgreSQL 10.7 from certain previous
PostgreSQL versions. For more information, see Major Version Upgrades for PostgreSQL
(USER_UpgradeDBInstance.PostgreSQL.html#USER_UpgradeDBInstance.PostgreSQL.MajorVersion)
.
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 14/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
PostgreSQL version 10.6 contains several bug xes for issues in release 10.5. For more
information on the xes in PostgreSQL 10.6, see the PostgreSQL documentation
(http://www.postgresql.org/docs/10/static/release-10-6.html) .
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
Note
Amazon RDS for PostgreSQL has announced the removal of the tsearch2
extension in the next major release. We encourage customers still using pre-8.3
text search to migrate to the equivalent built-in features. For more information
about migrating, see the PostgreSQL documentation
(https://www.postgresql.org/docs/9.6/static/textsearch-migration.html) .
PostgreSQL version 10.5 contains several bug xes for issues in release 10.4. For more
information on the xes in 10.5, see the PostgreSQL documentation
(http://www.postgresql.org/docs/10/static/release-10-5.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 15/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Support for the pglogical extension version 2.2.0. Prerequisites for using this
extension are the same as the prerequisites for using logical replication for PostgreSQL
as described in Logical Replication for PostgreSQL on Amazon RDS
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication) .
Support for the pg_similarity extension version 1.0.
Support for the pageinspect extension version 1.6.
Support for the libprotobuf extension version 1.3.0 for the PostGIS component.
An update for the pg_hint_plan extension to version 1.3.1.
An update for the wal2json extension to version 01c5c1e.
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 10.4 contains several bug xes for issues in release 10.3. For more
information on the xes in 10.4, see the PostgreSQL documentation
(http://www.postgresql.org/docs/10/static/release-10-4.html) .
Support for PostgreSQL 10 Logical Replication using the native publication and
subscription framework. RDS PostgreSQL databases can function as both publishers and
subscribers. You can specify replication to other PostgreSQL databases at the database-
level or at the table-level. With logical replication, the publisher and subscriber
databases need not be physically identical (block-to-block) to each other. This allows for
use cases such as data consolidation, data distribution, and data replication across
di erent database versions for 10.4 and above. For more details, refer to Logical
Replication for PostgreSQL on Amazon RDS
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication) .
The temporary le size limitation is user-con gurable. You require the rds_superuser
role to modify the temp_file_limit parameter.
Update of the GDAL library, which is used by the PostGIS extension. See Working with
PostGIS
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.PostGIS)
.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 16/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
Note
The tsearch2 extension is to be removed in the next major release. We
encourage customers still using pre-8.3 text search to migrate to the equivalent
built-in features. For more information about migrating, see the PostgreSQL
documentation (https://www.postgresql.org/docs/9.6/static/textsearch-migration.html)
.
PostgreSQL version 10.3 contains several bug xes for issues in release 10. For more
information on the xes in 10.3, see the PostgreSQL documentation
(http://www.postgresql.org/docs/10/static/release-10-3.html) .
Version 2.1.0 of PL/v8 is now available. If you use PL/v8 and upgrade PostgreSQL to a new
PL/v8 version, you immediately take advantage of the new extension but the catalog
metadata doesn't re ect this fact. For the steps to synchronize your catalog metadata with
the new version of PL/v8, see Upgrade PL/v8
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.UpgradingPLv8) .
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 17/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
PostgreSQL version 10.1 contains several bug xes for issues in release 10. For more
information on the xes in 10.1, see the PostgreSQL documentation
(http://www.postgresql.org/docs/10/static/release-10-1.html) and the PostgreSQL 10 community
announcement (https://www.postgresql.org/about/news/1786/) .
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 18/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
engine provides. For more information about using tsearch2, see tsearch2 module
(https://www.postgresql.org/docs/9.6/static/tsearch2.html) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
This release contains bug xes and improvements done by the PostgreSQL community.
With this release, the pg_hint_plan extension has been updated to version 1.2.5.
For more information on the xes in PostgreSQL 9.6.14, see the PostgreSQL documentation
(https://www.postgresql.org/docs/9.6/release-9-6-14.html) .
PostgreSQL version 9.6.12 contains several bug xes for issues in release 9.6.11. For more
information on the xes in 9.6.12, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.6/release-9-6-12.html) .
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.6.11 contains several bug xes for issues in release 9.6.10. For more
information on the xes in PostgreSQL 9.6.11, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.6/static/release-9-6-11.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
With this version, the logical decoding plugin wal2json has been updated to commit
9e962ba.
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 19/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
PostgreSQL version 9.6.10 contains several bug xes for issues in release 9.6.9. For more
information on the xes in 9.6.10, see the PostgreSQL documentation
(http://www.postgresql.org/docs/current/static/release-9-6-10.html) .
Support for the pglogical extension version 2.2.0. Prerequisites for using this
extension are the same as the prerequisites for using logical replication for PostgreSQL
as described in Logical Replication for PostgreSQL on Amazon RDS
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication) .
Support for the pg_similarity extension version 2.2.0.
An update for the wal2json extension to version 01c5c1e.
An update for the pg_hint_plan extension to version 1.2.3.
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.6.9 contains several bug xes for issues in release 9.6.8. For more
information on the xes in 9.6.9, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.6/static/release-9-6-9.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
The temporary le size limitation is user-con gurable. You require the rds_superuser
role to modify the temp_file_limit parameter.
Update of the GDAL library, which is used by the PostGIS extension. See Working with
PostGIS
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.PostGIS)
.
Update of the ip4r extension to version 2.1.1.
Update of the pgaudit extension to version 1.1.1. See Working with the pgaudit
Extension
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 20/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.pgaudit)
.
Update of the pg_repack extension to version 1.4.3. See Working with the pg_repack
Extension
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.pg_repack)
.
Update of the plv8 extension to version 2.1.2.
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.6.8 contains several bug xes for issues in release 9.6.6. For more
information on the xes in 9.6.8, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.6/static/release-9-6-8.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.6.6 contains several bug xes for issues in release 9.6.5. For more
information on the xes in 9.6.6, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.6/static/release-9-6-6.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
Supports the orafce extension, version 3.6.1. This extension contains functions that are
native to commercial databases, and can be helpful if you are porting a commercial
database to PostgreSQL. For more information about using orafce with Amazon RDS,
see Working with the orafce Extension
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.orafce) .
Supports the prefix extension, version 1.2.6. This extension provides an operator for
text pre x searches. For more information about prefix, see the pre x project on
GitHub (https://github.com/dimitri/pre x) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 21/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Supports version 2.3.4 of PostGIS, version 2.4.2 of pgrouting, and an updated version of
wal2json.
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.6.5 contains several bug xes for issues in release 9.6.4. For more
information on the xes in 9.6.5, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.6/static/release-9-6-5.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
This version also includes support for the pgrouting (http://pgrouting.org/) and postgresql-hll
(https://github.com/citusdata/postgresql-hll/releases/tag/v2.10.2) extensions, and the decoder_raw
(https://github.com/michaelpq/pg_plugins/tree/master/decoder_raw) optional module.
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.6.3 contains several new features and bug xes. This version includes
the following features:
Supports the extension pg_repack version 1.4.0. You can use this extension to remove
bloat from tables and indexes. For more information on using pg_repack with Amazon
RDS, see Working with the pg_repack Extension
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.pg_repack)
.
Supports the extension pgaudit version 1.1.0. This extension provides detailed session
and object audit logging. For more information on using pgaudit with Amazon RDS, see
Working with the pgaudit Extension
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.pgaudit)
.
Supports wal2json, an output plugin for logical decoding.
Supports the auto_explain module. You can use this module to log execution plans of
slow statements automatically. The following example shows how to use auto_explain
from within an Amazon RDS PostgreSQL session:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 22/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
LOAD '$libdir/plugins/auto_explain';
PostgreSQL version 9.6.2 contains several new features and bug xes. The new version also
includes the following extension versions:
PostgreSQL version 9.6.2 on Amazon RDS also supports altering enum values. For more
information, see ALTER ENUM for PostgreSQL
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.AlterEnum) .
For more information on the xes in 9.6.2, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.6/static/release-9-6-2.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.6.1 contains several new features and improvements. For more
information about the xes and improvements in PostgreSQL 9.6.1, see the PostgreSQL
documentation (https://www.postgresql.org/docs/9.6/static/release-9-6-1.html) . For information
on upgrading the engine version for your PostgreSQL DB instance, see Upgrading a
PostgreSQL DB Instance (CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) . For
information about performing parallel queries and phrase searching using Amazon RDS for
PostgreSQL 9.6.1, see the AWS Database Blog
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 23/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
(https://aws.amazon.com/blogs/database/performing-parallel-queries-and-phrase-searching-with-
amazon-rds-for-postgresql-9-6-1/) .
Full-text search support for phrases: Supports the ability to specify a phrase-search
query in tsquery input using the new operators <-> and <N>.
You can create a new PostgreSQL 9.6.1 database instance using the AWS Management
Console, AWS CLI, or RDS API. You can also upgrade an existing PostgreSQL 9.5 instance to
version 9.6.1 using major version upgrade. If you want to upgrade a DB instance from version
9.3 or 9.4 to 9.6, you must perform a point-and-click upgrade to the next major version rst.
Each upgrade operation involves a short period of unavailability for your DB instance.
This release contains bug xes and improvements done by the PostgreSQL community.
With this release, the pg_hint_plan extension has been updated to version 1.1.8.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 24/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For more information on the xes in PostgreSQL 9.5.18, see the PostgreSQL documentation
(https://www.postgresql.org/docs/9.5/release-9-5-18.html) .
PostgreSQL version 9.5.16 contains several bug xes for issues in release 9.5.15. For more
information on the xes in 9.5.16, see the PostgreSQL documentation
(http://www.postgresql.org/docs/current/release-9-5-16.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.5.15 contains several bug xes for issues in release 9.5.14. For more
information on the xes in 9.5.15, see the PostgreSQL documentation
(http://www.postgresql.org/docs/current/static/release-9-5-15.html) . For information on
upgrading the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL
DB Instance (CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.5.14 contains several bug xes for issues in release 9.5.13. For more
information on the xes in 9.5.14, see the PostgreSQL documentation
(http://www.postgresql.org/docs/current/static/release-9-5-14.html) .
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 25/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
PostgreSQL version 9.5.13 contains several bug xes for issues in release 9.5.12. For more
information on the xes in 9.5.13, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-5-13.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
Update of the pgaudit extension to version 1.0.6. See Working with the pgaudit
Extension
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.pgaudit)
.
Update of the pg_hint_plan extension to version 1.1.5.
Update of the plv8 extension to version 2.1.2.
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.5.12 contains several bug xes for issues in release 9.5.10 For more
information on the xes in 9.5.12, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-5-12.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.5.10 contains several bug xes for issues in version 9.5.9. For more
information on the xes in 9.5.10, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-5-10.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 26/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
PostgreSQL version 9.5.9 contains several bug xes for issues in version 9.5.8. For more
information on the xes in 9.5.9, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-5-9.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.5.7 contains several new features and bug xes. This version includes
the following features:
Supports the extension pgaudit version 1.0.5. This extension provides detailed session
and object audit logging. For more information on using pgaudit with Amazon RDS, see
Working with the pgaudit Extension
(Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.pgaudit)
.
Supports wal2json, an output plugin for logical decoding.
Supports the auto_explain module. You can use this module to log execution plans of
slow statements automatically. The following example shows how to use auto_explain
from within an Amazon RDS PostgreSQL session.
LOAD '$libdir/plugins/auto_explain';
PostgreSQL version 9.5.6 contains several new features and bug xes. The new version also
includes the following extension versions:
PostgreSQL version 9.5.6 on Amazon RDS also supports altering enum values. For more
information, see ALTER ENUM for PostgreSQL
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 27/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.AlterEnum) .
For more information on the xes in 9.5.6, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-5-6.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.5.4 contains several xes to issue found in previous versions. For more
information on the xes in 9.5.4, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-5-4.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
Beginning with PostgreSQL version 9.4, PostgreSQL supports the streaming of WAL changes
using logical replication decoding. Amazon RDS supports logical replication for PostgreSQL
version 9.4.9 and higher and 9.5.4 and higher. For more information about PostgreSQL logical
replication on Amazon RDS, see Logical Replication for PostgreSQL on Amazon RDS
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication) .
Beginning with PostgreSQL version 9.5.4 for Amazon RDS, the command ALTER USER WITH
BYPASSRLS is supported.
PostgreSQL versions 9.4.9 and later and version 9.5.4 and later support event triggers, and
Amazon RDS supports event triggers for these versions. You can use the master user account
can be used to create, modify, rename, and delete event triggers. Event triggers are at the DB
instance level, so they can apply to all databases on an instance. For more information about
PostgreSQL event triggers on Amazon RDS, see Event Triggers for PostgreSQL on Amazon
RDS (CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.EventTriggers) .
PostgreSQL version 9.5.2 contains several xes to issues found in previous versions. For more
information on the features in 9.5.2, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-5.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.5.2 doesn't support the db.m1 or db.m2 DB instance classes. If you
need to upgrade a DB instance running PostgreSQL version 9.4 to version 9.5.2 to one of
these instance classes, you need to scale compute. To do that, you need a comparable db.t2
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 28/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
or db.m3 DB instance class before you can upgrade a DB instance running PostgreSQL version
9.4 to version 9.5.2. For more information on DB instance classes, see Choosing the DB
Instance Class (Concepts.DBInstanceClass.html) .
Native PostgreSQL version 9.5.2 introduced the command ALTER USER WITH BYPASSRLS.
This release includes updates from previous versions, including the following:
CVE-2016-2193: Fixes an issue where a query plan might be reused for more than one
ROLE in the same session. Reusing a query plan can cause the query to use the wrong
set of Row Level Security (RLS) policies.
CVE-2016-3065: Fixes a server crash bug triggered by using pageinspect with BRIN
index pages. Because an attacker might be able to expose a few bytes of server
memory, this crash is being treated as a security issue.
UPSERT: Allow INSERTs that would generate constraint con icts to be turned into
UPDATEs or ignored
Add the GROUP BY analysis features GROUPING SETS, CUBE, and ROLLUP
Add row-level security control
Create mechanisms for tracking the progress of replication, including methods for
identifying the origin of individual changes during logical replication
Add Block Range Indexes (BRIN)
Add substantial performance improvements for sorting
Add substantial performance improvements for multi-CPU machines
PostGIS 2.2.2 - To use this latest version of PostGIS, use the ALTER EXTENSION UPDATE
statement to update after you upgrade to version 9.5.2. Example:
ALTER EXTENSION POSTGIS UPDATE TO '2.2.2'
Improved visibility of autovacuum sessions by allowing the rds_superuser account to
view autovacuum sessions in pg_stat_activity. For example, you can identify and
terminate an autovacuum session that is blocking a command from running, or
executing slower than a manually issued vacuum command.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 29/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
This release contains bug xes and improvements done by the PostgreSQL community. For
more information on the xes in PostgreSQL 9.4.23, see the PostgreSQL documentation
(https://www.postgresql.org/docs/9.4/release-9-4-23.html) .
PostgreSQL version 9.4.21 contains several bug xes for issues in release 9.4.20. For more
information on the xes in 9.4.21, the PostgreSQL documentation
(http://www.postgresql.org/docs/current/release-9-4-21.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.4.20 contains several bug xes for issues in release 9.4.19. For more
information on the xes in 9.4.20, the PostgreSQL documentation
(http://www.postgresql.org/docs/current/static/release-9-4-20.html) . For information on
upgrading the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL
DB Instance (CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.4.19 contains several bug xes for issues in release 9.4.18. For more
information on the xes in 9.4.19, see the PostgreSQL documentation
(http://www.postgresql.org/docs/current/static/release-9-4-19.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 30/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.4.18 contains several bug xes for issues in release 9.4.17. For more
information on the xes in 9.4.18, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.4/static/release-9-4-18.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
The plv8 extension has been updated to version 2.1.2. For the complete list of extensions
supported by Amazon RDS for PostgreSQL, see Supported PostgreSQL Features and
Extensions (CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.4.17 contains several bug xes for issues in release 9.4.15. For more
information on the xes in 9.4.17, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.4/static/release-9-4-17.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.4.15 contains several bug xes for issues in release 9.4.14. For more
information on the xes in 9.4.15, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-4-15.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 31/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
PostgreSQL version 9.4.14 contains several bug xes for issues in release 9.4.12. For more
information on the xes in 9.4.14, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.5/static/release-9-4-14.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.4.12 contains several xes to issue found in previous versions.
For more information on the xes in 9.4.12, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.4/static/release-9-4-12.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.4.11 contains several xes to issue found in previous versions.
For more information on the xes in 9.4.11, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.4/static/release-9-4-11.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
Beginning with PostgreSQL version 9.4, PostgreSQL supports the streaming of WAL changes
using logical replication decoding. Amazon RDS supports logical replication for PostgreSQL
version 9.4.9 and higher and 9.5.4 and higher. For more information about PostgreSQL logical
replication on Amazon RDS, see Logical Replication for PostgreSQL on Amazon RDS
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication) .
PostgreSQL versions 9.4.9 and later and version 9.5.4 and later support event triggers, and
Amazon RDS supports event triggers for these versions. The master user account can be used
to create, modify, rename, and delete event triggers. Event triggers are at the DB instance
level, so they can apply to all databases on an instance. For more information about
PostgreSQL event triggers on Amazon RDS, see Event Triggers for PostgreSQL on Amazon
RDS (CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.EventTriggers) .
PostgreSQL version 9.4.9 contains several xes to issue found in previous versions. For more
information on the xes in 9.4.9, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.4/static/release-9-4-9.html) . For information on upgrading the
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 32/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
Beginning with PostgreSQL version 9.4, PostgreSQL supports the streaming of WAL changes
using logical replication decoding. Amazon RDS supports logical replication for PostgreSQL
version 9.4.9 and higher and 9.5.4 and higher. For more information about PostgreSQL logical
replication on Amazon RDS, see Logical Replication for PostgreSQL on Amazon RDS
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication) .
PostgreSQL versions 9.4.9 and later and version 9.5.4 and later support event triggers, and
Amazon RDS supports event triggers for these versions. The master user account can be used
to create, modify, rename, and delete event triggers. Event triggers are at the DB instance
level, so they can apply to all databases on an instance. For more information about
PostgreSQL event triggers on Amazon RDS, see Event Triggers for PostgreSQL on Amazon
RDS (CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.EventTriggers) .
PostgreSQL version 9.4.7 contains several xes to issue found in previous versions. For more
information on the xes in 9.4.7, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.4/static/release-9-4-7.html) . For information on upgrading the
engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.4.7 includes improved visibility of autovacuum sessions by allowing the
rds_superuser account to view autovacuum sessions in pg_stat_activity. For example, you can
identify and terminate an autovacuum session that is blocking a command from running, or
executing slower than a manually issued vacuum command.
Note
Amazon RDS for PostgreSQL announced retirement of PostgreSQL 9.3 in
September 2018 and has stopped support for PostgreSQL version 9.3. We
encourage you to upgrade to PostgreSQL 9.4 or a higher version as early as
possible. For information on upgrading the engine version for your PostgreSQL
DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.3.25 contains several bug xes for issues in release 9.3.24. For more
information on the xes in 9.3.25, see the PostgreSQL documentation
(http://www.postgresql.org/docs/current/static/release-9-3-25.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 33/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.3.24 contains several bug xes for issues in release 9.3.23. For more
information on the xes in 9.3.24, see the PostgreSQL documentation
(http://www.postgresql.org/docs/current/static/release-9-3-24.html) .
Note
Amazon RDS for PostgreSQL has deprecated PostgreSQL version 9.3.x.
For information on upgrading the engine version for your PostgreSQL DB instance, see
Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.3.23 contains several bug xes for issues in release 9.3.22. For more
information on the xes in 9.3.23, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.3/static/release-9-3-23.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
The plv8 extension has been updated to version 2.1.2. For the complete list of extensions
supported by Amazon RDS for PostgreSQL, see Supported PostgreSQL Features and
Extensions (CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
Note
Amazon RDS for PostgreSQL has announced version 9.3.x is scheduled for
retirement in September, 2018. We encourage you to upgrade your 9.3.x
databases to the latest version at your earliest convenience.
PostgreSQL version 9.3.22 contains several bug xes for issues in release 9.3.20. For more
information on the xes in 9.3.22, see the PostgreSQL documentation
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 34/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For the complete list of extensions supported by Amazon RDS for PostgreSQL, see Supported
PostgreSQL Features and Extensions
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeaturesExtensions) .
PostgreSQL version 9.3.20 contains several bug xes for issues in version 9.3.19. For more
information on the xes in 9.3.20, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.3/static/release-9-3-20.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.3.19 contains several bug xes for issues in version 9.3.18. For more
information on the xes in 9.3.19, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.3/static/release-9-3-19.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.3.17 contains several xes for bugs found in previous versions. This
version contains the same extension components as version 9.3.16. For a list of xes in
version 9.3.17, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.3/static/release-9-3-17.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.3.16 contains several xes for bugs found in previous versions. This
version contains the same extension components as version 9.3.14. For a list of xes in
version 9.3.16, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.3/static/release-9-3-16.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 35/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
PostgreSQL version 9.3.14 contains several xes for bugs found in previous versions. For a list
of xes in version 9.3.14, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.3/static/release-9-3-14.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
PostgreSQL version 9.3.12 contains several xes for bugs found in previous versions. For a list
of xes in version 9.3.12, see the PostgreSQL documentation
(http://www.postgresql.org/docs/9.4/static/release-9-3-12.html) . For information on upgrading
the engine version for your PostgreSQL DB instance, see Upgrading a PostgreSQL DB Instance
(CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.Patching) .
Amazon RDS supports many of the most common PostgreSQL extensions and features.
Topics
PostgreSQL supports many PostgreSQL extensions and modules. Extensions and modules
expand on the functionality provided by the PostgreSQL engine. The following sections show
the extensions and modules supported by Amazon RDS for the major PostgreSQL versions.
Topics
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 36/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
PostgreSQL Version 12.x Extensions and Modules Supported on Amazon RDS in the
Database Preview Environment
(#PostgreSQL.Concepts.General.FeatureSupport.Extensions.12x)
PostgreSQL Version 11.x Extensions and Modules Supported on Amazon RDS
(#PostgreSQL.Concepts.General.FeatureSupport.Extensions.11x)
PostgreSQL Version 10.x Extensions and Modules Supported on Amazon RDS
(#PostgreSQL.Concepts.General.FeatureSupport.Extensions.101x)
PostgreSQL Version 9.6.x Extensions and Modules Supported on Amazon RDS
(#PostgreSQL.Concepts.General.FeatureSupport.Extensions.96x)
PostgreSQL Version 9.5.x Extensions Supported on Amazon RDS
(#PostgreSQL.Concepts.General.FeatureSupport.Extensions.95x)
PostgreSQL Version 9.4.x Extensions and Modules Supported on Amazon RDS
(#PostgreSQL.Concepts.General.FeatureSupport.Extensions.94x)
PostgreSQL Version 9.3.x Extensions Supported on Amazon RDS
(#PostgreSQL.Concepts.General.FeatureSupport.Extensions.93x)
PostgreSQL Extension Support for PostGIS on Amazon RDS
(#CHAP_PostgreSQL.Extensions.SupportedPerVersion)
Using the log_fdw Extension (#CHAP_PostgreSQL.Extensions.log_fdw)
You can nd a list of extensions supported by Amazon RDS in the default DB parameter
group for that PostgreSQL version. You can also see the current extensions list using psql by
showing the rds.extensions parameter as in the following example.
SHOW rds.extensions;
Note
Parameters added in a minor version release might display inaccurately when
using the rds.extensions parameter in psql.
PostgreSQL Version 12.x Extensions and Modules Supported on Amazon RDS in the
Database Preview Environment
The following table shows PostgreSQL extensions and modules for PostgreSQL version 12.x
that are currently supported by PostgreSQL in the Amazon RDS Preview Environment. For
more information on PostgreSQL extensions, see Packaging Related Objects into an
Extension (https://www.postgresql.org/docs/12/static/extend-extensions.html) .
Extension Version 12
Beta 3
address_standardizer (http://postgis.net/docs/Address_Standardizer.html) 3.0.0alpha3
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 37/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
address_standardizer_data_us 3.0.0alpha3
(http://postgis.net/docs/Address_Standardizer.html)
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 38/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
The following tables show PostgreSQL extensions and modules for PostgreSQL version 11.x
that are currently supported by PostgreSQL on Amazon RDS. "N/A" indicates that the
extension or module is not available for that PostgreSQL version. For more information on
PostgreSQL extensions, see Packaging Related Objects into an Extension
(https://www.postgresql.org/docs/11/static/extend-extensions.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 41/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
The following modules are supported as shown for PostgreSQL version 11.x.
The following tables show PostgreSQL extensions and modules for PostgreSQL version 10
that are currently supported by PostgreSQL on Amazon RDS. "N/A" indicates that the
extension or module is not available for that PostgreSQL version. For more information on
PostgreSQL extensions, see Packaging Related Objects into an Extension
(https://www.postgresql.org/docs/9.6/static/extend-extensions.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 42/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 43/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
(http://www.postgresql.org/docs/10/static/unaccent.html)
The tsearch2 extension is deprecated in version 10. The PostgreSQL team plans to remove
tsearch2 from the next major release of PostgreSQL.
The following modules are supported as shown for versions of PostgreSQL 10.
The following tables show PostgreSQL extensions and modules for PostgreSQL version 9.6.x
that are currently supported by PostgreSQL on Amazon RDS. "N/A" indicates that the
extension or module is not available for that PostgreSQL version. For more information on
PostgreSQL extensions, see Packaging Related Objects into an Extension
(https://www.postgresql.org/docs/9.6/static/extend-extensions.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 45/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
(http://www.postgresql.org/docs/9.6/static/pgstatstatements.html)
time.html)
The following modules are supported as shown for versions of PostgreSQL 9.6.
The following tables show PostgreSQL extensions and modules for PostgreSQL version 9.5.x
that are currently supported by PostgreSQL on Amazon RDS. "N/A" indicates that the
extension or module is not available for that PostgreSQL version. For more information on
PostgreSQL extensions, see Packaging Related Objects into an Extension
(https://www.postgresql.org/docs/9.6/static/extend-extensions.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 48/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
The following modules are supported as shown for versions of PostgreSQL 9.5.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 50/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
The following tables show the PostgreSQL extensions and modules for PostgreSQL version
9.4.x that are currently supported by PostgreSQL on Amazon RDS. "N/A" indicates that the
extension or module is not available for that PostgreSQL version. For more information on
PostgreSQL extensions, see Packaging Related Objects into an Extension
(https://www.postgresql.org/docs/9.4/static/extend-extensions.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 51/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
(http://www.postgresql.org/docs/9.6/static/pgbu ercache.html)
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 52/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
The following modules are supported as shown for versions of PostgreSQL 9.4.
Note
Amazon RDS for PostgreSQL has deprecated PostgreSQL version 9.3.x. We
strongly recommend that you upgrade to a major version, preferably version 9.6.x
or 10.x. See Upgrading the PostgreSQL DB Engine for Amazon RDS
(USER_UpgradeDBInstance.PostgreSQL.html) .
The following table shows PostgreSQL extensions for PostgreSQL version 9.3.x that are
currently supported by PostgreSQL on Amazon RDS. "N/A" indicates that the extension is not
available for that PostgreSQL version. For more information on PostgreSQL extensions, see
Packaging Related Objects into an Extension (https://www.postgresql.org/docs/9.6/static/extend-
extensions.html) .
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 53/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 54/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Before you can use the PostGIS extension, you must create it by running the following
command.
The following table shows the PostGIS component versions that ship with the Amazon RDS
for PostgreSQL versions.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 55/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 56/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Note
PostgreSQL 10.5 added support for the libprotobuf extension version 1.3.0 to
the PostGIS component.
The log_fdw extension is new for Amazon RDS for PostgreSQL version 9.6.2 and later. Using
this extension, you can access your database engine log using a SQL interface. In addition to
viewing the stderr log les that are generated by default on RDS, you can view CSV logs (set
the log_destination parameter to csvlog) and build foreign tables with the data neatly
split into several columns.
This extension introduces two new functions that make it easy to create foreign tables for
database logs:
list_postgres_log_files() – Lists the les in the database log directory and the le
size in bytes.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 57/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
file_name | file_size_bytes
----------------------------------+-----------------
postgresql.log.2016-08-09-22.csv | 1111
postgresql.log.2016-08-09-23.csv | 1172
postgresql.log.2016-08-10-00.csv | 1744
postgresql.log.2016-08-10-01.csv | 1102
(4 rows)
-----------------------------------
(1 row)
5. Select a sample of the log le. The following code retrieves the log time and error
message description.
log_time | message
----------------------------------+----------------------------------------------
-----------------------------
Tue Aug 09 15:45:18.172 2016 PDT | ending log output to stderr
Tue Aug 09 15:45:18.175 2016 PDT | database system was interrupted; last known up
at 2016-08-09 22:43:34 UTC
Tue Aug 09 15:45:18.223 2016 PDT | checkpoint record is at 0/90002E0
Tue Aug 09 15:45:18.223 2016 PDT | redo record is at 0/90002A8; shutdown FALSE
Tue Aug 09 15:45:18.223 2016 PDT | next transaction ID: 0/1879; next OID: 24578
Tue Aug 09 15:45:18.223 2016 PDT | next MultiXactId: 1; next MultiXactOffset: 0
Tue Aug 09 15:45:18.223 2016 PDT | oldest unfrozen transaction ID: 1822, in
database 1
(7 rows)
Upgrade PL/v8
If you use PL/v8 and upgrade PostgreSQL to a new PL/v8 version, you immediately take
advantage of the new extension but the catalog metadata doesn't re ect this fact. The
following steps synchronize your catalog metadata with the new version of PL/v8. These
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 59/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
steps are optional but we highly recommended you complete them to avoid metadata
mismatch warnings.
If your results contain values for an installed version that is a lower number than the
default version, you should continue with this procedure to update your extensions.
For example, the following result set indicates you should update:
The upgrade drops all your PL/v8 functions. Take a snapshot of your instance as a
precaution. You can continue with the following steps while the snapshot is being
created.
Obtain the count of the number of PL/v8 functions in your instance so you can validate
that they are all in place after the upgrade.
The following code returns the number of functions written in PL/v8, plco ee, or plls:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 60/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
The following code creates a le on your client machine in the /tmp directory.
5. Extract the "CREATE FUNCTION" DDL statement that is present in the dump le.
The following code extracts the DDL statement needed to create the functions. You use
this in subsequent steps to recreate the functions. The code uses the grep command to
extract the statements to a le.
The following code drops any PL/v8 based objects. The cascade option ensures that any
dependent are dropped.
If your PostgreSQL instance contains objects based on plco ee or plls, repeat this step
for those extensions.
The following code creates the PL/v8, plco ee, and plls extensions:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 61/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
The following code re-creates the functions that you extracted previously.
Validate that your functions have all been re-creating by re-running the following code:
Note
PL/v8 version 2 adds the following extra row to your result set:
Amazon RDS supports many of the most common PostgreSQL features. These include:
Topics
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 62/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Beginning with PostgreSQL version 10.4, RDS supports the publication and subscription SQL
Syntax for PostgreSQL 10 Logical Replication.
1. The AWS user account requires the rds_superuser role to perform logical replication for
the PostgreSQL database on Amazon RDS.
3. Modify the inbound rules of the security group for the publisher instance (production)
to allow the subscriber instance (replica) to connect. This is usually done by including
the IP address of the subscriber in the security group.
For more information on PostgreSQL logical replication, see the PostgreSQL documentation
(https://www.postgresql.org/docs/10/static/logical-replication.html) .
Beginning with PostgreSQL version 9.4, RDS supports the streaming of WAL changes using
logical replication slots. Amazon RDS supports logical decoding for a PostgreSQL DB instance
version 9.4.9 and higher and 9.5.4 and higher. You can set up logical replication slots on your
instance and stream database changes through these slots to a client such as
pg_recvlogical. Logical replication slots are created at the database level and support
replication connections to a single database.
The most common clients for PostgreSQL logical replication are the AWS Database Migration
Service or a custom-managed host on an AWS EC2 instance. The logical replication slot knows
nothing about the receiver of the stream, and there is no requirement that the target be a
replica database. If you set up a logical replication slot and don't read from the slot, data can
be written and quickly ll up your DB instance's storage.
PostgreSQL logical replication and logical decoding on Amazon RDS are enabled with a
parameter, a replication connection type, and a security role. The client for logical decoding
can be any client that is capable of establishing a replication connection to a database on a
PostgreSQL DB instance.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 63/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
1. The user account requires the rds_superuser role to enable logical replication. The user
account also requires the rds_replication role to grant permissions to manage logical
slots and to stream data using logical slots.
4. Create a logical replication slot as explained in the next section. This process requires
that you specify a decoding plugin. Currently we support the test_decoding output
plugin that ships with PostgreSQL.
For more information on PostgreSQL logical decoding, see the PostgreSQL documentation
(https://www.postgresql.org/docs/current/static/logicaldecoding-explanation.html) .
You can use SQL commands to work with logical slots. For example, the following command
creates a logical slot named test_slot using the default PostgreSQL output plugin
test_decoding.
slot_name | xlog_position
-----------------+---------------
regression_slot | 0/16B1970
(1 row)
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 64/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
SELECT pg_drop_replication_slot('test_slot');
pg_drop_replication_slot
-----------------------
(1 row)
For more examples on working with logical replication slots, see Logical Decoding Examples
(https://www.postgresql.org/docs/9.5/static/logicaldecoding-example.html) in the PostgreSQL
documentation.
Once you create the logical replication slot, you can start streaming. The following example
shows how logical decoding is controlled over the streaming replication protocol, using the
program pg_recvlogical included in the PostgreSQL distribution. This requires that client
authentication is set up to allow replication connections.
PostgreSQL versions 9.4.9 and later and version 9.5.4 and later support event triggers, and
Amazon RDS supports event triggers for these versions. The master user account can be used
to create, modify, rename, and delete event triggers. Event triggers are at the DB instance
level, so they can apply to all databases on an instance.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 65/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For example, the following code creates an event trigger that prints the current user at the
end of every DDL command.
For more information about PostgreSQL event triggers, see Event Triggers
(https://www.postgresql.org/docs/current/static/event-triggers.html) in the PostgreSQL
documentation.
There are several limitations to using PostgreSQL event triggers on Amazon RDS. These
include:
You cannot create event triggers on read replicas. You can, however, create event
triggers on a read replica master. The event triggers are then copied to the read replica.
The event triggers on the read replica don't re on the read replica when changes are
pushed from the master. However, if the read replica is promoted, the existing event
triggers re when database operations occur.
To perform a major version upgrade to a PostgreSQL DB instance that uses event
triggers, you must delete the event triggers before you upgrade the instance.
Amazon RDS for PostgreSQL supports multiple page sizes for PostgreSQL versions 9.4.11 and
later, 9.5.6 and later, and 9.6.2 and later. This support includes 4 K and 2 MB page sizes.
Huge pages reduce overhead when using large contiguous chunks of memory. You allocate
huge pages for your application by using calls to mmap or SYSV shared memory. You enable
huge pages on an Amazon RDS for PostgreSQL database by using the huge_pages parameter.
Set this parameter to "on" to enable huge pages.
For PostgreSQL versions 10 and above, huge pages are enabled for all instance classes. For
PostgreSQL versions below 10, huge pages are enabled by default for db.r4.*,
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 66/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
db.m4.16xlarge, and db.m5.* instance classes. For other instance classes, huge pages are
disabled by default.
When you set the huge_pages parameter to "on," Amazon RDS uses huge pages based on the
available shared memory. If the DB instance is unable to use huge pages due to shared
memory constraints, Amazon RDS prevents the instance from starting and sets the status of
the DB instance to an incompatible parameters state. In this case, you can set the huge_pages
parameter to "o " to allow Amazon RDS to start the DB instance.
The shared_buffers parameter is key to setting the shared memory pool that is required for
using huge pages. The default value for the shared_buffers parameter is set to a percentage
of the total 8K pages available for that instance's memory. When you use huge pages, those
pages are allocated in the huge pages collocated together. Amazon RDS puts a DB instance
into an incompatible parameters state if the shared memory parameters are set to require
more than 90 percent of the DB instance memory. For more information about setting shared
memory for PostgreSQL, see the PostgreSQL documentation
(https://www.postgresql.org/docs/9.6/static/runtime-con g-resource.html) .
Note
Huge pages are not supported for the db.m1, db.m2, and db.m3 DB instance
classes.
Tablespaces are supported in PostgreSQL on Amazon RDS for compatibility; since all storage
is on a single logical volume, tablespaces cannot be used for IO splitting or isolation. We have
benchmarks and practical experience that shows that a single logical volume is the best setup
for most use cases.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 67/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Under certain workloads, setting this parameter can improve performance and decrease IO
requirements. For more information about the stats_temp_directory, see the PostgreSQL
documentation. (https://www.postgresql.org/docs/current/static/runtime-con g-statistics.html#GUC-
STATS-TEMP-DIRECTORY)
For example, the following AWS CLI command sets the RAM disk parameter to 256 MB.
After you reboot, run the following command to see the status of the
stats_temp_directory:
postgres=>show stats_temp_directory;
stats_temp_directory
---------------------------
/rdsdbramdisk/pg_stat_tmp
(1 row)
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 68/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
Amazon RDS for PostgreSQL versions 9.6.2 and 9.5.6 and later support the ability to alter
enumerations. This feature is not available in other versions on Amazon RDS.
postgres=> CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue',
'purple');
CREATE TYPE
postgres=> CREATE TABLE t1 (colors rainbow);
CREATE TABLE
postgres=> INSERT INTO t1 VALUES ('red'), ( 'orange');
INSERT 0 2
postgres=> SELECT * from t1;
colors
--------
red
orange
(2 rows)
postgres=> ALTER TYPE rainbow RENAME VALUE 'red' TO 'crimson';
ALTER TYPE
postgres=> SELECT * from t1;
colors
---------
crimson
orange
(2 rows)
There are two types of upgrades you can manage for your PostgreSQL DB instance:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 69/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
For more information about OS updates, see Applying Updates for a DB Instance
(USER_UpgradeDBInstance.Maintenance.html#USER_UpgradeDBInstance.OSUpgrades) .
Database Engine Upgrades – When Amazon RDS supports a new version of a database
engine, you can upgrade your DB instances to the new version. There are two kinds of
upgrades: major version upgrades and minor version upgrades. Amazon RDS supports
both major and minor version upgrades for PostgreSQL DB instances.
For more information about PostgreSQL DB engine upgrades, see Upgrading the
PostgreSQL DB Engine for Amazon RDS (USER_UpgradeDBInstance.PostgreSQL.html) .
Amazon RDS supports Secure Socket Layer (SSL) encryption for PostgreSQL DB instances.
Using SSL, you can encrypt a PostgreSQL connection between your applications and your
PostgreSQL DB instances. You can also force all connections to your PostgreSQL DB instance
to use SSL.
Topics
SSL support is available in all AWS regions for PostgreSQL. Amazon RDS creates an SSL
certi cate for your PostgreSQL DB instance when the instance is created. If you enable SSL
certi cate veri cation, then the SSL certi cate includes the DB instance endpoint as the
Common Name (CN) for the SSL certi cate to guard against spoo ng attacks.
Use the sslrootcert parameter to reference the certi cate, for example,
sslrootcert=rds-ssl-ca-cert.pem.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 70/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
You can require that connections to your PostgreSQL DB instance use SSL by using the
rds.force_ssl parameter. By default, the rds.force_ssl parameter is set to 0 (o ). You
can set the rds.force_ssl parameter to 1 (on) to require SSL for connections to your DB
instance. Updating the rds.force_ssl parameter also sets the PostgreSQL ssl parameter to
1 (on) and modi es your DB instance’s pg_hba.conf le to support the new SSL
con guration.
You can set the rds.force_ssl parameter value by updating the parameter group for your
DB instance. If the parameter group for your DB instance isn't the default one, and the ssl
parameter is already set to 1 when you set rds.force_ssl to 1, you don't need to reboot
your DB instance. Otherwise, you must reboot your DB instance for the change to take e ect.
For more information on parameter groups, see Working with DB Parameter Groups
(USER_WorkingWithParamGroups.html) .
When the rds.force_ssl parameter is set to 1 for a DB instance, you see output similar to
the following when you connect, indicating that SSL is now required:
postgres=>
The encrypted status of your connection is shown in the logon banner when you connect to
the DB instance:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 71/72
10/1/2019 PostgreSQL on Amazon RDS - Amazon Relational Database Service
postgres=>
You can also load the sslinfo extension and then call the ssl_is_used() function to
determine if SSL is being used. The function returns t if the connection is using SSL,
otherwise it returns f.
You can use the select ssl_cipher() command to determine the SSL cipher:
If you enable set rds.force_ssl and restart your instance, non-SSL connections are refused
with the following message:
$ export PGSSLMODE=disable
$ psql postgres -h SOMEHOST.amazonaws.com -p 8192 -U someuser
psql: FATAL: no pg_hba.conf entry for host "host.ip", user "someuser", database
"postgres", SSL off
$
© 2019, Amazon Web Services, Inc. or its a liates. All rights reserved.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html 72/72