'How to reload PostgreSQL configuration

I am trying to enable the transaction logs in PostgreSQL, where query run time is more than 3 seconds, by setting this flag

log_min_duration_statement = 3000

How to reload the configuration file without restarting the Postgres?

I've tried the below options and got these errors

1) postgres=# select pg_reload_config();
**ERROR:  function pg_reload_config() does not exist**
LINE 1: select pg_reload_config();
2) postgres@ospostgresql:/$ /usr/lib/postgresql/11/bin/pg_ctl reload
pg_ctl: no database directory specified and environment variable PGDATA unset
Try "pg_ctl --help" for more information.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source