Fujitsu Logo
ENQUIRE

    Knowledge articles - Configuration

    Do the settings max_connections and max_prepared_transactions consume memory even when there is no database access? Or do they cause memory to be consumed only when database connection is performed or when using prepared transactions?KB2001

    The max_connections and max_prepared_transactions settings specified in postgresql.conf affect shared memory usage, which is allocated when the database server starts. The acquired shared memory is used for database connection and prepared transactions, etc.

    Therefore, memory is consumed even when database access is not performed.

    Applicable to

    Product: FUJITSU Enterprise Postgres SE, FUJITSU Enterprise Postgres AE, FUJITSU Enterprise Postgres for Kubernetes, PostgreSQL

    Architecture: X86, S390x

    Operating System: Windows, Linux

    Versions: from 9.5

    How do I reflect changes to pg_hba.conf and recovery.conf?KB2002

    User changes to be saved in the database cluster require restarting the cluster or reloading the configuration files to take effect.

    • To reflect changes in pg_hba.conf, run pg_ctl reload from the command line or execute SELECT pg_reload_conf(); as the superuser.
    • To reflect changes in recovery.conf, run pg_ctl restart from then command line on the standby server.
      Note that recovery.conf has been deprecated in version 12. Changes related to recovery on the standby database cluster instance must be specified in postgresql.conf, and might require restarting the database cluster instance.

    Applicable to

    Product: FUJITSU Enterprise Postgres SE, FUJITSU Enterprise Postgres AE, PostgreSQL

    Architecture: X86, S390x

    Operating System: Windows, Linux

    Versions: from 9.5

    Is it possible to change the data storage location or backup data storage location for an instance already created?KB2003

    Yes, it is possible to change, but special care needs to be taken care, because it involves database cluster to be stopped and restarted, and it will cause outage to users.

    To change the data storage location, follow the steps below:

    • Keep your new data storage location ready (e.g., /var/lib/postgres12_backup) with the same permissions as the existing data storage location (/var/lib/postgres12).
    • Shut down your current database cluster instance.
      Run pg_ctl stop or use your FUJITSU Enterprise Postgres service.
    • Copy files from the current data storage location to new one using rsync -av (-a preserves file and folder permissions at the new location, and –v displays verbose output):
      rsync -av /var/lib/postgres12/* /var/lib/postgres12_backup/
      If rsync is not available on your system, then use the normal copy command.
    • To reduce size of the data storage location, consider deleting old unwanted logs.
    • Rename the old data storage directory from /var/lib/postgres12 to /var/lib/postgres12_old.
    • (optional) Rename the new data folder from /var/lib/postgres12_backup to /var/lib/postgres12 to match the original name.
    • Update the data_directory parameter in postgresql.conf if it is still set to the previous data storage location.
    • Start the database cluster instance and validate the data.
      pg_ctl start -D /var/lib/postgres12

    To change backup data storage location:

    • Change the backup_destination parameter in postgresql.conf.
      This parameter specifies the absolute path of the directory where pgx_dmpall will store backup data. It can only be set when specified on starting an instance - it cannot be changed dynamically, while an instance is active.

    Applicable to

    Product: FUJITSU Enterprise Postgres SE, FUJITSU Enterprise Postgres AE, PostgreSQL

    Architecture: X86, S390x

    Operating System: Windows, Linux

    Versions: from 9.5

    Read our latest blogs

    Read our most recent articles regarding all aspects of PostgreSQL and FUJITSU Enterprise Postgres.