Fujitsu Logo
ENQUIRE

    Knowledge articles -Installation/Setup

    icon-kb-article-instsetup-color-simple

    The error message FATAL: Could not access directory for core file "/var/tmp/xxxxx/yyyyy/core": No such file or directory was displayed when starting FUJITSU Enterprise Postgres via WebAdmin.KB8001

    This error occurs when the core files cannot be found in the /var/tmp directory (the default location for FUJITSU Enterprise Postgres core files set up by WebAdmin).

    This can happen because, by default, Linux deletes from /var/tmp any content that has not been accessed for 30 days or more.

    The directory to output core files is specified by the core_directory parameter in postgresql.conf. When you create an instance in WebAdmin, /var/tmp/xxxxx/yyyyy/core is set by default.

    Resolution

    Do one of the following:

    • Specify a directory other than /var/tmp to output core files, then restart FUJITSU Enterprise Postgres.
    • Modify the Linux OS environment so that contents of /var/tmp are not automatically deleted after 30 days.

    Modifying the Linux default behavior

    You can either remove the tmpwatch package (which is responsible for deleting content from /tmp and /var/tmp) or you disable the cron entry.

    Please note that in some cases, you may not be able to remove the tmpwatch package, because of its dependencies, so you may want to disable the cron entry instead.

    Removing the tmpwatch package

    Execute one of the commands below:

    # rpm -e tmpwatch

    or

    # yum remove tmpwatch

    Disable the cron entry

    Execute one of the commands below:

    # mv /etc/cron.daily/tmpwatch /other/location/tmpwatch.bkp

    or

    # rm /etc/cron.daily/tmpwatch

    For details, refer to FUJITSU Enterprise Postgres Installation and Setup Guide for Server > Chapter 4 - Setup > 4.2 - Preparations for setup > 4.2.2 - Preparing directories for resource placement [Linux version] [Windows version].

    Applicable to

    Product: FUJITSU Enterprise Postgres Standard Edition, FUJITSU Enterprise Postgres Advanced Edition

    Architecture: X86, S390x

    Operating System: Windows, Linux

    Versions: from 9.4

    How do I configure an initialized database instance (using initdb) so that a client can connect from a different machine?KB8002

    This answer is based on the following environment and configuration:

    • OS: RHEL 7
    • Instance port number: 27500
    • Client IP address: 192.168.93.10

    Follow the steps below:

    1. Add the entries below to postgresql.conf (* means listen on all adapters for a connection):
      listen_addresses = *
      port = 27500
    2. Register and reload the ports you want to connect to with firewall-cmd.
      1. Register the port.
        firewall-cmd-zone = public-add-port = 27500/tcp-permanent
      2. Reload the port.
        firewall-cmd-reload
    3. Create an entry in pg_hba.conf (host-based configuration file) that matches the client machine that you want to connect from.
      In the example below all machines on the 192.168.93.x subnet will match and use the md5 authentication method.
      host all all 192.168.93.0/24 md5
    4. Restart Postgres for the setting to take effect.
      $pg_ctl restart -D instance_destination_directory
    5. If the user's password is entered correctly, other hosts can connect.

    For details, refer to FUJITSU Enterprise Postgres Installation and Setup Guide for Server > Chapter 4 - Setup > 4.4 - Configuring remote connections > 4.4.2 - When an instance was created with the initdb command [Linux version] [Windows version].

    Applicable to

    Product: FUJITSU Enterprise Postgres Standard Edition, FUJITSU Enterprise Postgres Advanced Edition

    Architecture: X86, S390x

    Operating System: Linux

    Versions: from 9.4

    How do I configure FUJITSU Enterprise Postgres to use the pg_stat_statements extension?KB8003

    The pg_stat_statements library is pre-installed (along with other modules) in the contrib folder of the installation folder, so no additional libraries are required to be installed.

    Follow the steps below to configure FUJITSU Enterprise Postgres to use pg_stat_statements:

    1. Open postgresql.conf, and edit the shared_preload_libraries setting so that pg_stat_statements is the first entry in the list (if other libraries are specified, separate them with commas)
      shared_preload_libraries = 'pg_stat_statements'
    2. Restart the instance.
      pg_ctl restart -D instance_destination_directory
    3. Connect to the database and execute the CREATE EXTENSION command, specifying pg_stat_statements as the parameter.
      This will capture metrics for that database which can be viewed by querying the pg_stat_statements view.
      psql -d postgres -c "CREATE EXTENSION pg_stat_statements"

    Applicable to

    Product: FUJITSU Enterprise Postgres Standard Edition, FUJITSU Enterprise Postgres Advanced Edition

    Architecture: X86, S390x

    Operating System: Linux

    Versions: from 9.4

    The error message lock file "postmaster.pid" already exists is displayed when I start the database.KB8004

    This error message is displayed when the Postgres server has not been stopped properly, and fails to clean up the lock file postmaster.pid. This lock file is created when Postgres is started to prevent double booting; normally the file is removed when the database is shut down.

    To fix this issue, simply delete the postmaster.pid file, and then start the database agian.

    The postmaster.pid file is located in the data directory. Its location is determied by the -D option of the pg_ctl command, or by the PG_DATA environment variable if the command/option was not specified.

    Applicable to

    Product: FUJITSU Enterprise Postgres Standard Edition, FUJITSU Enterprise Postgres Advanced Edition, PostgreSQL

    Architecture: X86, S390x

    Operating System: Linux

    Versions: from 9.4

    The error message could not bind x socket: y is displayed when I start the database.KB8005

    This error occurs when the port specified in the port setting of postgresql.conf could not be used by the database, which happened because it is already in use either by a running instance of the database or by some other software.

    In order to fix this issue, you need to either:

    • Identify the software that is using the port and check if it is running on the correct port - if it is not, then take the appropriate action.

      To check the software using the port, use the the netstat command and grep for the port number (you may need to install the net-tools package if it is not already installed):

      netstat -ltnp | grep -w ':27500'

    -or-

    • Change the port number to be used by the instance by modifying the port setting of postgresql.conf.

      Make sure that the setting is not commented (comments in the configuration file begin with #).

    Applicable to

    Product: FUJITSU Enterprise Postgres Standard Edition, FUJITSU Enterprise Postgres Advanced Edition, PostgreSQL

    Architecture: X86, S390x

    Operating System: Linux

    Versions: from 9.4

    The error message unrecognized configuration parameter "x" in file "y" line z is displayed when I start the database using the pg_ctl command.KB8006

    Often, this error message is displayed when the correct path settings cannot be acquired using the PATH and LD_LIBRARY_PATH environment variables.

    This may happen because of one of the following:

    • The environment variables are not set to the FUJTISU Enterprise Postgres installation directory.
    • The environment variables are set to the FUJTISU Enterprise Postgres installation directory, but the installation directory for the open-source PostgreSQL is listed first.

    Example

    If the path is set to /usr/bin as below, and the OSS PostgreSQL is installed in that directory, the paramters specific to FUJITSU Enterprise Postgres will not be processed:

    PATH=/usr/bin

    The environment variables PATH and LD_LIBRARY_PATH must not only list the FUJITSU Enterprise Postgres installation directory - they must do list it before the PostgreSQL installation directory:

    Why is the database slow to start up, and does not appear to complete?KB8007

    The likely cause of this scenario is that the database is recovering from a crash or non-standard shutdown (such as immediate shutdown mode). You can verify whether it is in crash recovery mode by checking if the log file contains the message database system was not properly shut down; automatic recovery in progress.

    If a crash recovery is in progress, you will need to wait until it is complete, at which point the database will start up normally.

    You can reduce the time taken for crash recovery by increasing the frequency of checkpoints (reduce the values of max_wal_size and checkpoint_timeout in postgresql.conf to achieve that). But keep in mind that the higher the frequency of checkpoints, the higher the I/O load, so set an appropriate value for operational considerations.

    Applicable to

    Product: FUJITSU Enterprise Postgres Standard Edition, FUJITSU Enterprise Postgres Advanced Edition

    Architecture: X86, S390x

    Operating System: Linux, Windows

    Versions: from 9.4

    Read our latest blogs

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