Check PostgreSQL WAL Archiving with pg_stat_archiver

pg_stat_archiver summarizes archived WAL segments, failures, and when those statistics began accumulating.

How can you tell whether PostgreSQL is archiving its WAL files? The pg_stat_archiver view shows the most recently processed files, archiver failures, and when its counters were reset.

Continue reading “Check PostgreSQL WAL Archiving with pg_stat_archiver”

Listing all columns from a PostgreSQL database

In this short post, we are going to learn how to list all columns of every table in a PostgreSQL database.
We want to get the table schema, the name of the table, the name of the column and the data type defined for that column. Continue reading “Listing all columns from a PostgreSQL database”