Client connection defaults/other defaults v18

These parameters set miscellaneous client connection defaults.

oracle_home

Parameter type: String

Default value: none

Range: n/a

Minimum scope of effect: Cluster

When value changes take effect: Restart

Required authorization to activate: EDB Postgres Advanced Server service account

Before creating a link to an Oracle server, you must direct EDB Postgres Advanced Server to the correct Oracle home directory. Set the LD_LIBRARY_PATH environment variable on Linux or PATH on Windows to the lib directory of the Oracle client installation directory.

Alternatively, you can set the value of the oracle_home configuration parameter in the postgresql.conf file. The value specified in the oracle_home configuration parameter overrides the LD_LIBRARY_PATH environment variable in Linux and PATH environment variable in Windows.

Note

The oracle_home configuration parameter must provide the correct path to the Oracle client, that is,OCI library.

To set the oracle_home configuration parameter in the postgresql.conf file, add the following line:

oracle_home = '<lib_directory>'

<lib_directory> is the name of the oracle_home path to the Oracle client installation directory that contains libclntsh.so in Linux and oci.dll in Windows.

After setting the oracle_home configuration parameter, you must restart the server for the changes to take effect. Restart the server:

  • On Linux, using the systemctl command or pg_ctl services

  • On Windows, from the Windows Services console

odbc_lib_path

Parameter type: String

Default value: none

Range: n/a

Minimum scope of effect: Cluster

When value changes take effect: Restart

Required authorization to activate: EDB Postgres Advanced Server service account

If you're using an ODBC driver manager and if it's installed in a nonstandard location, specify the location by setting the odbc_lib_path configuration parameter in the postgresql.conf file:

odbc_lib_path = 'complete_path_to_libodbc.so'

The configuration file must include the complete pathname to the driver manager shared library, which is typically libodbc.so.

edb_role_last_login

Parameter type: Boolean

Default value: False

Possible values: TRUE, YES, ON, 1, FALSE, NO, OFF, 0

Range: n/a

Minimum scope of effect: Cluster

Required authorization to activate: Superuser and Users with SET privilege.

The edb_role_last_login GUC controls whether the rollastlogin timestamp in the pg_authid catalog is updated upon a successful login. When enabled, this parameter facilitates tracking user and role login activity, which is crucial for security features like INACTIVE_ACCOUNT_TIME.

The last_login timestamp is only recorded when edb_role_last_login is explicitly set to a "true" value. Its behavior is consistent regardless of the method used to set the GUC.

The possible values to enable logging are TRUE, YES, ON, 1, and the possible values to disable logging are FALSE, NO, OFF, 0.

Methods of Setting the GUC:

The edb_role_last_login GUC can be configured using standard PostgreSQL methods:

  • ALTER SYSTEM SET: This command modifies the postgresql.conf file and requires a server reload to take effect globally.

    ALTER SYSTEM SET edb_role_last_login = 'ON';
  • Direct Modification of postgresql.conf: You can manually edit the postgresql.conf file and set the parameter. A server restart or reload is required.

    edb_role_last_login = 'on'
  • SET Command: This command sets the parameter for the current session only.

    SET edb_role_last_login = 'TRUE';

    Changes made with SET can be reset using RESET edb_role_last_login or RESET ALL.

Error Handling:

  • Attempting to set edb_role_last_login with invalid boolean representations (e.g., 'abc', '2') will result in an error.

Verification and Access

  • The effective setting of edb_role_last_login can be confirmed by querying catalog views such as pg_settings.

    SELECT name, setting, unit, short_desc FROM pg_settings WHERE name = 'edb_role_last_login';
  • The rollastlogin column in the pg_authid catalog can be queried to view the last login timestamps for roles.

    SELECT rolname, rollastlogin FROM pg_authid;

    Non-superuser roles can access these catalogs only if they have permission.