PostgreSQL Tutorial

PostgreSQL Tutorial: Merge Data using DBeaver

Summary: in this tutorial, you will learn how to merge data from files to PostgreSQL tables using DBeaver.

Continue reading

PostgreSQL Tutorial: CLOCK_TIMESTAMP Function

Summary: The PostgreSQL CLOCK_TIMESTAMP() function returns the current date and time with time zone, which is the time when the function executes.

Continue reading

PostgreSQL Tutorial: STATEMENT_TIMESTAMP Function

Summary: The PostgreSQL STATEMENT_TIMESTAMP() function returns the current date and time with time zone, which is the time when the current statement starts.

Continue reading

PostgreSQL Tutorial: Enable WAL Archiving

Summary: in this tutorial, you will learn how to enable WAL archiving in PostgreSQL.

Continue reading

PostgreSQL Tutorial: Audit through Logging

Summary: in this tutorial, you will learn how to setup audit logging in PostgreSQL.

Continue reading

PostgreSQL Tutorial: Setting up Slow Query Logging

Summary: in this tutorial, you will learn how to setup slow query logging in PostgreSQL.

Continue reading

PostgreSQL Tutorial: Query analysis using pg_stat_statements

Summary: The pg_stat_statements extension exposes a lot of query statistics that will be helpful in finding slow queries that need to be optimized. In this tutorial, we shall see some example queries to view some information from pg_stat_statements.

Continue reading

PostgreSQL Tutorial: Setting up Logical Replication

Summary: Built-in logical replication and logical decoding were introduced in PostgreSQL 10. Over a period of time, more and more features are being implemented within logical replication. It is helpful when a selected list of tables needs to be replicated from multiple OLTP databases to a single OLAP database for reporting and analysis.

Continue reading

PostgreSQL Tutorial: Setting up Streaming Replication

Summary: Streaming replication (physical replication), which is byte-by-byte replication, involves a continuous application of WAL records from Primary to Standby. As it uses a file-based log shipping method, it is one of the fastest replication methods when compared with logical replication or other trigger-based methods.

Continue reading