Validating JSON data type column in PostgreSQL

In this post, we see how to validate the JSON/JSONB data type column in PostgreSQL 10. Most of the basic JSON/JSONB validation has been taken care in core of PostgreSQL itself, however you may have a requirement to validate the JSON format elements data types while inserting. For such requirements, you need to write a Pl/PgSQL function to validate the JSON data when accepting it in JSON/JSONB column in a CHECK constraint.

Continue reading →

Configure Streaming Replication in PostgreSQL 10

In this post, we configure Streaming Replication between One Master and 2 Standbys(Standby 1/Standby 2). Replication will be 1:1 but not cascading. Below are my setup details OS - RedHat Enterprise Linux 7.x Master IP - 172.31.34.34 Standby 1 IP - 172.31.32.122 Standby 2 IP - 172.31.41.249 Installation Today www.postgresql.org distributes binaries in different formats contributed by many companies. For this setup, am going to use YUM method of installation as shown in the main website link here.

Continue reading →