How to find the PostgreSQL server uptime

In this article, we will see how to find the PostgreSQL server uptime. To find the PstgreSQL server uptime, we use PostgreSQL built-in function pg_postmaster_start_time(). Or by checking the time host and postgresql server start time.

Find the PostgreSQL server uptime

Continue reading How to find the PostgreSQL server uptime

How to get the current Unix timestamp from PostgreSQL?

In this article, we will see how to get the current Unix timestamp from PostgreSQL?

The unix time stamp is a way to track time as a running total of seconds. This count starts at the Unix Epoch on January 1st, 1970 at UTC.

Getting the Unix timestamp from a postgresql timestamptz like now() is simple by using either of below queries.
Continue reading How to get the current Unix timestamp from PostgreSQL?