<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2826169&amp;fmt=gif">
Start trial

    Start trial

      What is Fujitsu Enterprise Postgres? G001

      Fujitsu Enterprise Postgres is a reliable and robust relational database based on (and fully compatible with) the world-renowned open source database system PostgreSQL.

      It contains a range of enhanced features for the enterprise environment including Mirroring Controller, Global Meta Cache, Data Masking.

      Click here for more information

      What is PostgreSQL?G002

      PostgreSQL is the world’s most advanced open source relational database system, and the 4th most used database globally. Its proven architecture has earned it a strong reputation for reliability, stability, data integrity, performance, extensibility, and standards-compliance.

      Click here for more information

      How does Fujitsu Enterprise Postgres differ from PostgreSQL?G003

      Fujitsu Enterprise Postgres provides all features of PostgreSQL, and extends them with the following for an enterprise solution with better performance, greater security, and enhanced reliability:

      Feature PostgreSQL Fujitsu Enterprise Postgres
      Generative AI for enterprise enables secure storage and protection of vector data for AI applications. picto-x-symbol-02 picto-check-mark-08
      RAG application development simplifies LLM application development through LangChain integration. picto-x-symbol-02 picto-check-mark-08
      In-database inference runs AI models directly inside the database while keeping data secure. picto-x-symbol-02 picto-check-mark-08
      MCP server integration simplifies connectivity between AI applications and business data. picto-x-symbol-02 picto-check-mark-08
      Transparent Data Encryption protects sensitive data at rest with built-in encryption. picto-x-symbol-02 picto-check-mark-08
      FIPS compliance provides FIPS 140-2 compliant cryptography for trusted data protection. picto-x-symbol-02 picto-check-mark-08
      Mirroring Controller delivers automated failover for high availability and business continuity. picto-x-symbol-02 picto-check-mark-08
      Connection Manager maintains database availability through intelligent connection management. picto-x-symbol-02 picto-check-mark-08
      Global Meta Cache accelerates query performance by reducing metadata access overhead. picto-x-symbol-02 picto-check-mark-08

      Click here for a full comparison of PostgreSQL and Fujitsu Enterprise Postgres

      Why choose Fujitsu Enterprise Postgres over proprietary databases?G004
      • Warranted community source code: Fujitsu warrants and provides support on community source code.

      • Reduced TCO: Licenses are available on a subscription model, with a flat rate based on the total number of cores. Flexible support plans are also available.

      • No vendor lock-in: Unlike proprietary database providers, Fujitsu does not attempt to lock its customers into restrictive contracts. Fujitsu customers can easily opt out and convert to an open source system because our database is based on PostgreSQL. There are no penalties or restrictive obligations.

      Click here for a full comparison of PostgreSQL and Fujitsu Enterprise Postgres

      Where can I get more information regarding Fujitsu Enterprise Postgres?G005

      Start by viewing our key features or contact our experts.

      Is a trial version of Fujitsu Enterprise Postgres available? Is it full-featured?G006

      Yes, a trial of the full version (no feature differences) is available free of charge for 90 days.

      Download the trial version of Fujitsu Enterprise Postgres

      What security features does Fujitsu Enterprise Postgres provide?G007
      • Transparent Data Encryption protects using Advanced Encryption Standard (AES), 256-bit transparent data encryption, PCI DSS-compliant. It provides data encryption, log encryption, and internal communication channel encryption.
      • Data Masking methods include character shuffling, nulling or deletion, encryption, masking, and word substitution, to protect sensitive data such as credit card numbers, bank account details, and other sensitive personal information.
      • Dedicated Audit Log extends PostgreSQL audit logging to improve accountability, traceability, and compliance. PCI DSS compliant with faster audit log analysis.
      • FIPS compliance secures data in transit and at rest with FIPS 140-2 compliant encryption.
      • Confidentiality management simplifies Role-Based Access Control (RBAC) configuration and auditing for efficient, error-free security management
      • Policy-based login security enforces password policies and account lockouts to prevent unauthorized access.
      • Cloud-based key management integrates with cloud key management services for simplified, secure encryption key management.

      Click here for more information

      What Artificial Intelligence features does Fujitsu Enterprise Postgres provide?G008

      Click here for more information

      Does Fujitsu Enterprise Postgres support High Availability?G009

      Yes. It enables continuous job processing with minimum downtime with features such a Mirroring Controller, Connection Manager, and Multi-Master Replication.

      Click here for more information

      Do you provide any additional services around PostgreSQL, such as upgrade and migration planning, monitoring, or AI advisory?G010

      Yes. We offer a range of PostgreSQL consulting services, including upgrade planning, migration advisory, security and compliance readiness, cloud adoption, monitoring solutions, AI integration, and proof-of-concept guidance to help you maximize the value of PostgreSQL.

      Click here for more information

      Do you provide any additional services around Fujitsu Enterprise Postgres, such as implementation, migration, training, or expert consulting?G011

      Yes. We provide professional services including implementation, migration, performance tuning, architecture reviews, health checks, training, and expert consulting.

      Click here for more information

      We would like to migrate our database to PostgreSQL or Fujitsu Enterprise Postgres. Can you help?G012

      Our team of experts can help you deliver a seamless migration from most popular database platforms to PostgreSQL or Fujitsu Enterprise Postgres. We perform a Database Migration Assessment, which provides a cost estimate and roadmap to ensure a smooth deployment process.

      Click for more information regarding the migration assessment service

      What operating environments are supported by Fujitsu Enterprise Postgres?G013

      For the full list of supported environments, check our Fujitsu Enterprise Postgres datasheet.

      Are the operating systems supported for running Fujitsu Enterprise Postgres in virtual environments the same as those supported for physical environments?G014

      Yes, they are — we support the same operating systems in both virtual and physical environments.

      For the full list of supported environments, check our Fujitsu Enterprise Postgres datasheet.

      In which industries is Fujitsu Enterprise Postgres used?G015

      Fujitsu Enterprise Postgres is used across all industries, such as finance, governments, healthcare, and logistics.

      Contact our experts for more information.

      What is the maximum number of machines that Fujitsu Enterprise Postgres can be installed on?G016

      Fujitsu Enterprise Postgres can be installed on an unlimited number of machines.

      Can I install the 64-bit Windows version of Fujitsu Enterprise Postgres on a 32-bit version of Windows?G017

      No, but you can install the client feature on either a 32-bit or 64-bit version of Windows.

      How much does Fujitsu Enterprise Postgres cost?G018

      The annual subscription license includes 24/7 support, and is licensed per CPU core (physical or virtual).

      For example, if a computer has 2 CPUs, each with 4 cores, then 8 licenses are required. Number of licenses = total number of cores

      Software installed and used on non-production environments purely for development, test, or user acceptance purposes costs 25% of the total number of cores on each computer, rounded up to the nearest core. Number of licenses = total number of cores x 0.25 (rounded up after the decimal point)

      How many active licenses do I need to purchase when installing Fujitsu Enterprise Postgres in a virtual environment?G019

      For private cloud environment, purchase as many licenses as the maximum number of virtual cores on the virtual machine available to Fujitsu Enterprise Postgres or the maximum number of physical cores on the server available to Fujitsu Enterprise Postgres, whichever is lower.

      For public cloud environment, purchase as many licenses as the maximum number of virtual cores on the virtual machine available to Fujitsu Enterprise Postgres (regardless of the number of physical cores or threads).

      Do you provide Fujitsu Enterprise Postgres support?G020

      We provide 24x7x365 support. For more information, check our Support page, or contact our experts.

      What is the support period for Fujitsu Enterprise Postgres products?G021

      The period is usually 7 years. However, this may be extended on a case-by-case basis. For more information, check our Support page, or the Support Guidebook.

      Does Fujitsu provide training for Fujitsu Enterprise Postgres?G022

      Yes. Fujitsu offers both Instructor-led Training and On-Demand Training for Fujitsu Enterprise Postgres.

      Instructor-led Training courses provide expert guidance with hands-on learning, while On-Demand Training delivers self-paced online courses that can be accessed anytime, anywhere to help DBAs, architects, and developers build practical Fujitsu Enterprise Postgres skills. Click here for more information

      Does Fujitsu Enterprise Postgres support embedded SQL? If so, in which languages?G023

      Fujitsu Enterprise Postgres supports SQL embedded in COBOL and C programs. Click here for more information

      What is the block size for data files that store table and index information?KB9001

      Both table and index files have a fixed block size of 8 KB.

      Platform: Windows, Linux  |  Version: All versions

      What version of client drivers does Fujitsu Enterprise Postgres provide?KB9002

      Fujitsu Enterprise Postgres provides client drivers used for enabling client to connect to database. They are based on versions of open-source software available at the time of release. Please note that the version will be in the state of purchase and will be updated to the new version by applying subsequent patches.

      For Fujitsu Enterprise Postgres 18 SP2, we provide .NET Data Provider (Npgsql 10.0.2, 8.0.9) , JDBC (PostgreSQL JDBC driver 42.7.10), and ODBC (psqlODBC 18.00.0001).

      For details, refer to Fujitsu Enterprise Postgres General Description > Appendix B - OSS supported by Fujitsu Enterprise Postgres

      Platform: Windows, Linux  |  Version: All versions

      How can I validate if the installed Fujitsu Enterprise Postgres is a trial or a full version?KB9003

      Execute the shell script FEP_CheckLicense.sh which is located in the server installed directory (the default directory path is /opt/fsepvversionserver64/LIC/.

      For full versions of Fujitsu Enterprise Postgres, the script displays Expiration (Indefinite), and for trial versions, it displays Expiration (XX days). The trial period is 90 days from the date of installation. XX days shows the number of days left until the expiration date.

      Platform: Linux  |  Version: All versions

      When I started Fujitsu Enterprise Postgres, which was set up with WebAdmin, the error FATAL: could not access directory for core file "/var/tmp/xxxxx/yyyyy/core": No such file or directory was displayed.Q008

      This error occurs when the core files cannot be found in/var/tmp(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. To solve this issue, do one of the following:

      • Specify a different directory to output core files, then restart Fujitsu Enterprise Postgres.
      • Modify the Linux default behavior so that contents of /var/tmp are not automatically deleted after 30 days. This can be done by either removing the tmpwatch package (which is responsible for deleting content from /tmp and /var/tmp) or by disabling 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.

      For details on creating or changing the core file directory, refer to the Fujitsu Enterprise Postgres Installation and Setup Guide for Server > Chapter 4 - Setup > 4.2 - Preparation for Setup > 4.2.2 - Preparing resource allocation directories.

      Platform: Linux  |  Version: All versions

      When I started Fujitsu Enterprise Postgres, the error could not bind @1@ socket: @2@ was displayed.Q032

      The port specified by the port parameter in postgresql.conf is already in use. Verify whether another database server instance or application is using the same port. If so, configure one of them to use a different port and then restart Fujitsu Enterprise Postgres.

      Platform: Linux  |  Version: All versions

      How do I configure a database initialized with initdb so that a client can connect from a different machine?KB8002

      Assuming that the OS is RHEL7, instance port number is 27500, and the client IP address is 192.168.93.10, follow the steps below:

      1. In postgresql.conf, add the entries listen_addresses = * (* means listen on all adapters for a connection), and port = 27500.
      2. Register the port that you want to connect to with firewall-cmd-zone = public-add-port = 27500/tcp-permanent, then reload the port with 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, for example: host all all 192.168.93.0/24 md5 (in this example, all machines on the 192.168.93.x subnet will match and use the md5 authentication method).
      4. Restart PostgreSQL for the setting to take effect with $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.

      Platform: Linux  |  Version: All versions

      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"

      Platform: Linux  |  Version: All versions

      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 again.

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

      Platform: Linux  |  Version: All versions

      When I start the database, the error message could not bind x socket: y is displayed.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.

      To solve this issue, do one of the following:

      • 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.
      • 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. Use netstat and grep to check the software using the port, for example: netstat -ltnp | grep -w ':27500'.
        You may need to install the net-tools package if it is not already installed.

      Platform: Linux  |  Version: All versions

      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 either because the environment variables are not set to the Fujitsu Enterprise Postgres installation directory, or because although they are set to the Fujitsu Enterprise Postgres installation directory, the installation directory for the open-source PostgreSQL is listed first.

      For details, refer to Fujitsu Enterprise Postgres Installation and Setup Guide for Server > 4.3 - Creating instances > 4.3.2 - Using the initdb command > 4.3.2.1 - Creating an instance

      Platform: Windows, Linux  |  Version: All versions

      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.

      For details on stopping Fujitsu Enterprise Postgres, refer to PostgreSQL documentation > Part III - Server administration > 18 - Server setup and operation > 18.5 - Shutting down the server. For details on max_wal_size and checkpoint_timeout, refer to PostgreSQL documentation > Part III - Server administration > 19 - Server configuration > 19.5 - Write ahead log > 19.5.2 - Checkpoints

      Platform: Windows, Linux  |  Version: All versions

      How do I confirm whether installation of Fujitsu Enterprise Postgres on the Windows server was successful?KB8008
      In Windows, select All Programs or All Apps > Fujitsu > Uninstall (middleware). In the Currently installed products tab, check the items listed in the Software Name column.
      The server is successfully installed if Fujitsu Enterprise Postgres Advanced Edition(64bit) is listed, and the client is successfully installed if Fujitsu Enterprise Postgres Client(32bit) and Fujitsu Enterprise Postgres Client(64bit) are installed.

      Platform: Windows  |  Version: All versions

      How do I start the Fujitsu Enterprise Postgres server using server commands on the Windows server?KB8009

      Follow the steps below to set up and start the database server using server commands, follow the instructions below.

      Step 1: Prerequisites

      1. Create an instance administrator.
      2. Create the data storage destination (required) and the transaction log storage destination (optional)

      For details, refer to Fujitsu Enterprise Postgres Installation and Setup Guide for Server > Chapter 4 - Setup > 4.2 - Preparations for setup

      Step 2: Create an instance using initdb

      1. Open the command prompt as the instance administrator created earlier.
      2. Update the PATH environment variable - add the bin and lib directories located under the server installation directory.
        SET PATH=C:\Program Files\Fujitsu\fsepv13server64\bin;C:\Program Files\Fujitsu\fsepvl3server64\lib;%PATH%
      3. Create a database cluster using initdb and specifying the data storage destination.
        initdb -D C:\work\database\instl --waldir.C:\work\transaction\ins it --Ic-collate--C- --1c-ctype--C- --encodingUTF8
      4. If successful, the message Success. You can now start the database server using: is displayed.

      For details, refer to Fujitsu Enterprise Postgres Installation and Setup Guide for Server > Chapter 4 - Setup > 4.3 - Creating instances > 4.3.2 - Using the initdb command > 4.3.2.1 - Creating an instance

      Step 3: Start the database server

      1. Register an instance in the Windows service.
        pg_ctl register -N "inst1" -U fepuser -P password -D C:\work\database\inst1
      2. Start an instance either from Administrative Tools or using the pg_ctl start command.
        > pg_ctl start -D C:\work\database\instl

      For details, refer to Fujitsu Enterprise Postgres Installation and Setup Guide for Server > Chapter 4 - Setup > 4.3 - Creating instances > 4.3.2 - Using the initdb command > 4.3.2.1 - Creating an instance

      Step 4: Connect to the database using psql.

      > psql -d postgres

      Platform: Windows  |  Version: All versions

      How do I set up Grafana on IBM LinuxONE™?KB8010

      Refer to Setting up Grafana on IBM LinuxONE™.

      Platform: Linux  |  Version: All versions

      How do I install the Prometheus adapter?KB8011

      Refer to Installing the Prometheus adapter.

      Platform: Linux  |  Version: All versions

      How do I install PostGIS?KB8012

      Refer to Installing PostGIS.

      Platform: Linux  |  Version: All versions

      When creating an instance using WebAdmin, the error Standalone instance ('xxx'): You do not have access rights to "yyy" is displayed.Q033

      Ensure that the OS user account logged into WebAdmin (which will be the instance administrator) is a local user. For details, refer to the Fujitsu Enterprise Postgres Installation Guide for Server > Chapter 4 - Setup > 4.2 - Preparation for Setup > 4.2.1 - Creating an instance administrator user.

      Platform: Linux  |  Version: All versions

      What is the block size of Fujitsu Enterprise Postgres table files and index files?Q001

      Table and index files in Fujitsu Enterprise Postgres use a fixed block size of 8 KB. This value is not configurable.

      Platform: Windows, Linux  |  Version: All versions

      What database drivers are provided with Fujitsu Enterprise Postgres, and what versions?Q002

      Fujitsu Enterprise Postgres bundles the standard PostgreSQL client drivers: JDBC, ODBC, the .NET Data Provider (Npgsql), libpq (C), and ECPG. The exact version of each driver depends on your Fujitsu Enterprise Postgres version and the maintenance level.

      For the driver versions shipped with a specific release, refer to the Installation and Setup Guide for Server or the Release Notes. Please note that the driver versions listed in the manuals reflect the initial product release and may be updated by later patches and service packs.

      Platform: Windows, Linux  |  Version: All versions

      Why should I take regular base backups if I'm relying on WAL files for recovery?Q003

      In Fujitsu Enterprise Postgres, it is recommended to take base backups at least once a day. Failure to take regular base backups can lead to increased disk space consumption and longer recovery times.

      Increased disk space consumption may occur because all WAL files generated since the most recent base backup must be retained to ensure recoverability. As the interval between base backups increases, so does the volume of retained WAL data. Recovery times may also increase because recovery requires restoring the most recent base backup and replaying all subsequent WAL files. If a long period has elapsed since the last base backup, a larger volume of WAL data must be replayed, which can increase recovery time.

      Background: PostgreSQL recovers a database by restoring a base backup and then applying WAL files up to the target recovery point. Consequently, all WAL files generated since the most recent base backup must be retained and replayed during recovery. Regular base backups help reduce both WAL retention requirements and recovery time. For details on base backup operations, refer to the Fujitsu Enterprise Postgres Operation Guide > Chapter 3 - Database Backup.

      Platform: Windows, Linux  |  Version: All versions

      The archived_wal subdirectory in the Fujitsu Enterprise Postgres backup data directory is growing large. What is causing this, and how can it be resolved?Q004

      The most likely cause is the accumulation of a large number of archive logs in the archived_wal directory because database backups have not been performed for an extended period.

      To resolve this issue, perform regular database backups using WebAdmin or the pgx_dumpall command. Regular backups allow obsolete archive logs to be deleted, preventing excessive growth of the archived_wal directory. Although the appropriate backup frequency depends on business and operational requirements, we recommend performing backups at least once per day. For details, refer to the Fujitsu Enterprise Postgres Operation Guide > Chapter 3 - Backing up the database and Fujitsu Enterprise Postgres Reference Guide > Chapter 3 - Server Commands > 3.2 - pgx_dmpall.

      Platform: Windows, Linux  |  Version: All versions

      When I selected data from an Oracle database using oracle_fdw bundled with Fujitsu Enterprise Postgres, the error invalid byte sequence for encoding is displayed.Q009

      This issue may occur because the Oracle data contains null characters (0x00), which are not supported by Fujitsu Enterprise Postgres.

      To solve the issue, either replace the null characters (0x00) in Oracle with other valid data (for example, half-width spaces), or create an Oracle view that replaces null characters with valid data using a function such as TRANSLATE and then access the view from Fujitsu Enterprise Postgres through oracle_fdw instead of accessing the table directly.

      Platform: Windows, Linux  |  Version: 10 and later

      When I used the substr function, which is a compatibility feature with Oracle databases in Fujitsu Enterprise Postgres, the error No function matches the given name and argument types. You might need to add explicit type casts. is displayed.Q010

      The cause may be incorrect configuration. Add oracle to search_path in postgresql.conf or qualify the substr function with oracle (i.e., oracle.substr).

      For details, refer to the Fujitsu Enterprise Postgres Application Development Guide > Chapter 9 - Oracle Database Compatibility > 9.2 -Notes on using Oracle database compatibility features > 9.2.1 - Notes on SUBSTR.

      Platform: Windows, Linux  |  Version: All versions

      When I executed an SQL statement in Fujitsu Enterprise Postgres that specified an unqualified table in the FROM clause, the error relation "table name" does not exist is displayed.Q013

      Check if the schema containing the table in the FROM clause is specified in the schema search path. If it is not, then either add the target schema to the schema search path or qualify the table name in the FROM clause with the schema name (i.e.,schema name.table name). If it is specified, ensure that the table name is correct and that it actually exists.

      For details on the schema search path, refer to the PostgreSQL Documentation > Part II - The SQL Language > Chapter 5 - Data Definition > 5.10 - Schemas > 5.10.3 - The Schema Search Path.

      Platform: Windows, Linux  |  Version: All versions

      Why does the execution time of the same SELECT statement vary so much depending on the time it is executed and the execution environment (production or test)?Q014

      The cause may be differences in execution plans. The execution plan is created by Fujitsu Enterprise Postgres based on the contents of the SELECT command and statistical information.

      Statistical information is collected through the execution of ANALYZE and VACUUM ANALYZE commands, and automatic vacuuming. Differences in the statistical information at the time of SELECT command execution, due to the presence or absence of these commands or features, may have led to different execution plans being created, resulting in differences in processing time.

      Use the EXPLAIN command to determine whether the execution plans are the same. If they differ, evaluate which execution plan is preferable and then make the execution plans consistent. This can be achieved by executing ANALYZE and fixing the statistical information with pg_dbms_stats, or by specifying the desired execution plan using pg_hint_plan.

      For details, refer to PostgreSQL documentation > Part II - The SQL Language > Chapter 14 - Performance Tips.

      For other product versions/levels, please refer to the corresponding manual sections.

      Platform: Windows, Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres, why is the response time for the first data retrieval after restarting the database server slower than subsequent data retrievals?Q015

      During the first data retrieval, table and index data (data on disk) is read from the storage medium into shared buffers (memory), and subsequent data retrievals use cached data in shared buffers (memory).

      To mitigate this issue, consider executing queries against the tables used by the application or running the pg_prewarm function on those tables after restarting the database server and before starting normal operations, or using a database storage device with higher I/O performance, such as an SSD.

      For details on pg_prewarm, refer to PostgreSQL documentation > Part VIII - Appendixes > Appendix F - Additional Supplied Modules >F.30 - pg_prewarm.

      Platform: Windows, Linux  |  Version: All versions

      A connection error occurred when using a connection service file in Fujitsu Enterprise Postgres.Q016

      The connection service file was not recognized in your environment. Check the settings of the connection service file pg_service.conf specified by the environment variable PGSERVICEFILE.

      The connection service file referenced is either ~/.pg_service.conf for the current user or the file specified by the PGSERVICEFILE environment variable. Additionally, the system-wide pg_service.conf file is read from either the directory returned by pg_config --sysconfdir or the directory specified by the PGSYSCONFDIR environment variable.

      If service definitions with the same name exist in both user-specific and system-wide files, the user-specific one takes precedence. When specifying a service with the psql command, specify it after psql command options such as the -q option, for example: psql -q -f zzz.sql -v startDate=%start_date% -v endDate=%end_date% service=teikyo.

      For details on the connection service file, refer to PostgreSQL documentation > Part IV - Client Interfaces >Chapter 32 - libpq - C Library > 32.17 - The Connection Service File.

      Platform: Windows, Linux  |  Version: All versions

      Why does Enterprise Postgres fail to start after multiple PRIMECLUSTER failovers?Q017

      Each failover requires Fujitsu Enterprise Postgres to perform crash recovery when the standby server is promoted. If failovers occur repeatedly, the amount of WAL (Write-Ahead Log) data that must be processed during recovery can increase significantly. As a result, the startup takes longer and may exceed the PRIMECLUSTER timeout period.

      To prevent startup timeouts during failover, consider increasing the PRIMECLUSTER timeout value or reducing the max_wal_size setting.

      The advantages of increasing the PRIMECLUSTER timeout value is that it allows Fujitsu Enterprise Postgres more time to complete crash recovery, and can prevent unnecessary failover failures caused by timeout detection. The disadvantages are that failure detection will take longer and service recovery may be delayed when an actual fault occurs.

      The advantages of reducing the max_wal_size setting are reduction in the amount of WAL data processed during recovery and potential shorter failover and startup times. The disadvantages are more frequent checkpoints and potential impact of database performance during normal operation.

      For details on failover switchover times, refer to the Fujitsu Enterprise Postgres Cluster Operation Guide > PRIMECLUSTER > Chapter 2 - Setting up Failover Operation > 2.8 - Registering resource information for Fujitsu Enterprise Postgres database cluster. For details on max_wal_size, refer to PostgreSQL documentation > Part II - The SQL Language > Chapter 14 - Performance Tips > 14.4 - Populating a Database > 14.4.6 - Increase max_wal_size.

      Platform: Linux  |  Version: All versions

      When deleting a schema, the error ERROR: out of shared memory is displayed and schema deletion failsQ018

      A single transaction accessed a large number of tables and acquired more locks than the shared lock table could handle. When the maximum number of locks is reached, Fujitsu Enterprise Postgres reports ERROR: out of shared memory.

      Increase the value of the max_locks_per_transaction and restart the database server. Note that a server restart is required for the change to take effect and increasing this value allows more locks to be held within a transaction.

      For details on max_locks_per_transaction, refer to PostgreSQL documentation > Part III - Server Administration > Chapter 19 - Server Configuration > 19.12 - Lock Management.

      Platform: Windows, Linux  |  Version: All versions

      In Enterprise Postgres, when re-creating logical replication, an "ERROR: duplicate key value violates unique constraint "pk_XXXXX"" occurred. What is the cause, and how do I resolve it?Q019

      [Cause]

      The cause is that data with the same key as the data being re-created already exists in the replication target.

      [Resolution]

      If data with the same key already exists in the replication target, logical replication will result in a duplicate key error. Before re-creating the subscription, delete the target data on the replication target, then re-create the logical replication.

      For details, refer to the manual: Fujitsu Enterprise Postgres 13 SP1 > PostgreSQL 13.3 Documentation > Part III. Server Administration > Chapter 30. Logical Replication > 30.3. Conflicts

      For other product versions/levels, please refer to the corresponding manual sections.

      Platform: Windows, Linux  |  Version: All versions

      The pg_statsinfo repository database in Fujitsu Enterprise Postgres is growing large and consuming significant disk space. How can I reduce its size and prevent further growth?Q022

      When a database contains many objects, snapshot sizes can increase and consume significant repository database space. You can check snapshot sizes with pg_statsinfo -l command.

      To prevent excessive growth of the repository database, regularly delete old snapshots using statsinfo.maintenance(timestampz) and configure automatic maintenance by applying the following settings in postgresql.conf.

      pg_statsinfo.enable_maintenance = 'snapshot'
      pg_statsinfo.maintenance_time = ''
      pg_statsinfo.repository_keepday = ''

      Platform: Windows, Linux  |  Version: All versions

      When I ran a .NET application with Fujitsu Enterprise Postgres, the error A timeout has occurred. If you were establishing a connection, increase Timeout value in ConnectionString. If you were executing a command, increase the CommandTimeout value in ConnectionString or in your NpgsqlCommand object. is displayed.Q023

      The time required to establish the connection exceeded the value specified in Timeout of the connection string, or the time required to execute the SQL command exceeded the value specified in CommandTimeout of the connection string or the CommandTimeout property of the NpgsqlCommand object.

      If the error occurred while establishing the connection, review the value specified for Timeout. If the error occurred while executing a SQL command, review the value specified for CommandTimeout. For details, refer to Fujitsu Enterprise Postgres Application Development Guide > Chapter 4 - .NET Data Provider > 4.3 - Connecting to the Database > 4.3.4 - Connection String.

      If the values specified for Timeout and CommandTimeout are appropriate, the timeout may be caused by high system load delaying SQL execution, lock contention with other SQL commands, or network issues. Check operating system performance metrics, database activity, and network traces to determine whether any of these conditions are occurring.

      For details, refer to Fujitsu Enterprise Postgres Operation Guide > Chapter 7 - Routine Operations > 7.6 - Monitoring Database Activity.

      Platform: Windows, Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres, the role "xxx" does not exist, relation "xxx" does not exist, or password authentication failed for user "xxx" is displayed.Q024

      The error may have occurred because the SQL command contains an identifier with uppercase letters that is not enclosed in double quotes. In Fujitsu Enterprise Postgres, unquoted identifiers are automatically converted to lowercase.

      If you create a role with CREATE ROLE "Joe", then grant privileges with GRANT ALL ON myschema.products to Joe (i.e., with Joe not enclosed by double quotes), the role name Joe will be interpreted as joe, resulting in error.

      To preserve uppercase letters in an identifier, enclose the identifier in double quotes: GRANT ALL ON myschema.products to "Joe".

      For details, refer to PostgreSQL Documentation > Part II - The SQL Language > Chapter 4 - SQL Syntax > 4.1 - Lexical Structure > 4.1.1. -Identifiers and Key Words.

      Platform: Windows, Linux  |  Version: All versions

      When I ran an application with Fujitsu Enterprise Postgres, the error current transaction is aborted, commands ignored until end of transaction block. is displayed.Q025

      The application may have a problem with its transaction handling logic. If an SQL command fails within a transaction block and the transaction is not rolled back, subsequent SQL commands may continue to be issued but will be ignored. After an error occurs, no further SQL commands in the transaction block are executed until the transaction is rolled back.

      If an SQL command fails within a transaction block, ensure that the application rolls back the transaction before executing any further SQL commands. For details on transactions, refer to PostgreSQL documentation > Part I - Tutorial > Chapter 3 - Advanced Features > 3.4 - Transactions.

      Platform: Windows, Linux  |  Version: All versions

      In a Fujitsu Enterprise Postgres streaming replication environment, after deleting files from the WAL directory and then restoring with pg_basebackup, the error could not open file "pg_wal/xxx.history" is displayed.Q026

      The pg_wal/xxx.history file could not be obtained when attempting to start the standby server instance. If the file was manually deleted from the primary server (for example, before pg_basebackup was executed), this error will be output when the standby server instance starts.

      Perform database recovery as follows: 1 Stop the primary server instance and the standby server instance, 2 Specify recovery_target_timeline = 'latest' in the primary server's postgresql.conf file, 3 Start the primary server instance and perform recovery, 4 Delete the standby server instance and re-create the standby server using pg_basebackup.

      For details on recovery_target_timeline, refer to PostgreSQL documentation > Part III - Server Administration > 19 - Server Configuration > 19.5 - Write Ahead Log > 19.5.5 - Recovery Target. For details on the pg_basebackup command, refer to PostgreSQL documentation > VI - Reference > II - PostgreSQL Client Applications > pg_basebackup. For details on recovery.conf, refer to PostgreSQL documentation > VIII - Appendixes > O - Obsolete or Renamed Features > O.1 - recovery.conf file merged into postgresql.conf.

      Platform: Windows, Linux  |  Version: All versions

      During a switchover test, I failed over Pgpool-II, but UPDATE statements could not be executed.Q029

      The environment is configured for synchronous replication, but the script specified in Pgpool-II's failover_command does not switch the database to asynchronous replication during failover.

      When detaching or promoting a database instance in the failover_command script, switch the new primary instance to asynchronous replication by removing or commenting out the synchronous_standby_names setting in postgresql.conf, and then executing pg_ctl reload. After failover, the new primary instance operates in asynchronous replication mode.

      If a detached database instance is later re-attached during failback, re-enable synchronous replication settings as required.

      For details on the parameters, refer to PostgreSQL documentation > III - Server Administration > 19 -Server Configuration > 19.6 - Replication > 19.6.2 - Primary Server > synchronous_standby_names.

      Platform: Linux  |  Version: All versions

      When I tried to process COBOL source code using embedded SQL with ecobpg, ecobpg terminated abnormally with an error.Q030

      The COBOL source code encoding may not match the encoding specified when the ecobpg command is executed. When analyzing source code, ecobpg interprets multibyte characters according to the locale or encoding specified at execution time.

      For example, if the source code is encoded in SJIS (Shift-JIS) but ecobpg is executed with a UTF-8 locale or the -E UTF8 option, SJIS multibyte characters may be interpreted as UTF-8. This can result in parsing errors or abnormal termination, such as a segmentation fault.

      When executing ecobpg on source code that contains multibyte characters, ensure that the source code encoding matches the locale or the encoding specified with the -E option. For details on the ecobpg command, refer to Fujitsu Enterprise Postgres Application Development Guide > Appendix D - ECOBPG - Embedded SQL using COBOL language > D.12 - PostgreSQL client applications > D.12.1 - ecobpg.

      Platform: Windows, Linux  |  Version: All versions

      How do I connect to a database from my application using JDBC driver?AD001

      You can connect to a database via an application using the DriverManager, PGConnectionPoolDataSource, and PGXADataSource JDBC driver classes.

      The following is an example of using the PGConnectionPoolDataSource class to connect to a database:

      import java.sql. *;
      import org.postgresql.ds.PGConnectionPoolDataSource;
      ...
      PGConnectionPoolDataSource source = new PGConnectionPoolDataSource ();
      source.setServerName ("sv1");
      source.setPortNumber (27500);
      source.setDatabaseName ("mydb");
      source.setUser ("myuser");
      source.setPassword ("myuser01");
      source.setLoginTimeout (20);
      source.setSocketTimeout (20);
      ...
      Connection con = source.getConnection ();

      For details, refer to the Fujitsu Enterprise Postgres Application Development Guide > Chapter 2 - JDBC driver > 2.3 - Connecting to the database.

      Platform: Windows, Linux  |  Version: All versions

      How do I cancel a query that has been running for a long time, or break a connection that has been waiting for a long time?AD002

      The query can be cancelled by using the pg_cancel_backend function, and connections can be forcibly broken using either the pg_terminate_backend function or pgAdmin.

      In the pg_cancel_backend and pg_terminate_backend functions, the process ID specifies the query to cancel or connection to break. The process ID can be found in the pg_stat_activity view or with the OS ps command.

      For details, refer to the Fujitsu Enterprise Postgres Operation Guide > Chapter 17 - Actions when an error occurs > 17.4 - Actions in response to an application error occurs andPostgreSQL documentation > Part II - The SQL language > Chapter 9 - Functions and operators > 9.27 - System administration functions > 9.28.2 - Server signaling functions.

      Platform: Windows, Linux  |  Version: All versions

      An application using JDBC driver shows the error The new connection was automatically closed because the same PooledConnection was opened or PooledConnection is already closed.AD003

      This may have happened because the application was trying to work on a Connection object that had already been closed. Review your application's handling of Connection objects as follows:

      • Are you executing a method on a Connection object that has already been closed?
      • Did you execute the getConnection method multiple times on the same instance of the PGPooledConnection or PGXAConnection class, and not on the Connection object returned by the last execution?
      • When you execute the getConnection method on a PGPooledConnection or PGXAConnection class, the relationship between these classes and the getConnection method to be executed is one-to-one. If the getConnection method is executed more than once using an instance of the same class, the previously created Connection object is closed.

      Platform: Windows, Linux  |  Version: All versions

      A System.OutOfMemoryException exception was raised when running a .NET application.AD004

      Possible causes include ExecuteReader() running on a table with binary column data types or other large data structures, or the connection string to the database specifying PreloadReader = True. These cause the data for the entire result set to be held in memory, which would consume a large amount of memory and may have exhausted memory.

      To solve the issue, consider changing from ExecuteReader() to ExecuteReader(CommandBehavior.SequentialAccess), or changing PreloadReader = True to PreloadReader = False.

      For details on ExecuteReader(CommandBehavior.SequentialAccess), refer to SqlCommand.ExecuteReader Method in the.NET documentation portion in Microsoft Docs. For details on PreloadReader, refer to Fujitsu Enterprise Postgres Application Development Guide > Chapter 4 - .NET Data Provider > 4.3 - Connecting to the database > 4.3.3 - Connection string.

      Platform: Windows, Linux  |  Version: All versions

      When I connect to a database from a .NET application, the error ERROR: 80027: Timeout while getting a connection from pool is displayed.AD005

      It is possible that the application is not disconnecting from the database, leaving unnecessary connections and exceeding the maximum number of connection pools. If a connection is requested beyond the maximum number of connection pools, it will wait until an available connection is found. If no available connection is found and the connection timeout period is exceeded, the connection request will timeout.

      Check the connection that has been waiting for a long time, and close any unnecessary connection. Also, ensure that the application is disconnecting from the database. If it already is, please review the maximum number of connection pools specified in the connection string - this is specified by the Maximum Pool Size keyword, and the default is 100.

      For details, refer to Fujitsu Enterprise Postgres Operation Guide > Chapter 7 - Periodic operation > 7.4 - Monitoring the connection state of an application, Fujitsu Enterprise Postgres Operation Guide > Chapter 17 - Actions when an error occurs > 17.4 - Actions in response to an application error, and Fujitsu Enterprise Postgres Application Development Guide > Chapter 4 - .NET Data Provider > 4.3 - Connecting to the database > 4.3.3 - Connection string.

      Platform: Windows, Linux  |  Version: All versions

      An application using JDBC driver shows the error 55000: PostgreSQL JDBC Driver ERROR: prepared transactions are disabled and 42704: PostgreSQL JDBC Driver ERROR: prepared transaction with identifier "xxx" does not exist.AD006

      This happened because PREPARE TRANSACTION was performed with the max_prepared_transactions parameter set to 0 in postgresql.conf. Set max_prepared_transactions to at least 1 in postgresql.conf.

      For details, refer to PostgreSQL documentation > Part III - Server administration > Chapter 19 - Server configuration > 19.4 - Resource consumption > 19.4.1 - Memory.

      Platform: Windows, Linux  |  Version: All versions

      Can I install ODBC drivers separately on the client side?AD007

      ODBC drivers cannot be installed separately, they are installed with the Fujitsu Enterprise Postgres client.

      For details on the versions of the ODBC drive installed with the Fujitsu Enterprise Postgres client, refer to Fujitsu Enterprise Postgres Installation and Setup Guide for Client > Chapter 2 - Installation and uninstallation of the Windows client > 2.1- Operating environment > 2.1.8 - Versions of open-source software used as the base for Fujitsu Enterprise Postgres drivers.

      Platform: Windows, Linux  |  Version: All versions

      When executing an SQL command in Fujitsu Enterprise Postgres, the error could not load library "installation_directory/lib/llvmjit.so": libLLVM-x.so: xxxxx: xxxxx. is displayed.Q028

      The jit or jit_provider parameter in postgresql.conf is configured incorrectly, or the required LLVM package is not installed. To use JIT compilation, install the required LLVM package and configure jit_provider to use the appropriate LLVM version. If JIT compilation is not required, set jit to off.

      For details, refer to PostgreSQL Documentation > Part III - Server Administration > Chapter 30 - Just-in-Time Compilation (JIT), and Fujitsu Enterprise Postgres Installation and Setup Guide for Server > Chapter 2 - Operating Environment > 2.1 - Required Operating System

      Platform: Windows, Linux  |  Version: All versions

      Do I need to install a separate package to use pg_stat_statements with Fujitsu Enterprise Postgres?Q031

      No. Modules included in the PostgreSQL contrib directory, such as pg_stat_statements, are installed automatically with Fujitsu Enterprise Postgres, so no additional package installation is required.

      To enable and use pg_stat_statements, add it to the shared_preload_libraries parameter in postgresql.conf (shared_preload_libraries = 'pg_stat_statements'), restart the instance (pg_ctl restart -D instance_directory), then connect to the database and create the extension (SELECT * FROM pg_stat_statements). Finally, verify that the pg_stat_statements view is accessible.

      Platform: Windows, Linux  |  Version: All versions

      How do I monitor and collect VACUUM processing statistics?KB5001

      You can refer to the pg_stat_all_tables view to check when the latest VACUUM ran for a database object. Monitoring should be enabled to capture the details and check for how long the VACUUM process ran.

      You can capture the details using any of the following methods:

      You can also run VACUUM manually to see how much time the VACUUM process takes.

      Platform: Windows, Linux  |  Version: All versions

      Long-term operations cause fragmentation of tables and indexes, which result in performance degradation. Are there cases when I should run something other than AUTOVACUUM (e.g., VACUUM FULL)? What indicators should I use to judge? Are there any other factors causing performance degradation in long-term operations?KB5002

      In most installations, it is sufficient to run AUTOVACCUM. If you are experiencing fragmentation, you might have to adjust the autovacuuming parameters to obtain the best results. For details, refer to PostgreSQL documentation > Part III - Server administration > Chapter 24 - Routine database maintenance tasks > 24.1 - Routine vacuuming.

      Because long-term operations can degrade database access performance, consider periodically running the REINDEX command to reorganize indexes. There is no formula available to estimate the execution time for REINDEX, so please refer to the actual measurement in your environment. For details, refer to Fujitsu Enterprise Postgres Operation Guide > Chapter 7 - Periodic Operations > 7.5 - Reorganizing Indexes.

      Platform: Linux  |  Version: All versions

      What data should I collect when the performance of the application is delayed?KB5003

      You should obtain database statistics. Information about server process, transactions, and locks can be very important to analyze performance issues or delay. However, these may be wiped out when the database is restarted or after a significant amount of time elapses. Hence, such information should be collected as soon as possible.

      Collect the information below to investigate the issue:

      • Server process information - Statistics about client connections to server processes:
        SELECT * FROM pg_stat_activity;
      • Transaction information - Information about duration of the transaction (query)
        SELECT pid, wait_event_type, wait_event, state, 
              (current_timestamp - xact_start): interval (3) AS duration, query 
        FROM pg_stat_activity WHERE pid <> pg_backend_pid ();
      • Lock information - List of tables waiting for a lock
        SELECT l.locktype, c.relname, l.pid, l.mode, a.query,
              (current_timestamp - xact_start) AS duration
        FROM pg_locks l
             LEFT OUTER JOIN pg_stat_activity a
               ON l.pid = a.pid
             LEFT OUTER JOIN pg_class c
               ON l.relation = c.oid
        WHERE NOT l.granted ORDER BY l.pid;

      For details, refer to Fujitsu Enterprise Postgres Operation Guide > Chapter 7 - Periodic Operations > 7.6 - Monitoring Database Activity.

      Platform: Windows, Linux  |  Version: All versions

      Why is searching for a remote server with postgres_fdw taking longer than searching on the remote server?KB5004

      This may be happening because postgres_fdw is configured to retrieve a small number of rows in a single fetch, causing it to communicate with the remote server more often, and thus taking longer.

      It is possible to reduce the amount of communication with the remote server by increasing the value of the fetch_size option of postgres_fdw.

      For details, refer to PostgreSQL documentation > Part VIII - Appendixes > Appendix F - Additional supplied modules > F.38 - postgres_fdw > F.38.1 - FDW options of postgres_fdw > F.38.1.4 - Remote execution options

      For an example on how to use postgres_fdw, refer to our PostgreSQL Insider article Linking to foreign data using foreign data wrappers.

      Platform: Windows, Linux  |  Version: All versions

      Database performance has degraded due to increased disk space usage caused by repeated updates and deletes.KB5005

      Database performance can degraded when it has a large amount of old version of updated and deleted data. PostgreSQL uses a write-once architecture for writing table data, to minimize lock contention. Therefore, when you execute UPDATE and DELETE statements, the table keeps the old version of the updated or deleted data.

      To solve this issue, enable AUTOVACUUM to collect the old version of updated and deleted data, or run the VACUUM and ANALYZE commands manually at regular intervals. But keep in mind that the VACUUM command may result in heavy I/O traffic and exclusive table lock, which can degrade the performance of other running sessions. When running the VACUUM command, set the relevant parameters to reduce the performance impact.

      For details, refer to PostgreSQL documentation > Part III - Server administration > Chapter 24 - Routine database maintenance tasks > 24.1 - Routine vacuuming

      Platform: Windows, Linux  |  Version: All versions

      How can I speed up index searches?KB5006
      • Option 1: Use VACCUM. Before changing any configuration parameters, check if there is a need to clean unused tuples (tables) from hard disk. If so, run VACUUM FULL tablename
      • Option 2: Increase the value of the work_mem parameter, which sets the amount of memory for sorting data and hash table operations. Increasing this parameter reduces disk swapping and speeds up index lookups. It can also be changed on a per-session basis by editing postgresql.conf or by using the SET statement. Be aware of large memory consumption because the sort and hash operations are performed at the same time, and the work_mem value is applied to each operation. For details, refer to PostgreSQL documentation > Part III - Server administration > Chapter 19 - Server configuration > 19.4 - Resource consumption > 19.4.1 - Memory
      • Option 3: (for Linux systems). Adjust the amount of disk readahead in the OS, so that it will understand that PostgreSQL is doing a sequential read, and consequently load the page into the cache first, which speeds up index lookups. To check the current readahead setting, use # blockdev -getra dev-name-for-db-area. To change the current readahead setting, use # blockdev -setra val-in-512-byte-sectorsdev-name-for-db-area. Be aware that the effect of the setting will be small if the value exceeds 16 MB (32768 in 512-byte sectors).

      Platform: Windows, Linux  |  Version: All versions

      How do I trace slow SQL?KB5007

      You can log SQL statements that take longer to execute than a threshold value (SQL statement execution time) by setting the log_min_duration_statement parameter in postgresql.conf. For details, refer to PostgreSQL documentation > Part III - Server administration > Chapter 19 - Server configuration > 19.8 - Error reporting and logging > 19.8.2 - When to log > log_min_duration_statement

      If you want to log execution plans in addition to SQL statements, use the contrib module auto_explain. By setting a threshold value (SQL statement execution time) for the auto_explain.log_min_duration parameter, execution plans for SQL statements that took longer than the threshold value can be output to the log. For details, refer to PostgreSQL documentation > Part VIII - Appendix > Appendix F - Additional supplied modules > F.3 - auto_explain

      Platform: Windows, Linux  |  Version: All versions

      It takes a long time to create the indexes. How can I speed this up?KB5008

      Indexes are created using memory set aside by the maintenance_work_mem parameter, so this value needs to be big enough for the table. If index creation is taking too long in your environment, then you need to increase its value, to around 3 times as much as required during tests.
      It is also recommended to create or rebuild the indexes during the maintenance window or off-peak hours to avoid any transaction blocking.

      Platform: Windows, Linux  |  Version: All versions

      Is there a way to determine if the server is running as the primary or standby by obtaining information from a database or a file on that server?KB4001

      When you use the streaming replication feature, you can use the pg_is_in_recovery() function to check the server status. It returns t if the server is a standby, or f if the server is a primary.

      In Fujitsu Enterprise Postgres, when you use Mirroring Controller to comprise the cluster system, you can use the Mirroring Controller command mc_ctl to determine which is primary and which is standby server as follows:

      mc_ctl status -M /mcdir/inst1

      The output will look like this:

      mirroring status
      -----------------
      switchable
       server_id  host_role  host           host_status  db_proc_status  disk_status 
      ------------------------------------------------------------------------------
       inst1p     standby    XXX.XX.XX.156  normal       normal          normal
       inst1s     primary    XXX.XX.XX.161  normal       normal          normal

      For details, refer to Fujitsu Enterprise Postgres Cluster Operation Guide - Database Multiplexing > Chapter 3 - Operations in database multiplexing mode > 3.3 - Checking the database multiplexing mode status .

      Platform: Windows, Linux  |  Version: All versions

      When source (master) and destination (standby) database servers are synchronized using the streaming replication feature, what is the impact on database server updates if I promote the destination (standby) server to master?KB4002

      If you promote the standby server while the source (master) is still active, the standby server will become an updatable instance (client connections besides those of a replication type can update the database cluster).

      This situation where both database instances of a cluster are updatable is referred to as a split-brain scenario. It means that some clients can make changes to the original master but not to the original standby, while other clients can make changes to the original standby but not to the master, eventuating in two separate database clusters containing different sets of data. At this point, no matter which database cluster you connect to, some data will be missing (as it will exist on the other database instance).

      Recovering from a split-brain scenario is difficult because you need to identify the differences and ensure that missing data on one server is recovered from the other server. A new standby will need to be created from the newly recovered master before a high availability architecture can again be achieved.

      Before promoting a standby server to master, it is vital that the master database (source) is fenced, i.e., that it is made inaccessible to any clients. For more details on this topic, look up STONITH (Shoot The Other Node In The Head).

      For details on how to avoid split brains when using pgpool-II, refer to our PostgreSQL Insider article PostgreSQL High Availability using pgpool-II.

      Platform: Linux  |  Version: All versions

      Is it possible to resume streaming replication operations on a standby instance that has been restored from a logical dump (performed with pg_dump or pg_dumpall) of the primary database cluster?KB4003

      No, the recommend approach is to use a binary dump such as that performed by using pg_basebackup. This ensures that the necessary information is written to the database data files and WAL files in order to begin playing the WAL files from the correct position.

      The risk of using a logical dump is that data written since the start of the backup is not included in that backup, and that a restore is not able to identify the correct place in the WAL to start synchronizing from.

      A restore of a binary backup by itself may not produce a consistent database (specifically when the database is being used while the backup is being executed), so the WAL files must be used to bring the database into a consistent state during restore.

      Platform: Windows, Linux  |  Version: All versions

      When the master database (source) in a high availability cluster replicating (without automated failover) is restarted, is there a situation where database updates to the master database are not replicated to the standby?KB4004

      There is no "DB updates are allowed but updates are not replicated" timing. The standby will re-establish connectivity to the master and replication of all updates will occur.

      Platform: Windows, Linux  |  Version: All versions

      How do I return a fenced database instance from a primary state to a standby state, and synchronize it with the new primary instance?KB4005

      1 Stop the fenced database instance. 2 Take a backup of the current primary database using pg_basebackup, and use this to replace the fenced database instance data directory. 3 Configure the fenced database instance by setting standby_mode to on, and setting the appropriate connection information for the database instance to connect to the primary instance. 4 Unfence the instance using the appropriate method for how the database has been fenced. 5 Start the database instance - it will connect to the master and synchronize. Settings are configured in postgresql.conf and recovery.signal for versions 12 and later, and in recovery.conf file for earlier versions.

      Platform: Windows, Linux  |  Version: All versions

      Streaming replication failed due to an inconsistent timeline ID during operation.KB4006

      Rebuild the standby database from the primary one. 1 Take a backup of the current primary database using pg_basebackup, and use this to replace the data directory of the standby instance giving the error. 2 Configure the standby instance appropriately, including setting the appropriate connection information for the database instance to connect to the primary instance. If the configuration file in the database directory being replaced is suitable, this can be backed up and replace the one from the backup. 3 Start the database instance - it will connect to the master and synchronize.

      Platform: Windows, Linux  |  Version: All versions

      Is pg_basebackup required to build a streaming replication environment?KB4007

      pg_basebackup is a utility that provides a less error-prone method of building a streaming replication environment, by automatically performing checkpoint to flush dirty pages to disk, forcing full page writes, and marking the backup starting point in the transaction logs for synchronizing recovery later. While other options are available, such as taking down the database or using pg_start_backup/pg_stop_backup and then manually copying the data directory, pg_basebackup offers the simplest and safest way of doing it.

      Platform: Windows, Linux  |  Version: All versions

      Which settings should I be concerned about when setting up streaming replication between two servers?KB4008

      The configuration settings that you need to be aware of for streaming replication, and their meanings, are:

      Sending servers (including standby servers in cascading replication setups)

      • max_wal_senders (integer): Maximum number of concurrent connections from standby servers or streaming base backup clients - i.e., the maximum number of simultaneously running WAL sender processes (default: 10).
      • max_replication_slots (integer): Maximum number of replication slots that the server can support (default: 10).
      • wal_keep_size (integer): Minimum size of past log file segments kept in the pg_wal directory, in case a standby server needs to fetch them for streaming replication.
      • max_slot_wal_keep_size (integer): Maximum size of WAL files that replication slots are allowed to retain in the pg_wal directory at checkpoint time.
      • wal_sender_timeout (integer): Amount of time of inactivity from replication connections before they are terminated.
      • track_commit_timestamp (boolean): Whether to record commit time of transactions (can only be set in postgresql.conf or on the server command line; default: off).

      Master servers

      • synchronous_standby_names (string): List of standby servers that can support synchronous replication.
      • vacuum_defer_cleanup_age (integer): Number of transactions by which VACUUM and HOT updates will defer cleanup of dead row versions (default: 0, meaning that dead row versions can be removed as soon as possible).

      Standby servers

      • primary_conninfo (string): Connection string to be used for the standby server to connect with a sending server.
      • primary_slot_name (string): Name of existing replication slot to be used when connecting to the sending server via streaming replication to control resource removal on the upstream node.
      • promote_trigger_file (string): Trigger file whose presence ends recovery in the standby.
      • hot_standby (boolean): Whether users can connect and run queries during recovery.
      • max_standby_archive_delay (integer): How long the standby server should wait before canceling standby queries that conflict with about-to-be-applied WAL entries (when Hot Standby is active).
      • max_standby_streaming_delay (integer): How long the standby server should wait before canceling standby queries that conflict with about-to-be-applied WAL entries (when Hot Standby is active).
      • wal_receiver_create_temp_slot (boolean): Whether the WAL receiver process should create a temporary replication slot on the remote instance when no permanent replication slot to use has been configured (default: off).
      • wal_receiver_status_interval (integer): Minimum frequency for the WAL receiver process on the standby to send information about replication progress to the primary or upstream standby.
      • hot_standby_feedback (boolean): Whether a hot standby should send feedback to the primary or upstream standby about queries currently executing on the standby.
      • wal_receiver_timeout (integer): Amount of time of inactivity from replication connections before they are terminated.
      • wal_retrieve_retry_interval (integer): How long the standby server should wait when WAL data is not available from any sources.
      • recovery_min_apply_delay (integer): By default, a standby server restores WAL records from the sending server as soon as possible. It may be useful to have a time-delayed copy of the data, offering opportunities to correct data loss errors.

      Platform: Windows, Linux  |  Version: All versions

      How do I prevent or block updates from a primary instance to a standby instance in a binary streaming replication architecture?KB4010

      Standby servers connect to primary servers in order to receive data updates that are streamed from the transaction log. This means that the primary instance needs to be configured to allow connection from the standby instance. To do this, appropriate settings should be configured in the pg_hba.conf file (credentials and host that the standby will connect with).

      The standby instance also needs to be configured with the connection information for the master instance. This is slightly different depending on which version of the database you are using. For Fujitsu Enterprise Postgres/PostgreSQL versions 11 and earlier, specify the connection information in the recovery.conf file using the primary_conninfo parameter. For later versions, specify the connection information in the postgresql.conf file using the primary_conninfo parameter.

      For details on primary_conninfo, refer to PostgreSQL documentation > Part III - Server administration > Chapter 19 - Server configuration > 19.6 - Replication > 19.6.3 - Standby servers

      Platform: Windows, Linux  |  Version: All versions

      When VACUUM is executed on a primary instance that is the source of replication of a standby instance, is the information in the primary instance's VACUMM-optimized DB forwarded to the standby? Or is VACUMM actually executed on the standby?KB4011

      Changes made on the primary instance by the VACUUM command are written to the primary instance's transaction log; these changes are then replicated to the standby instance. The VACUUM command is not run on the standby, and doesn’t need to.

      Platform: Windows, Linux  |  Version: All versions

      How does VACUUM work? What is its operation flow?KB4012

      The operation flow of the VACUUM command is as follows: 1 The VACUUM command is applied to a table on the primary side. 2 The VACUUM processing is performed on the primary side. 3 Database files on the primary are optimized by the VACUUM processing. 4 Database-VACUUM optimized files are transferred to the secondary side via streaming replication. 5 Optimized data is accessed on the secondary side.

      If, for some reason, a VACUUM operation is performed on a primary table when replication is not being performed, the optimized database information is stored on the primary, and then when replication is restored, the optimized database information is transferred and populated on the secondary. Both the VACUUM command and table update operations (UPDATE, INSERT, DELETE, etc.) result in database changes, which are treated as differential information via WAL, so the flow of synchronization between the primary and the secondary is the same when replication is being performed.

      Platform: Windows, Linux  |  Version: All versions

      I can't access my streaming standby database, even in read mode. How to configure the standby server?KB4013

      On the standby database server, set hot_standby to on in postgresql.conf file. This allows you to connect and run queries on the standby server during recovery. Note that if the standby is in sync streaming replication mode, then the master will not complete requests until the standby database (not the server itself) is restarted — just reloading the configuration is not enough.

      Platform: Windows, Linux  |  Version: All versions

      How do I drop replication slots?KB4014

      Replication slots ensure that the primary server keeps the WAL necessary for standby recovery. This is useful in cases where the standby server needs to be kept up-to-date even after being disconnected from the master server for a long period. To drop a replication slot: 1 Stop the standby server. 2 Log in to the primary server. 3 Drop the replication slot using SELECT pg_drop_replication_slot('slotName');. 4 Confirm that the replication slot was dropped using SELECT * FROM pg_replication_slots;. 5 On the standby server, open recovery.conf and comment the entry primary_slot_name='slotName'. 6 Start the standby server using pg_ctl start -D $PGDATA.

      Platform: Windows, Linux  |  Version: All versions

      When executing the Fujitsu Enterprise Postgres pg_dump command, the error ERROR: permission denied for sequence is displayed.Q020

      The user executing the pg_dump command does not have access permissions to the resource to be backed up. Use GRANT to set access permissions for the resource to be backed up for the user executing the pg_dump command , or execute the pg_dump command by specifying a superuser for the connecting user.

      For details on the pg_dump command, refer to PostgreSQL Documentation > Part VI. Reference > PostgreSQL Client Applications > pg_dump.

      Platform: Windows, Linux  |  Version: All versions

      I created a batch to run the backup command pgx_dmpall and attempted to run it automatically, but I am prompted for a password which prevents me from automatic execution. What is the cause and how can I run the command automatically?P0001

      This happened because the user did not add the -w option or the --no-password option to pgx_dmpall. By using these options, the user won't be prompted for a password. For details on the max_connections parameter, refer to Fujitsu Enterprise Postgres Reference Guide > Chapter 3 - Server commands > 3.2 -pgx_dmpall.

      To solve this issue, run pgx_dmpall with the -w option or the --no-password option. If either is used, one of the following configuration must also be in place.

      These methods allow batch processing without password input.

      Platform: Windows, Linux  |  Version: All versions

      How do I perform an online database backup and restore which ensures data consistency with no system disruption?P0001

      Fujitsu Enterprise Postgres databases can be backed up and recovered without stopping the database, either using WebAdmin or using pgx_dmpall for backup and pgx_rcvall for recovery. For details on backup, refer to Fujitsu Enterprise Postgres Operation Guide > Chapter 3 - Backing up the database. For details on recovery, refer to Fujitsu Enterprise Postgres Operation Guide > Chapter 15 - Actions when an error occurs. It is also possible to back up the database without stopping it using PostgreSQL pg_dump. For details, refer to PostgreSQL documentation > Part III - Server administration > Chapter 25 - Backup and restore.

      Platform: Windows, Linux  |  Version: All versions

      I am planning to copy an online backup made using pgx_dmpall to a network drive or external storage to store it while the database is running. Are there any folders in the backup destination that I should exclude when copying the content?P0001

      pgx_dmpall saves backup files to the directory set in backup_destination in postgresql.conf, so when saving the contents of the backup directory to another location, make sure you save all content of this backup directory. When restoring, restore the content of the backup directory to the same state as the source. For details, refer to Fujitsu Enterprise Postgres Reference Guide > Chapter 3 - Server commands > 3.2 - pgx_dmpall.

      Platform: Windows, Linux  |  Version: All versions

      How do I implement real-time WAL backups?P0001

      In postgresql.conf, enable WAL archiving by setting wal_level to replica (or logical when using logical replication), archive_mode to on, and archive_command to 'cp %p <archive directory path>/%f'.

      Platform: Windows, Linux  |  Version: All versions

      How much storage space will be required to execute pg_basebackup on the same server?P0001

      You will need at least twice the amount of space used by the instance.

      Platform: Windows, Linux  |  Version: All versions

      My batch job containing a call to the psql command is hanging (unresponsive).P0001

      This may be happening because the password to connect to the database server has not been preset, so you are being prompted to enter it and the psql command is waiting. To resolve this, preconfigure the password to connect to the database server by doing one of the following:

      Platform: Windows, Linux  |  Version: All versions

      Why isn't the WebAdmin startup screen being displayed?P0001

      This may be happening because you applied an emergency fix for the WebAdmin feature (GUI features) and have not set up WebAdmin afterwards. Refer to the emergency fix information file [Notes] to run the WebAdmin setup.

      For details on WebAdmin setup, refer to Fujitsu Enterprise Postgres Installation and Setup Guide for Server > Appendix B - Setting up and removing WebAdmin > B.1 - Setting up WebAdmin > B.1.1 Setting up WebAdmin.

      Platform: Windows, Linux  |  Version: All versions

      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?P0001

      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.

      Platform: Windows, Linux  |  Version: All versions

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

      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.

      Platform: Windows, Linux  |  Version: All versions

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

      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:

      1. 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).
      2. Shut down your current database cluster instance.
      3. Run pg_ctl stop or use your Fujitsu Enterprise Postgres service.
      4. 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). If rsync is not available on your system, then use the normal copy command.
        rsync -av /var/lib/postgres12/* /var/lib/postgres12_backup/
      5. To reduce size of the data storage location, consider deleting old unwanted logs.
      6. Rename the old data storage directory from /var/lib/postgres12 to /var/lib/postgres12_old.
      7. (optional) Rename the new data folder from /var/lib/postgres12_backup to /var/lib/postgres12 to match the original name.
      8. Update the data_directory parameter in postgresql.conf if it is still set to the previous data storage location.
      9. Start the database cluster instance and validate the data.
        pg_ctl start -D /var/lib/postgres12

      To change backup data storage location:

      1. 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.

      Platform: Windows, Linux  |  Version: All versions

      I cannot connect to the database server and a fatal error message regarding excessive number of existing connections is displayed.P0001

      The fatal error message displayed may be one of the following: FATAL: sorry, too many clients already, FATAL: remaining connection slots are reserved for non-replication superuser connections, or FATAL: too many connections for database "xxxx".

      If the message displayed is FATAL: sorry, too many clients already, this happened because the number of connections to the database server has exceeded the max_connections parameter in postgresql.conf. Otherwise, this happened because the number of connections to the database server has exceeded the value in the formula max_connections - superuser_reserved_connections - after this value is exceeded, only superusers can connect:

      Both parameters are specified in postgresql.conf. max_connections specifies the maximum number of concurrent connections to the database server (the defaults is 1000), and superuser_reserved_connections specifies the number of superuser connections reserved for database maintenance (the default is 3). To resolve this, increase the maximum number of concurrent connections specified in max_connections.

      The maximum number of simultaneous connections is calculated as max_connections = max num of concurrent connections to instance + superuser_reserved_connections + max_wal_senders. max_wal_senders is set in postgresql.conf, and specifies the maximum number of concurrent WAL submission processes to the standby server (the default is 10).

      When setting the parameters, keep in mind that increasing the maximum number of simultaneous connections may increase memory usage and affect performance. For details, refer to PostgreSQL documentation > Part III - Server administration > Chapter 19 - Server configuration > 19.3 - Connections and authentication > 19.3.1 - Connection settings and 19.6 - Replication > 19.6.1. Sending servers.

      Note that formula for the maximum number of simultaneous connections is different when performing database multiplexing operations. For details, refer to Fujitsu Enterprise Postgres Cluster Operation Guide (Database Multiplexing) > Chapter 2 - Setting up database multiplexing mode > 2.4 - Setting up the primary server > 2.4.2 - Creating, setting, and registering the primary server instance

      Platform: Windows, Linux  |  Version: All versions

      If I install Fujitsu Enterprise Postgres on a server that does not join in a domain, and then I join the server to a domain, will Fujitsu Enterprise Postgres functionalities be affected?P0001

      In principle, this does not affect Fujitsu Enterprise Postgres functionalities as long as you are not changing the server IP or the user who manages Fujitsu Enterprise Postgres. However, if your IP changes because of attaching your server to a domain and the old IP was in use (e.g., pg_hba.conf, streaming replication, logical replication etc.), then make sure to update the IP accordingly.

      Also, if you change the user who manages (starts or stops) Fujitsu Enterprise Postgres on the local machine to a domain user, then you must adapt this domain user to be the new owner of the database cluster, and hence you need to update the permissions of domain user so that it can manage the Fujitsu Enterprise Postgres database cluster files and directory.

      Platform: Windows, Linux  |  Version: All versions

      How do I change the WAL segment size?P0001

      The WAL segment size can be changed when creating the instance using initdb. The default size of each WAL segment size is 16MB. initdb provides the option --wal-segsize to specify the size of WAL segment files when creating the instance.

      You cannot change the WAL segment size after initializing the database cluster.

      Platform: Linux  |  Version: All versions

      I changed a parameter in postgresql.conf, but it did not take effect as I expected. How to reflect the changes?P0001

      Not all parameters are immediately reflected to database clusters — some require executing pg_ctl command with either reload or restart. Execute psql -c "SELECT name, context FROM pg_settings;" and check the value of context column in pg_settings system view.

      The value of context indicates: for postmaster, restart is required, for sighup, superuser-backend, or backend, reload is required, and for superuser or user, changes can be applied without reload or restart. These can also be set within a session via SET command.

      Platform: Windows, Linux  |  Version: All versions

      Can I change the configuration parameter value without editing postgresql.conf file?P0001

      You can change the system configuration parameters across the entire database cluster with ALTER SYSTEM SET parm-name = parm-value.

      This command writes the given parameter value into the postgresql.auto.conf file. The value set with this command will be effective after the next server configuration reload or server restart.

      Platform: Windows, Linux  |  Version: All versions

      Why are WAL files not being archived on the Fujitsu Enterprise Postgres standby server, and how can I resolve this issue?Q011

      The archive_mode in the standby server's postgresql.conf may be set to on. Set it to always in the standby server's postgresql.conf.

      For details, refer to the PostgreSQL documentation >Part III - Server Administration >Chapter 19 - Server Configuration >19.5 - Write Ahead Log >19.5.3 - Archiving.

      Platform: Windows, Linux  |  Version: All versions

      When I execute a SQL query on the Fujitsu Enterprise Postgres standby server, the error FATAL: 40000: terminating connection due to conflict with recovery is displayed.Q012

      Conflicts may occur when max_standby_archive_delay and max_standby_streaming_delay are configured with values that are too low. Increase these settings in the standby server's postgresql.conf so that they exceed the SQL execution time.

      For details, refer to the PostgreSQL documentation > Part III - Server Administration > Chapter 19 - Server Configuration > 19.6 - Replication > 19.6.3 - Standby Servers and Part III - Server Administration > Chapter 26 - High Availability, Load Balancing, and Replication > 26.4 - Hot Standby > 26.4.2 - Handling Query Conflicts.

      For other product versions/levels, please refer to the corresponding manual sections.

      Platform: Windows, Linux  |  Version: All versions

      Can I change an existing tablespace in Fujitsu Enterprise Postgres? If data has already been imported, do I need to delete the original data?Q021

      You can change the tablespace for tables and indexes using ALTER statements after creating a new table space. It is not necessary to delete the original data.

      CREATE TABLESPACE new_tablespace LOCATION 'new_tablespace_directory';
      ALTER TABLE table_name SET TABLESPACE new_tablespace;
      ALTER INDEX index_name SET TABLESPACE new_tablespace;

      For details, refer to PostgreSQL documentation > Part VI - Reference > SQL Commands > ALTER INDEX, ALTER TABLE, and CREATE TABLESPACE.

      Platform: Windows, Linux  |  Version: All versions

      What SQL commands can be executed on a standby server in a database multiplexing environment?Q041

      A standby server is in read-only mode. It cannot generate new transaction IDs or write WAL (Write-Ahead Log) records. On a standby server, you can execute read-only SQL commands such as SELECT. Commands that modify data, such as INSERT, UPDATE, DELETE, CREATE, ALTER, and DROP, cannot be executed.

      For details on SQL commands that can and cannot be executed on a standby server, refer to PostgreSQL Documentation > Part III - Server Administration > Chapter 26 - High Availability, Load Balancing, and Replication > 26.4 - Hot Standby > 26.4.1 - User's Overview and 26.4.3. Administrator's Overview.

      Platform: Linux  |  Version: All versions

      When starting Fujitsu Enterprise Postgres, the error lock file "postmaster.pid" already exists is displayed.Q042

      Fujitsu Enterprise Postgres creates a file named postmaster.pid when it starts, and removes it when it shuts down normally. If the database stops unexpectedly or is not shut down properly, this file may remain in the data directory. When Fujitsu Enterprise Postgres starts again, it detects the existing file and reports the error.

      To solve this issue, ensure that no Fujitsu Enterprise Postgres process is running, then delete the postmaster.pid file from the data directory and start Fujitsu Enterprise Postgres again.

      Note that the data directory is specified by the -D option of pg_ctl, or the PGDATA environment variable.

      Platform: Windows, Linux  |  Version: All versions

      My batch job using the psql command became unresponsive. How do I fix it?Q043

      The psql command is waiting for a database password to be entered. This usually happens when a password has not been configured in advance and the batch job cannot respond to the password prompt.

      Configure the database password before running the batch job using one of the following methods:

      • Option 1: Use a password file - in Linux, create the .pgpass file in the user’s home directory, and in Windows, create the pgpass.conf file in %APPDATA%\postgresql\.
      • Option 2: Set the database password in the PGPASSWORD environment variable before running the batch job.

      For details on password files and the PGPASSWORD environment variable, refer to the PostgreSQL Documentation > Part IV - Client Interfaces > Chapter 32 - libpq - C Library > 32.15 - Environment Variables > PGPASSWORD and 32.16 - The Password File. For details on client authentication and the psql command, refer to PostgreSQL Documentation > Part III - Server Administration > Chapter 20 - Client Authentication and Part VI - Reference > PostgreSQL Client Applications > psql.

      Platform: Windows, Linux  |  Version: All versions

      What statistics information can be collected from Fujitsu Enterprise Postgres?Q044

      Fujitsu Enterprise Postgres provides two types of statistics information: PostgreSQL statistics and Fujitsu Enterprise Postgres statistics.

      PostgreSQL statistics help monitor database activity, including table access information, index access information, buffer hit counts, block read counts, function execution counts, function execution times. This information can be used to check buffer cache efficiency, identify frequently accessed tables, and find slow-running functions.

      Fujitsu Enterprise Postgres statistics include wait and lock information, which can help to identify performance bottlenecks.

      For details on the statistics information that can be obtained, refer to the Fujitsu Enterprise Postgres Operation Guide > Chapter 7 - Routine Operations > 7.6 - Monitoring Database Activity and PostgreSQL Documentation > Part III - Server Administration > Chapter 27 - Monitoring Database Activity > 27.2 - The Cumulative Statistics System.

      Platform: Windows, Linux  |  Version: All versions

      How can I identify slow SQL statements in Fujitsu Enterprise Postgres?Q045

      Log slow SQL statements by setting the log_min_duration_statement parameter in postgresql.conf. Any SQL statement whose execution time exceeds the configured threshold will be written to the log.

      To log execution plans that exceed the specified execution time, use the auto_explain module and set the auto_explain.log_min_duration parameter. This helps identify slow SQL statements, the execution plans used by the optimizer, and potential performance bottlenecks.

      For details on how to use auto_explain, refer to PostgreSQL Documentation > Part III - Server Administration > Chapter 19 - Server Configuration > 19.8 - Error Reporting and Logging > 19.8.2 - When to Log > log_min_duration_statement, and Part VIII - Appendixes > Appendix F - Additional Supplied Modules and Extensions> F.3 - auto_explain.

      Platform: Windows, Linux  |  Version: All versions

      What information should be collected when application performance becomes slow?Q046

      When investigating a performance issue, collect database statistics and activity information as soon as possible. Some information, such as active sessions, transactions, and locks, may be lost after a database restart or when processing completes. The following information is recommended:

      • Server process information - Shows active client connections and database sessions.
        SELECT * FROM pg_stat_activity;
      • Transaction information - Shows currently running transactions and their duration.
        SELECT pid,
               wait_event_type,
               wait_event,
               state,
               (current_timestamp - xact_start)::interval(3) AS duration,
               query
        FROM pg_stat_activity
        WHERE pid <> pg_backend_pid();
      • Lock information - Shows sessions waiting for locks and the affected tables.
        SELECT l.locktype,
               c.relname,
               l.pid,
               l.mode,
               a.query,
               (current_timestamp - xact_start) AS duration
        FROM pg_locks l
        LEFT JOIN pg_stat_activity a ON l.pid = a.pid
        LEFT JOIN pg_class c ON l.relation = c.oid
        WHERE NOT l.granted
        ORDER BY l.pid;

      Collecting this information can help to identify long-running queries, blocking sessions, lock contention, and resource bottlenecks.

      Platform: Windows, Linux  |  Version: All versions

      When copying data from a CSV file to a table using the COPY FROM command, the message ERROR: input value length is x; too long for type data-type (y) is displayed.KB3001

      This may be because the CSV format file uses 0x00 as the NULL value. The COPY FROM command treats unquoted empty characters as NULL, rather than 0x00.

      If the CSV format file uses 0x00 as the NULL value, replace it with an empty string. If you want to distinguish NULL values from empty characters, you can also specify the string representing them in the NULL option of the COPY FROM command, so replace 0x00 with the specified string. For details, refer to PostgreSQL documentation > Part VI - Reference > SQL commands > COPY

      Platform: Windows, Linux  |  Version: All versions

      Can tables and indexes be stored in separate areas?KB3002

      Yes. By leveraging tablespaces, tables and indexes can be placed in separate areas.

      For details, refer to the PostgreSQL documentation > Part III - Server administration > Chapter 22 - Managing databases > 22.6 - Tablespaces, Part VI - Reference > SQL commands > CREATE TABLESPACE, CREATE TABLE, and CREATE INDEX

      Platform: Windows, Linux  |  Version: All versions

      The database server's WAL space disk utilization is 100% and the database process has stopped. How do I solve it?KB3003

      Due to the I/O latency in the WAL archive storage area, the disk containing WAL is full and WAL cannot be written because the copy speed to the archive area is slower than the rate at which WAL data is generated. Consider expanding the capacity of the disk that store WAL files, reducing the frequency of database update, or using faster disks for WAL archiving.

      • Check the error message in postgresql.log. It will contain an error message stating that the server has stopped because the disk was full and that the system could not write WAL, for example: PANIC: could not write to file "pg_wal/waltemp.4920": No space left on device
      • Compare the WAL generation rate and backup rate. Check the WAL generation rate with timestamp intervals of each WAL file under the pg_wal directory, check the backup rate with timestamp intervals of each file under the archived_wal directory, and confirm that the WAL generation rate is larger than backup rate.

      As long as your environment can keep up with the average speed of the WAL generation of the server, the processing speed of the command for archiving is not important. Normal operations continue even if the archive process is slightly delayed, but note that a significantly slower archive process increases the amount of data lost in the event of a disaster. This also means that many segment files waiting to be archived will be stored in $PGDATA/pg_wal, which may cause the disk to be full. It is recommended that you monitor the archive process to ensure that it is working as intended.

      For details, refer to PostgreSQL documentation > Part III - Server administration > Chapter 25 - Backup and restore > 25.3.1 - Setting up WAL archiving. You can also refer to our blog post How to solve the problem if pg_wal is full.

      Platform: Windows, Linux  |  Version: All versions

      What should I do if the database runs out of space to store backup data?KB3004

      Before clearing space in the backup data directory, one thing to note is the scenario where archiving log is enabled and archive logs are stored in the backup data directory. Once this destination runs out of space, the actual data directory will be filled with WAL logs. If that data directory runs out of space, the database may be unavailable. So, this must be urgently taken care of.

      If you run out of space in the backup data directory, the first step is to delete unnecessary files on it. If that does not solve the problem, temporarily save backup data to another location with sufficient space, or replace the disk containing the backup data directory with a disk with more capacity.

      For details, refer to Fujitsu Enterprise Postgres Operation Guide > Chapter 15 - Actions when an error occurs > 15.7 - Actions in response to insufficient space on the backup data storage destination .

      Platform: Linux  |  Version: All versions

      How to import data from a CSV file?KB3005

      You can import data into the database by using the COPY statement with the -c option of the psql command, for example: $ psql -d db-name -c "COPY table1 FROM 'import_data.csv' DELIMITER ','". For details, refer to PostgreSQL documentation > Part VI - Reference > SQL Commands > COPY

      Platform: Windows, Linux  |  Version: All versions

      How to verify if the PostgreSQL installed on my machine is Fujitsu Enterprise Postgres or open-source software?KB3006

      Step 1: Identify whether the installed PostgreSQL is Fujitsu Enterprise Postgres or open-source software

      Option 1: Check the default installation directory of Fujitsu Enterprise Postgres. List the content of the default installation directory of Fujitsu Enterprise Postgres (/opt/fsepvversionserver64). If the directory exists, and its sub-directories are not empty, then Fujitsu Enterprise Postgres is installed.

      Option 2: Execute the pg_ctl command. Set the appropriate environment variables required to execute the Fujitsu Enterprise Postgres command pg_ctl, and then either check the server status with $ pg_ctl status -D data-directory or start the database server with $ pg_ctl start -D data-directory. If you can execute the command successfully, then it means that Fujitsu Enterprise Postgres is installed.

      Option 3: Check the RPM packages. List the RPM packages related to Fujitsu Enterprise Postgres with $ rpm -qa | grep FJSVfsep. If packages with name starting with FJSVfsep are listed, then it means that Fujitsu Enterprise Postgres is installed. Note that RPM packages may differ depending on the components installed by the customer.

      Step 2: Verify the details of the installed product.

      Option 1: List the Fujitsu middleware products installed on the machine. As the root user, execute # /opt/FJSVcir/cimanager.sh, then verify the product names and versions with /opt/FJSvVcir/cimanager.sh.

      Option 2: Check the RPM package details. Display information about the installed package with $ rpm -qi FJSVfsep-SV-version, and verify details such as installation date/time and installation directory.

      Step 3: Verify if the Fujitsu Enterprise Postgres process is running

      List the PostgreSQL-related processes currently running with $ ps -ef | grep postgres. If the postgres process of Fujitsu Enterprise Postgres installation directory /opt/fsepvversionserver64/bin/postgres is listed, then it means that Fujitsu Enterprise Postgres process has started.

      Step 4: Verify the patches applied to the Fujitsu Enterprise Postgres server

      If you have applied patches with the downloaded RPM, list details of the applied patches with $ rpm -qa | grep prefix of product patches and rpm -qi <prefix of product patches>, and Verify that the latest patches have been applied to the database server.

      Platform: Linux  |  Version: All versions

      How can I perform a query that involves more than 1 database server?KB3007

      You must use the foreign data wrapper postgres_fdw, which is built-in to Fujitsu Enterprise Postgres and provides read/write support. For details, refer to our PostgreSQL Insider article Linking to foreign data using foreign data wrappers.

      Platform: Windows, Linux  |  Version: All versions

      Are column names case-sensitive?KB3008

      Yes. All identifiers, including column names, are converted to lowercase in Fujitsu Enterprise Postgres, unless enclosed by double quotes. Identifiers created with double-quotes retain their original capitalization.

      Platform: Windows, Linux  |  Version: All versions

      How do I find out what tables, indexes, databases, and user are defined?KB3009

      In psql, use the meta-commands \dt, \di, \l, and \du, respectively. This information can also be obtained from the system views pg_tables, pg_indexes, pg_database, and pg_user, respectively.

      Platform: Linux  |  Version: All versions

      How do I check if a table exists in a specific schema?KB3010

      You can check with SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='schema-name' AND table_name='table-name'); or with the meta-command \dt schema-name table-name.

      Platform: Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres database multiplexing operation, after the following errors occurred, a failover happened.Q052

      Database Multiplexing Operation Error:
      WARNING: An abnormality was detected in the monitoring target "database process (postmaster)": Unresponsive: failed to create socket: xxxxx (xxx)xxx (MCA00019)
      PostgreSQL Error:
      FATAL: sorry, too many clients already

      Mirroring Controller attempts to connect to the database server for OS/server and database process liveness monitoring (heartbeat). This connection failed due to exceeding the maximum number of connections on the database server. As a result, Mirroring Controller determined that the database server was stopped or unresponsive and initiated a failover. To avoid this, review the maximum number of connections specified in the superuser_reserved_connections and max_connections parameters of the primary server's postgresql.conf file.

      For details, refer to Fujitsu Enterprise Postgres Cluster Operation Guide (Database Multiplexing) > Part 1: Database Multiplexing Operation > Chapter 2 - Database Multiplexing Operation Setup > 2.4 Primary Server Setup > 2.4.2 Creating, Configuring, and Registering a Primary Server Instance

      Platform: Windows, Linux  |  Version: All versions

      When I executed the Fujitsu Enterprise Postgres pgx_dmpall command, an error occurred could not open file "xxxxx": Permission denied. Q054

      A permission error may have occurred. User-specific or other product's (work) files are created under the database cluster's data directory. Fujitsu Enterprise Postgres backs up the data directory, tablespaces, and configuration files when the pgx_dmpall command is executed. However, if the data directory contains work files that the PostgreSQL user account executing the pgx_dmpall command does not have access permissions to, this error may occur.

      To avoid this so not create user-specific or other product's (work) files under the data directory, and delete or move user-specific or other product's (work) files from under the data directory.

      Platform: Windows, Linux  |  Version: All versions

      Is it by design that executing the Fujitsu Enterprise Postgres mc_ctl stop command does not trigger a switchover from the primary server to the standby server?Q055

      Yes, it is by design. Stopping the Mirroring Controller using the mc_ctl stop command means that the customer themselves is stopping the Mirroring Controller. Therefore, even if the automatic switchover/detachment function is enabled (by executing mc_ctl start with the -f option, or by executing mc_ctl enable-failover), a switchover will not occur. To perform a switchover, execute the mc_ctl switch command.

      For details, refer to Fujitsu Enterprise Postgres > Reference > Chapter 4: Mirroring Controller Commands > 4.2 mc_ctl and Cluster Operation Guide (Database Multiplexing) > Part 1: Database Multiplexing Operation > Chapter 3: Database Multiplexing Operation > 3.4 Manual Switchover of Primary Server

      Platform: Windows, Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres database multiplexing operation, the primary server has switched, and it is operating in degraded mode. How do I recover it?Q056

      To return to database multiplexing operation, the standby server (old primary server) needs to be rebuilt.

      To rebuild the old primary server, refer to Fujitsu Enterprise Postgres Cluster Operation Guide (Database Multiplexing) > Part 1: Database Multiplexing Operation > Chapter 4: Handling Abnormalities in Database Multiplexing Operation > 4.1 Handling Degraded Operation > 4.1.1 Operation after switchover during degraded operation

      [Note] There are precautions when rebuilding a standby server using the pg_rewind command.
      The timeline IDs of the source server and target server for the pg_rewind command must be different. However, immediately after the primary server (old standby server) is promoted, pg_rewind may not be executable because the application processing of unapplied update transaction logs and the subsequent checkpoint processing to update the timeline ID have not yet completed. Therefore, execute the pg_rewind command after unapplied update transaction logs are cleared and the timeline ID update is complete on the primary server (old standby server).2
      After executing the pg_rewind command, perform the following.

      Platform: Windows, Linux  |  Version: All versions

      In database multiplexing operation, when log_connections and log_disconnections in postgresql.conf were set to yes, connection/disconnection logs from 127.0.0.1 started to be output every second.Q057

      The connection/disconnection logs are being output for the database process's anomaly monitoring in the database multiplexing operation (Mirroring Controller).
      These logs are output approximately every second, depending on the settings of the following parameters in the database multiplexing operation's server definition file:
      db_instance_check_interval = 800
      db_instance_check_timeout = 1

      It is not possible to suppress only the connection/disconnection logs for the database process's anomaly monitoring in database multiplexing operation.
      The number of outputs can be reduced by changing the setting of the following parameter in the database multiplexing operation's server definition file:
      db_instance_check_interval

      For details, refer to Cluster Operation Guide (Database Multiplexing) > Part 1: Database Multiplexing Operation > Chapter 2 - Database Multiplexing Operation Setup > 2.11 Tuning > 2.11.4 Tuning for optimal anomaly monitoring and degraded operation > 2.11.4.2 Anomaly Monitoring Tuning for Database Processes

      Platform: Windows, Linux  |  Version: All versions

      When backing up a table containing a bytea type column with the Fujitsu Enterprise Postgres pg_dump command, errors occurred Dumping of table "xxx" contents failed: PQgetResult() failed. (15877), and ERROR: invalid memory alloc request size xxxxxxxxxx".Q058

      The pg_dump command outputs bytea type data as characters. Therefore, the bytea type data was converted to characters, exceeding the quantitative limit (1 gigabyte) for character data length. For details on the output format of bytea type data, refer to PostgreSQL Documentation > Part II. The SQL Language > Chapter 8. Data Types > 8.4. Binary Data Types. For details on supported data types and quantitative limits, refer to Fujitsu Enterprise Postgres 15 > Installation Guide (Server Edition) > Appendix G: Quantitative Limits > Table G.5 Supported Data Types and Attributes.

      To resolve this, save the data of the table by specifying binary in the FORMAT parameter of the COPY command. Since the COPY command only saves data, use the pg_dump command with the -s option or --exclude-table-data to also save the table definition. For details on pg_dump refer to PostgreSQL Documentation > Part VI. Reference > SQL Commands > COPY > PostgreSQL Client Applications > pg_dump

      Platform: Windows, Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres database multiplexing operation, an error occurred ERROR: primary server is already running (MCA00084), and the standby server failed to start.Q059

      standby.signal does not exist on the standby server. To resolve this, create standby.signal in the database cluster's data directory on the standby server.

      For details on standby.signal, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 26. High Availability, Load Balancing, and Replication > 26.2. Log-Shipping Standby Servers > 26.2.4. Setting Up a Standby Server and Cluster Operation Guide (Database Multiplexing) > Part 1: Database Multiplexing Operation > Chapter 2 - Database Multiplexing Operation Setup > 2.5 Standby Server Setup > 2.5.2 Creating, Configuring, and Registering a Standby Server Instance

      When creating a replica of the primary server instance on the standby server, if the -R option is specified during pg_basebackup command execution, standby.signal will be created, and the minimum necessary items (primary_conninfo) will also be set in postgresql.auto.conf.

      Platform: Windows, Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres, how can I cancel a long-running query or forcibly disconnect a long-waiting connection?Q060

      A query can be canceled using the pg_cancel_backend function. A connection can be forcibly disconnected using the pg_terminate_backend function or pgAdmin.
      With the pg_cancel_backend and pg_terminate_backend functions, the target query to be canceled or the target connection to be disconnected is specified by its process ID. The process ID can be confirmed using the pg_stat_activity view or the OS's ps command.

      For details, refer to Fujitsu Enterprise Postgres > Operation Guide > Chapter 14: Handling Abnormalities > 14.4 Handling Application Abnormalities and PostgreSQL Documentation > Part II. The SQL Language > Chapter 9. Functions and Operators > 9.28. System Administration Functions > 9.28.2. Server Signaling Functions.

      Platform: Windows, Linux  |  Version: All versions

      When an application connects to the database, an error occurred FATAL: sorry, too many clients already.Q061

      The application may not have not disconnected from the database, leaving unnecessary connections and exceeding the maximum number of simultaneous connections to the database server. The maximum number of simultaneous connections to the database server is specified by the max_connections parameter in postgresql.conf. The default is 100.

      To avoid this, add a process to the application to disconnect from the database. If a process to disconnect from the database is already implemented, review the maximum number of simultaneous connections specified in the max_connections parameter of postgresql.conf. For details on disconnecting from the database, refer to PostgreSQL Documentation > Part IV. Client Interfaces > Chapter 34. ECPG - Embedded SQL in C > 34.2. Managing Database Connections

      This is a detailed explanation for Embedded SQL in C. If other interfaces are used, refer to the manual for the corresponding programming language.

      For details on the max_connections parameter, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.3. Connections and Authentication > 19.3.1. Connection Settings

      Platform: Windows, Linux  |  Version: All versions

      Fujitsu Enterprise Postgres startup does not complete.Q062

      Fujitsu Enterprise Postgres may not have shut down properly last time (including shutdown in immediate shutdown mode), and crash recovery is taking a long time during the subsequent Fujitsu Enterprise Postgres startup. If database system was not properly shut down; automatic recovery in progress is output in the Fujitsu Enterprise Postgres log, crash recovery is in progress.

      Wait until crash recovery completes and Fujitsu Enterprise Postgres startup finishes.
      By reducing the values of max_wal_size and checkpoint_timeout in the postgresql.conf file, and increasing the checkpoint frequency, you can shorten the crash recovery processing time. However, increasing the checkpoint frequency will increase I/O load, so set appropriate values after considering your operations.

      For details on Enterprise Postgres shutdown, refer to PostgreSQL Documentation > Part III. Server Administration > 18. Server Setup and Operation > 18.5. Shutting Down the Server. For details on max_wal_size and checkpoint_timeout, refer to PostgreSQL Documentation > Part III. Server Administration > 19. Server Configuration > 19.5. Write Ahead Log > 19.5.2. Checkpoints

      Platform: Windows, Linux  |  Version: All versions

      The Fujitsu Enterprise Postgres log shows the message LOG: autovacuum: found orphan temp table "@1@"."@2@" in database "@3@"Q063

      Temporary table management information remains in the Fujitsu Enterprise Postgres system catalog due to a Fujitsu Enterprise Postgres crash or some other reason. The autovacuum function detects this temporary table management information and outputs the message.

      No action is required. The relevant temporary table management information will be automatically collected later. If you want to collect it immediately, delete the schema output in "@1@" of the message using a database user with superuser privileges.

      Platform: Windows, Linux  |  Version: All versions

      When a .NET application connects to the database, an error occurred ERROR: 80027: Timeout while getting a connection from pool.Q064

      The application may not have disconnected from the database, leaving unnecessary connections, and exceeding the maximum number of connections in the connection pool. When a connection request exceeds the maximum number of connections in the connection pool, it waits until an available connection is found. If no available connection is found and the connection timeout period is exceeded, the connection request results in a timeout error.

      To resolve this, check for long-waiting connections and disconnect any unnecessary connections. Also, review the application to see if there are any missing processes for disconnecting from the database, and add such processes. If processes for disconnecting from the database are already implemented, review the maximum number of connections in the connection pool (specified by the Maximum Pool Size keyword; default is 100.) specified in the connection string.

      For details on how to check and disconnect existing connections, refer to Fujitsu Enterprise Postgres > Operation Guide > Chapter 7: Routine Operations > 7.4 Monitoring Application Connection Status and Chapter 10: Handling Abnormalities > 10.4 Handling Application Abnormalities. For details on connection strings, refer to Fujitsu Enterprise Postgres > Application Development Guide > Chapter 4: .NET Data Provider > 4.3 Connecting to the Database > 4.3.4 Connection String

      Platform: Windows, Linux  |  Version: 9.5, 9.6

      Fujitsu Enterprise Postgres output the following error and the process was interrupted.Q065

      PANIC: could not write to file "pg_wal/xlogtemp.xxxx": No space left on device
      LOG: WAL writer process (PID xxxx) was terminated by signal 6: Aborted

      There is not sufficient disk space in the directory where the transaction log is stored. Furthermore, if archive_mode is enabled, insufficient disk space in the backup data storage directory may also have caused insufficient space in the transaction log storage directory (archive_mode is specified by the archive_mode parameter in postgresql.conf. If an instance is created with WebAdmin, it is enabled automatically). Transaction logs are not deleted until they can be archived to the backup data storage directory. If the disk space in the backup data storage directory is insufficient, transaction logs cannot be archived, leading to a shortage of space in the transaction log storage directory.

      If the disk space in the backup data storage directory is insufficient, the following error will be output to the Fujitsu Enterprise Postgres log:
      could not write to file "/backup_data_storage_directory/archive_log_storage_directory/xxxxx": No space left on device

      /backup_data_storage_directory/archive_log_storage_directory is specified by the archive_command parameter in postgresql.conf.

      To avoid this, ensure there is free space on the disk where the transaction log storage directory is located. If archive_mode is enabled and the disk space in the backup data storage directory is insufficient, also ensure free space on the disk where the backup data storage directory is located. For details, refer to Fujitsu Enterprise Postgres > Operation Guide > Chapter 7: Routine Operations > 7.2 Monitoring Disk Usage and Ensuring Free Space and Chapter 14: Handling Abnormalities > 14.7 Handling Insufficient Backup Data Storage Space > 14.8 Handling Insufficient Transaction Log Storage Directory Space

      Platform: Linux  |  Version: All versions

      After executing the Fujitsu Enterprise Postgres pgx_keystore command (enabling automatic keystore opening) and then starting Fujitsu Enterprise Postgres, an error occurred FATAL: decryption of the auto-open keystore x:/xxxxx/keystore.aks failed: error code = xxx, and it could not start.Q066

      The cause is likely that the pgx_keystore command was executed by a user account other than the one that starts Fujitsu Enterprise Postgres.
      When the pgx_keystore command is executed, a file named keystore.aks is created in the keystore storage directory. If the pgx_keystore command is executed by a user account other than the one that starts Fujitsu Enterprise Postgres, starting Fujitsu Enterprise Postgres will fail because the user account that starts Fujitsu Enterprise Postgres does not have permission to access the keystore.aks file.

      To avoid this, delete the keystore.aks file in the keystore storage directory, then re-execute the pgx_keystore command as the user account that starts Fujitsu Enterprise Postgres. For details, refer to Fujitsu Enterprise Postgres > Operation Guide > Chapter 5 - Protecting Stored Data with Transparent Data Encryption > 5.6 - Keystore Management > 5.6.3 - Enabling Automatic Keystore Opening

      Platform: Windows, Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres, a connection limit error occurred, preventing connection to the database server.Q068

      FATAL: sorry, too many clients already

      If the message above is displayed, the number of connections to the database server exceeded max_connections.

      FATAL: remaining connection slots are reserved for non-replication superuser connections

      FATAL: too many connections for database xxxx

      If one of the messages above is displayed, the number of connections to the database server exceeded the value of max_connections - superuser_reserved_connections. When this value is exceeded, only superuser connections are allowed.

      max_connections specifies the maximum number of concurrent connections to the database server (default: 100), and superuser_reserved_connections specifies the number of superuser connections reserved for database maintenance (default: 3). Both parameters are specified in postgresql.conf.

      To solve this, increase the value of max_connections to maximum number of concurrent connections to the instance + superuser_reserved_connections + max_wal_senders. max_wal_senders specifies the maximum number of concurrent WAL sender processes to standby servers (default: 10; only add if using Fujitsu Enterprise Postgres 11 or earlier). Note that increasing the maximum number of concurrent connections may increase memory usage and affect performance. Set an appropriate value based on your business requirements.

      For details, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.3. Connections and Authentication > 19.3.1. Connection Settings 19.6 - Replication > 19.6.1 - Sending Servers. When operating database multiplexing, the formula for estimating the maximum number of concurrent connections differs. Refer to Fujitsu Enterprise Postgres Cluster Operation Guide (Database Multiplexing) > Chapter 2 - Database Multiplexing Operation Setup > 2.4 - Primary Server Setup > 2.4.2 - Creating, Configuring, and Registering a Primary Server Instance

      Platform: Windows, Linux  |  Version: All versions

      How do I handle insufficient backup data storage capacity in Fujitsu Enterprise Postgres?Q069

      If backup data storage capacity is insufficient, first delete unnecessary files on the disk where the backup data storage directory is located. If the problem cannot be resolved by deleting unnecessary files, temporarily delete backup data or replace the disk where the backup directory is located with a larger capacity disk. For details, refer to Fujitsu Enterprise Postgres > Operation Guide > Chapter 14: Handling Abnormalities > 14.7 Handling Insufficient Backup Data Storage Capacity

      Platform: Windows, Linux  |  Version: All versions

      When restoring using the psql command with a script file (plain text format) extracted by the Fujitsu Enterprise Postgres pg_dump or pg_dumpall command, an error occurred.Q070

      schema "@1@" already exists
      index "@1@" does not exist
      cannot drop @1@ because other objects depend on it

      The -c or -C option may have been specified incorrectly or omitted when executing the pg_restore command. Consider whether to specify these options, taking into account the creation status of database objects in the restore destination and how to handle database objects if they already exist in the restore destination (recreate/use as-is).

      -c (--clean option) outputs commands to delete database objects at the beginning of the script file, and -C (--create option) outputs commands to create the database itself at the beginning of the script file (-C cannot be specified with the pg_dumpall command; if it is specified simultaneously with -c, the database is deleted and then recreated. The specification of -c and -C with pg_dump and pg_dumpall commands is only effective when extracting to a script file (plain text format). When extracting to an archive file (archive format), consider specifying them with the pg_restore command.

      If -c is specified with pg_dump or pg_dumpall commands, and the restore results in an error due to a non-existent or undeletable database object, no action is required if the restore completed successfully. If -c and -C are not specified with pg_dump or pg_dumpall commands, and the restore results in an error that a database object already exists, you can simply use the current script file to perform the restore if you delete the objects to be restored that are included in the script file beforehand.

      For details, refer to PostgreSQL Documentation > Part VI. Reference > PostgreSQL Client Applications > pg_dump and pg_restore

      Platform: Windows, Linux  |  Version: All versions

      When restoring using the pg_restore command with an archive file extracted by the Fujitsu Enterprise Postgres pg_dump command, the following errors occurred. Q071

      schema "@1@" already exists
      index "@1@" does not exist
      cannot drop @1@ because other objects depend on it

      The -c or -C option may have been specified incorrectly or omitted when executing the pg_restore command. Consider whether to specify these options, taking into account the creation status of database objects in the restore destination and how to handle database objects if they already exist in the restore destination (recreate/use as-is).

      -c (--clean option) deletes database objects before restoring, and -C (--create option) creates the database before restoring (if specified simultaneously with -c, the database is deleted and then recreated). If -c is specified and errors occur due to non-existent or undeletable database objects, no action is required if the restore completed successfully. For details, refer to PostgreSQL Documentation > Part VI. Reference > PostgreSQL Client Applications > pg_dump and pg_restore

      Platform: Windows, Linux  |  Version: All versions

      When I executed the Fujitsu Enterprise Postgres pgx_dmpall command, an error occurred server is not running.Q073

      The command may have been executed from a command prompt not launched with administrator privileges.

      Execute the pgx_dmpall command from a command prompt launched with administrator privileges.If the instance administrator is a user belonging to the Administrators group, the pgx_dmpall command must be executed from an Administrator: Command Prompt.

      Platform: Windows  |  Version: All versions

      When I searched an external server using Fujitsu Enterprise Postgres's postgres_fdw, it took longer than searching on the external server directly.Q074

      The cause may be that postgres_fdw fetches a small number of rows per fetch, leading to a high number of communications with the external server and thus taking a longer time. By increasing fetch_size, which is a remote execution option of the postgres_fdw external data wrapper option, it is possible to reduce the number of communications with the external server.

      For details, refer to PostgreSQL Documentation > Part VIII. Appendixes > Appendix F. Additional Supplied Modules > F.38. postgres_fdw > F.38.1. FDW Options of postgres_fdw > F.38.1.4. Remote Execution Options

      Platform: Windows, Linux  |  Version: All versions

      When I ran an application using the JDBC driver with Fujitsu Enterprise Postgres, errors occurred 55000:PostgreSQL JDBC Driver ERROR: prepared transactions are disabled and 42704:PostgreSQL JDBC Driver ERROR: prepared transaction with identifier xxx does not exist. Q075

      PREPARE TRANSACTION was executed while the max_prepared_transactions parameter in postgresql.conf was set to 0.

      To avoid this, set the max_prepared_transactions parameter in postgresql.conf to 1 or greater. For details, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.4. Resource Consumption > 19.4.1. Memory

      Platform: Windows, Linux  |  Version: All versions

      After inserting a large amount of data in Fujitsu Enterprise Postgres, a large amount of WAL was generated during subsequent searches.Q076

      The cause may be that WAL was generated because hint bits were updated during searches after data insertion. Hint bits are used to mark tuples that have been created, deleted, or both, by transactions that have been committed or aborted.

      Resolve the issue by ensuring sufficient capacity in the archive WAL storage location or by not specifying the -k option (enable checksums) when executing the initdb command, and setting wal_log_hints in postgresql.conf to off  (however, in this case, the pg_rewind command will become unavailable).

      For details, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.5. Write Ahead Log > 19.5.1. Settings

      Platform: Windows, Linux  |  Version: All versions

      When I executed the Pgpool-II pcp_attach_node command in Fujitsu Enterprise Postgres, the error DETAIL: could not open /xxx/pcp.conf. reason: No such file or directory.Q077

      The path to the pcp.conf configuration file may not have been specified when starting Pgpool-II. When starting Pgpool-II, specify the path to the pcp.conf configuration file using the -F option.

      Platform: Windows, Linux  |  Version: 10 and later

      In Fujitsu Enterprise Postgres database multiplexing operation, the error ERROR: requested WAL segment XXXXX has already been removed is displayed.Q078

      A WAL segment that the standby server was supposed to receive has already been deleted (recycled) on the primary server.

      To resolve this, recreate the standby server instance to recover. For details, refer to the manual: Fujitsu Enterprise Postgres Cluster Operation Guide (Database Multiplexing) > Part 1: Database Multiplexing Operation > Chapter 4: Handling Abnormalities in Database Multiplexing Operation > 4.1 Handling Degraded Operation

      To avoid the error from occurring again, consider increasing the number of WAL segments retained on the primary server or using replication slots. For details, refer to Fujitsu Enterprise Postgres Cluster Operation Guide (Database Multiplexing) > Chapter 2 - Database Multiplexing Operation Setup > 2.11 - Tuning > 2.11.1 - Tuning for stabilizing database multiplexing operation and PostgreSQL Documentation > Part III. Server Administration > Chapter 26. High Availability, Load Balancing, and Replication > 26.2. Log-Shipping Standby Servers > 26.2.6. Replication Slots, respectively.

      Platform: Windows, Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres, I encountered an error ERROR: canceling autovacuum task.Q079

      The autovacuum execution was canceled due to a conflict with other SQL statement executions.

      The conflicting table can be identified in the CONTEXT error information output on the line after ERROR: canceling autovacuum task. The conflicting SQL statement can be checked in the pg_stat_activity view. If DEFAULT or VERBOSE is specified for the log_error_verbosity parameter in postgresql.conf, it will be output as CONTEXT: automatic vacuum of table table_name

      Since autovacuum is automatically re-executed, no action is required if the re-execution completes successfully. However, if re-execution continuously fails with this error, it indicates that a long transaction accessing the relevant table exists, and autovacuum is unable to operate. Review your application and resolve the long transaction.

      For details on the log_error_verbosity parameter, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.8. Error Reporting and Logging > 19.8.3. What to Log. For details on autovacuum, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 24. Routine Database Maintenance Tasks > 24.1. Routine Vacuuming. For details on the pg_stat_activity view, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 27. Monitoring Database Activity > 27.2. The Cumulative Statistics System.

      Platform: Windows, Linux  |  Version: All versions

      Even though the max_connections parameter in Fujitsu Enterprise Postgres was not exceeded, a message indicating that the connection limit was exceeded was output.Q080

      The file descriptor limit was reached before the max_connections parameter limit was reached. When a client process establishes a connection to the database, file descriptors are consumed. Therefore, this occurs when the file descriptor limit is reached before the max_connections parameter limit in postgresql.conf. If necessary, modify the limits.conf settings.

      For details on the max_connections parameter, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.3. Connections and Authentication > 19.3.1. Connection Settings

      Platform: Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres, how can I identify applications connected to the database?Q081

      You can check using the pg_stat_activity view or pgAdmin. For details, refer to Fujitsu Enterprise Postgres > Operation Guide > Chapter 7 - Routine Operations > 7.4 - Monitoring Application Connection Status.

      Platform: Windows, Linux  |  Version: All versions

      In an environment where Fujitsu Enterprise Postgres streaming replication is applied, executing UPDATE-related SQL commands such as CREATE DATABASE or INSERT becomes unresponsive.Q082

      If synchronous replication is configured with a standby server, transaction commits may be waiting for WAL records to be replicated to the standby server.

      Standby servers specified in the synchronous_standby_names parameter of the primary server's postgresql.conf will use synchronous replication.
      If synchronous replication is configured with a standby server, and the synchronous_commit parameter of the primary server is set to remote_apply, on, or remote_write, then when COMMIT is executed on the primary server, transaction commits will wait until the corresponding WAL records are replicated to the standby server. For details on the synchronous_standby_names and synchronous_commit parameters, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.6. Replication > 19.6.2. Primary Server and 19.5. Write Ahead Log > 19.5.1. Settings .

      To resolve this, check if there are any abnormalities in the standby server configured for synchronous replication or in the replication path.

      Platform: Windows, Linux  |  Version: All versions

      If SJIS is set as the encoding for Fujitsu Enterprise Postgres running on Windows OS, what is the impact?Q083

      For both input from the client to the server and output from the server to the client, character code conversion using conversions defined by CREATE CONVERSION is executed according to the client encoding (client_encoding) setting for each session.

      However, there are the following notes regarding the client_encoding value depending on the client application used:

      • For Npgsql: The client_encoding during connection is specified by the ClientEncoding parameter. If it is  set to SJIS, the .NET side also needs to specify the Encoding parameter. The default value for client_encoding in Npgsql is UTF-8. The client encoding can be changed by modifying the PGCLIENTENCODING environment variable.
      • For psql: If both standard input and standard output are terminals, the default value for psql's client encoding is determined from the OS locale settings. If standard input or standard output is not a terminal, the default value for psql's client encoding follows the client_encoding specified in the server's postgresql.conf file. The client encoding can be changed by modifying the PGCLIENTENCODING environment variable.

      Platform: Windows, Linux  |  Version: All versions

      On a Fujitsu Enterprise Postgres client running on Windows OS, when accessing the database from a .NET application via Npgsql with the PGCLIENTENCODING environment variable set to SJIS, the error  Cannot convert byte [xx][yy] from the specified code page to Unicode is displayed.Q084

      The String type data in the .NET Framework is internally held as UTF16. Therefore, when data converted to SJIS on the server side according to client_encoding was subsequently converted from SJIS to UTF16 on the client side, there were no corresponding character conversion rules in the .NET Framework.
      Npgsql returns string type data as .NET Framework string objects, so it converts the received byte sequence to UTF16 according to the encoding set in the Encoding parameter.
      If ClientEncoding parameter, PGCLIENTENCODING environment variable, and Encoding parameter are set to SJIS, data is converted from UTF8 to SJIS on the server side and then sent to the client. When Npgsql receives this data and tries to convert it from SJIS to UTF16, characters for which no conversion rules are defined in the .NET Framework cause an error.
      Note that if the ClientEncoding parameter, PGCLIENTENCODING environment variable, and Encoding parameter are set to UTF8, Npgsql interprets the byte sequence received from the server as UTF8 and performs code conversion from UTF8 to UTF16. Since both UTF8 and UTF16 are Unicode encoding schemes, no conversion errors occur.
      Therefore, when using Npgsql, it is generally recommended to set ClientEncoding and the PGCLIENTENCODING environment variable to their default value of UTF8.
      If client_encoding is specified in the server's postgresql.conf file, it affects the default value of client_encoding for all applications connecting to the server. However, for applications using Npgsql only, the impact can be localized by specifying UTF8 for the ClientEncoding parameter in the connection string, etc.

      Platform: Windows, Linux  |  Version: All versions

      When executing a transaction containing a SAVEPOINT in Fujitsu Enterprise Postgres, the execution of some SQL commands may slow down significantly across the entire instance until that transaction is completed.Q085

      If there are many subtransactions created by SAVEPOINT commands, etc., within a single transaction, simultaneous execution of multiple SQL commands may have resulted in contention for reading subtransaction information.
      In PostgreSQL, when more than 64 subtransactions exist, visibility of a row is determined by expanding disk-resident subtransaction information into a cache area. An exclusive lock is acquired during this expansion, which may cause other transactions attempting to concurrently read subtransaction information to enter a waiting state. The longer a long transaction remains, the more subtransaction information is accessed, increasing the likelihood of contention and associated wait time occurring.

      To prevent long transactions, either COMMIT at an appropriate time or reduce the number of subtransactions per transaction to 64 or less.

      Platform: Windows, Linux  |  Version: All versions

      When executing the Fujitsu Enterprise Postgres pg_stop_backup command, it becomes unresponsive.Q086

      This may be caused because the archive log storage directory specified in archive_command in postgresql.conf does not exist.
      The pg_stop_backup command waits for logs output until command execution to be saved as archive logs.
      Therefore, if the archive log storage directory does not exist and archive logs cannot be saved, the command will remain in a waiting state until that condition is resolved.

      Check if the archive log storage directory specified in archive_command in postgresql.conf exists, or if there is an error in the specified directory name.
      If the specified directory does not exist, create it.

      Platform: Windows, Linux  |  Version: All versions

      The number of Fujitsu Enterprise Postgres server processes (backend processes) has increased, and memory usage and CPU utilization are high.Q087

      It may be because the application is not disconnecting from the database, leaving unnecessary connections. Use the pg_stat_activity view to check the status of connected connections. Disconnect unnecessary connections using the pg_terminate_backend function in Fujitsu Enterprise Postgres. Also, check the application and add a process to disconnect from the database to the application.

      If a process to disconnect from the database is already implemented, review the maximum number of concurrent connections specified in the max_connections parameter of postgresql.conf.

      For details on disconnecting from the database, refer to the PostgreSQL Documentation > Part IV - Client Interfaces > Chapter 34 - ECPG — Embedded SQL in C > 34.2 - Managing Database Connections(it provides a detailed explanation for Embedded SQL in C; if other interfaces are used, refer to the manual for the corresponding programming language). For details on the max_connections parameter, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.3. Connections and Authentication > 19.3.1. Connection Settings

      Platform: Windows, Linux |  Version: All versions

      Fujitsu Enterprise Postgres terminated abnormally.Q088

      If Fujitsu Enterprise Postgres terminated abnormally and messages containing error codes such as 0xC000009A, 0xC00000FD, 0xC000012D, 1450, 1455 were output, it is possible that Fujitsu Enterprise Postgres was unable to operate due to insufficient memory.

      LOG: server process (PID xxx) was terminated by exception 0xC000009A

      LOG: server process (PID xxx) was terminated by exception 0xC00000FD

      LOG: autovacuum launcher process (PID xxx) was terminated by exception 0xC000012D

      LOG: CreateProcess call failed: A blocking operation was interrupted by a call to WSACancelBlockingCall.(error code 1450)

      LOG: CreateProcess call failed: No error (error code 1450)

      LOG: CreateProcess call failed: A blocking operation was interrupted by a call to WSACancelBlockingCall.(error code 1455)

      FATAL: could not reattach to shared memory (key=xxx, addr=xxx): error code 1455

      Estimate the memory usage of products running on the server, including Fujitsu Enterprise Postgres, and check if the installed memory is adequate. If it is insufficient but cannot be increased, tune to reduce memory usage, such as decreasing the number of connections to the database. For details, refer to Fujitsu Enterprise Postgres Installation and Setup Guide for Server > Appendix F - Memory Estimation

      Platform: Windows  |  Version: All versions

      When I execute the Fujitsu Enterprise Postgres pg_ctl start command, the error Timed out waiting for server startup is displayed.Q089

      The database server startup process did not complete within the maximum number of seconds to wait for startup to complete due to crash recovery (automatic recovery to maintain data integrity) operating.

      Specify a larger value for the maximum number of seconds to wait for startup to complete using the -t option of the pg_ctl start command or the PGCTLTIMEOUT environment variable. If the -t option of the pg_ctl start command or the PGCTLTIMEOUT environment variable is not specified, the maximum number of seconds to wait for startup to complete is 60 seconds. For details, refer to PostgreSQL Documentation > VI. Reference > PostgreSQL Server Applications > pg_ctl.

      Platform: Windows, Linux  |  Version: All versions

      When I execute the Fujitsu Enterprise Postgres pgx_dmpall command, the error could not open file xxxxx: No such file or directory. is displayed.Q090

      The backup directory specified in the backup_destination and archive_command parameters of the postgresql.conf file are different. Stop the database server and correct the backup directory specified in the backup_destination and archive_command parameters of the postgresql.conf file, then restart the database server.

      The values to be specified for the backup_destination and archive_command parameters of the postgresql.conf file are as follows.

      • backup_destination parameter: Name of the backup data storage directory.
      • archive_command parameter: For Linux: installation_directory/bin/pgx_walcopy.cmd "%p" "backup_data_storage_directory/archived_wal/%f". For Windows: cmd /c ""installation_directory\\bin\\pgx_walcopy.cmd" "%p" "backup_data_storage_directory\\archived_wal\\%f""

      For details, refer to Fujitsu Enterprise Postgres Documentation Operation Guide > Chapter 3: Database backup > 3.2 Backup Methods > 3.2.2 When using server commands

      Platform: Windows, Linux  |  Version: All versions

      During a Fujitsu Enterprise Postgres database reference process, the error The database is not accepting queries to prevent data loss due to wraparound in database xxxxx. is displayed.Q091

      The transaction ID is approaching its wraparound limit. To avoid this, perform vacuum processing manually or by appropriately configuring autovacuum settings (postgresql.conf) and performing vacuum processing periodically.

      However, if the cause is the presence of long transactions, vacuum processing will not be performed on locations where long transactions hold conflicting locks. Therefore, it may be necessary to consider monitoring long transactions, for example, by periodically checking the pg_stat_activity view.

      Platform: Windows  |  Version: All versions

      I uninstalled and reinstalled Fujitsu Enterprise Postgres. After that, when I tried to create an instance using WebAdmin, the error : The specified port number is in use. is displayed.Q093

      Instance information created before uninstallation still remains. You can either create an instance with a port number different from the one used by the instance created before uninstallation, within the range 1024 to 49151, or delete instance information created before uninstallation, and then create the instance again.

      To delete instance information created before uninstallation:

      • Ensure that the data directory, backup directory, and transaction log directory do not exist
      • Comment out the lines with the corresponding port numbers in the services file (Windows services file).
        Display the Windows service list (for example, in Computer Management, select Services and Applications > Services).
        If a service for the instance created before uninstallation exists in the service list, execute sc delete service name in the command prompt to delete that service.

      For details, refer to Fujitsu Enterprise Postgres Installation and Setup Guide for Server Edition > Chapter 4 - Setup.

      Platform: Windows  |  Version: All versions

      When I execute the pgx_dmpall command using a password file, the error fe_sendauth: no password supplied is displayed.Q094

      An IP address matching 127.0.0.1 is not specified for the hostname in the password file pgpass.conf. Since the pgx_dmpall command connects to the database by specifying 127.0.0.1, specify an IP address matching 127.0.0.1 for the hostname in the pgpass.conf and re-execute the command.

      For details, refer to Fujitsu Enterprise Postgres Documentation Reference Guide > Chapter 3 Server Commands > 3.2 pgx_dumpall

      Platform: Windows  |  Version: All versions

      When I execute a SQL query on a partitioned table using inheritance, it searches all partitions.Q095

      It may be that constraint exclusion is not working because the WHERE clause of the executed SQL statement does not contain a constant or parameter value. Check that the constraint_exclusion parameter is set to partition or on, and then specify the WHERE clause with a constant or parameter value to narrow down the partitions.

      For details, refer to PostgreSQL Documentation > II. The SQL Language > 5. Data Definition > 5.12 Partitioning > 5.12.5 Partitioning and Constraint Exclusion

      Platform: Windows, Linux  |  Version: All versions

      When I ran the pg_restore command to restore backup data which was backed up with the pg_dump command., the server's drive ran out of free space, resulting in an error.Q096

      The pg_restore command restores data using SQL commands, which causes WAL to be generated. Free space can run low due to the ensuing creation of transaction log files, replicated WAL files, and archive log files.

      If the backup_destination and archive_mode are configured in postgresql.conf, comment them out before executing the pg_restore command and restart the database instance. This will prevent the creation of replicated WAL files and archive log files. After the pg_restore command completes, revert the commented-out parameter settings and restart the database instance. For details, refer to Fujitsu Enterprise Postgres Operation Guide > Appendix A Parameters > backup_destination and PostgreSQL Documentation > III. Server Administration > 19. Server Configuration > 19.5 Write Ahead Log > archive_mode

      Platform: Windows, Linux  |  Version: All versions

      Fujitsu Enterprise Postgres takes a long time to stop, and the stop command fails with a timeout.Q097

      The application of checkpoints may be taking a long time during the shutdown process. The default timeout value for shutdown (when executing pg_ctl) is 60 seconds. If it takes longer than that, the pg_ctl command will error out, but the shutdown process will continue in the background and complete without issues.

      To wait for a longer period, specify a larger value for the "maximum number of seconds to wait for shutdown to complete" using the -t option of the pg_ctl stop command or the PGCTLTIMEOUT environment variable. For details, refer to PostgreSQL Documentation > VI. Reference > PostgreSQL Server Applications > pg_ctl

      Platform: Windows, Linux  |  Version: All versions

      WAL files are not being deleted on the standby server.Q098

      This may have been caused by the WAL application process in the standby server's startup process, which is waiting for read-only SQL statements to complete. On a standby server, conflicts can occur between queries to the standby server and WAL application for certain operations (e.g., table exclusive locks, DROP DATABASE, VACUUM) sent from the primary server. If such conflicts occur, WAL application may enter a waiting state, preventing WAL files from being deleted.

      Consider stopping long-running read-only SQL queries executing on the standby server. Also, consider setting the max_standby_streaming_delay parameter to 1 or greater. If the parameter is set and read-only SQL queries run longer than the specified time, they may return error "FATAL: 40000: terminating connection due to conflict with recovery" error. Therefore, take into account the execution time of read-only SQL queries when setting this parameter. For details, refer to PostgreSQL Documentation > III. Server Administration > 19. Server Configuration > 19.6 Replication > max_standby_streaming_delay

      Platform: Windows, Linux  |  Version: All versions

      When I executed table reorganization using pg_repack with the -T and -D options, the process was not skipped even when conflicts with other processes occurred, and vacuum processing took a long time. Q099

      This may have been caused by long-running transactions that existed prior to the start of the pg_repack command's table reorganization. The -T option of pg_repack specifies the waiting time for other transactions to be canceled when a lock conflict occurs on the target table. It has no effect when waiting for long-running transactions to complete.

      pg_repack table reorganization creates a temporary work table for the target table. Triggers are set on the target table, and update processing during reorganization is recorded in an update log table. After reorganization is complete, the differential information is applied to the work table, and switched with the target table. When applying the differential information to the work table, the process waits for all transactions that started before that to complete. There is no option to set a timeout for this transaction completion wait. To avoid this, ensure that long transactions do not occur during pg_repack operations (for example, COMMIT or ROLLBACK transactions that are running during pg_repack as soon as necessary processing is complete). Also, it is recommended to schedule pg_repack and batch processes (which tend to be long transactions) at different times.

      Platform: Linux  |  Version: All versions

      Pgpool-II detected a node down on a redundant server.Q100

      If you are using Pgpool-II's failover function, failover may occur even due to temporary network issues depending on parameter settings. If the failover_on_backend_error parameter in pgpool.conf is set to its default value or on, Pgpool-II will automatically execute failover if it detects a communication error in any established connection between the database and Pgpool-II.

      In this case, retries cannot be configured for the detected error, so failover will occur even for network abnormalities that are very brief and do not warrant switching databases. Especially in cloud environments, connections in an idle state may be automatically terminated during live migration, etc. If an idle connection in Pgpool-II's connection pooling is terminated by this mechanism, Pgpool-II will detect an abnormality when it attempts to use that connection, leading to failover occurring at a different time than when the connection was actually terminated.

      To avoid this, consider setting the failover_on_backend_error parameter in pgpool.conf to off and enabling the health check function. For details, refer to pgpool-II Documentation > II. Server Administration > 5. Server Configuration > 5.9 Health Check

      Platform: Linux  |  Version: All versions

      Business application response times occasionally degrade at regular intervals.Q101

      This may have been caused by pg_stat_statements. It appends SQL statement information to an external file pg_stat_tmp/pgss_query_texts.stat. When the external file grows large, a process to delete unnecessary data runs to reduce its size.

      During this process, disk I/O is involved, and an exclusive lock is acquired on pg_stat_statements, which may cause other concurrent transactions to wait for locks, leading to degraded response times. The timing of unnecessary data deletion is determined by the number of items specified in the pg_stat_statements.max parameter and the average length of executed SQL statements.

      Consider reducing the pg_stat_statements.max parameter to shorten the time required for a single unnecessary data deletion process. Alternatively, execute the pg_stat_statements_reset() function periodically to initialize the external file. For details, refer to PostgreSQL Documentation > Part VIII. Appendixes > Appendix F. Additional Supplied Modules and Extensions > F.32. pg_stat_statements

      Platform: Windows, Linux  |  Version: All versions

      After product installation, pgAdmin4 fails to start with an error. How can I get it to start?Q102

      Delete the folders C:\Users[login username]\AppData\Roaming\pgAdmin and C:\Users[login username]\AppData\Roaming\pgAdmin, and then start pgAdmin4.

      If that does not solve the issue, disable proxy settings for 127.0.0.1 (localhost) communication, because otherwise pgAdmin4 mail fail to start. If a proxy is enabled for localhost communication in your environment, disable it or add NO_PROXY=127.0.0.1,localhost to your environment variables and then try starting pgAdmin4.

      Platform: Windows  |  Version: All versions

      When I promoted a streaming replication standby instance, the pg_ctl promote command returned a timeout error.Q103

      If the parameter restore_command was set on the standby instance, its execution may have taken a long time. If restore_command is set, when the standby instance receives a promotion request, restore_command is executed multiple times, and the promotion process waits for it to complete. In this situation, if restore_command is a copy command involving network communication, such as an scp command, and the network to the destination is unavailable, the promotion process may take a long time due to waiting for the copy command to return. As a result, the error pg_ctl: server did not promote in time may be displayed, and the promotion process may time out.

      To avoid this, when setting a copy command involving network communication, such as scp, for restore_command, set a timeout for the copy command so that the process completes within the waiting time specified for the pg_ctl promote command. For example, for the scp command, the -o "ConnectTimeout timeout" option can be used. In case of network unavailability, restore_command may run about 5 times after receiving a promotion request. Therefore, the timeout value should be set with some margin against the waiting time (default: 60 seconds) specified for the pg_ctl promote command.

      For details, refer to PostgreSQL Documentation > Part III. Server Administration > Chapter 19. Server Configuration > 19.5. Write Ahead Log > 19.5.5. Archive Recovery > restore_command

      Platform: Windows, Linux  |  Version: All versions

      Disk space is being exhausted due to repeated data updates and deletions, and database performance is degrading.
      Q035

      The cause is the presence of a large amount of old updated and deleted data. Fujitsu Enterprise Postgres adopts an append-only architecture to minimize contention due to locks when writing table data. Therefore, when UPDATE and DELETE statements are executed, old updated and deleted data continues to be retained in the table.

      To reclaim old updated and deleted data, enable autovacuum or regularly execute VACUUM and ANALYZE commands manually. However, the VACUUM command may acquire exclusive locks and generate a large amount of I/O traffic, potentially degrading the performance of other active sessions. When executing the VACUUM command, set related parameters to mitigate its impact on performance. For details, refer to the PostgreSQL Documentation > Part III - Server Administration > Chapter 24 - Routine Database Maintenance Tasks > 24.1 - Routine Vacuuming.

      Platform: Linux  |  Version: All versions

      For Point-in-Time Recovery (PITR), up to what point in time can I recover the database?
      Q037
      Can I delete the .backup files located in the archived_wal directory under the Fujitsu Enterprise Postgres backup directory?Q047

      No, you should not delete them. Files in the backup directory are managed by Fujitsu Enterprise Postgres. Updating or deleting them may prevent Fujitsu Enterprise Postgres from starting, or prevent database backups and recovery.

      Deleting .backup files may cause the Fujitsu Enterprise Postgres pgx_dmpall command error could not open file "x://xxxxx/archived_wal/xxxx.backup": No such file or directory.

      Platform: Linux  |  Version: All versions

      After applying an urgent patch for WebAdmin, the WebAdmin screen does not display when the startup URL is specified in the browser's URL.
      Q049

      The WebAdmin setup was not executed after applying the urgent patch. Refer to the [Notes] section in the urgent patch information file and execute WebAdmin setup. For details on setup, refer to the Fujitsu Enterprise Postgres Installation and Setup Guide for Server Edition > Appendix B - Setting Up and Removing WebAdmin > B.1 - Setting Up WebAdmin > B.1.1 - Setting Up WebAdmin.

      Platform: Linux  |  Version: All versions

      Disk usage for the Fujitsu Enterprise Postgres transaction log directory (pg_wal) reached 100%. Can I delete the transaction log directory or its files?
      Q050

      No, you should not delete them. The transaction log directory and its files are managed by Fujitsu Enterprise Postgres, so do not delete or update them, otherwise Fujitsu Enterprise Postgres may not be able to start or perform database recovery. For disk space issues, refer to the Fujitsu Enterprise Postgres Operation Guide > Chapter 18 - Actions when an Error Occurs > 18.8 Actions in Response to Insufficient Space on the Transaction Log Storage Destination, and for the required disk space for the transaction log directory, refer to the Fujitsu Enterprise Postgres Installation and Setup Guide for Server > Appendix E - Estimating Transaction Log Space Requirements.

      If files in the transaction log directory are deleted, executing pg_ctl start may cause the error below:

      LOG: invalid primary checkpoint record
      PANIC: could not locate a valid checkpoint record

      Platform: Linux  |  Version: All versions

      In Fujitsu Enterprise Postgres database multiplexing operation, the error WARNING: An abnormality was detected in the monitoring target "server (xxx)": Unresponsive: ping timeout (MCA00019) is displayed.Q051

      This indicates that a timeout was detected by the OS/server liveness monitoring (heartbeat) of the database multiplexing operation (Mirroring Controller). If the OS/server is not down, the cause may be temporary network or server load.

      Review the liveness monitoring timeout period specified in seconds by the heartbeat_timeout parameter of the database multiplexing operation's server definition file.
      For details, refer to the Fujitsu Enterprise Postgres Cluster Operation Guide (Database Multiplexing) > Chapter 2 - Setting Up Database Multiplexing Mode ;> 2.11 Tuning > 2.11.4 - Tuning for Optimization of Degradation Using Abnormality Monitoring and Appendix A: Parameters > A.4 Server Configuration File.

      If liveness monitoring times out consecutively for a number of times (specified in the heartbeat_retry parameter + 1), the database multiplexing operation automatically performs a primary server switchover or standby server detachment. The MCA00019 error is output for each liveness monitoring timeout detected

      Platform: Linux  |  Version: All versions

      How do I verify if the tablespace is encrypted or unencrypted?KBS001

      You can verify which tablespaces are encrypted and their encryption algorithm using the pgx_tablespaces system view: SELECT spcname, spcencalgo FROM pg_tablespace ts, pgx_tablespaces tsx WHERE ts.oid = tsx.spctablespace;.

      Platform: Linux  |  Version: All versions

      I would like to encrypt not only data, but also backup data. How can I achieve that?KBS002

      Encryption using Transparent Data Encryption is applied at the tablespace level. This means that data such as tables and indexes created in the specified tablespace, the WAL, backup files, and archive logs will be automatically encrypted.

      The data and index in the encrypted tablespace along with the associated WAL files can be backed up by taking a physical backup using the pgx_dmpall or pg_basebackup command. It is important to back up the keystore.ks file so that encrypted data can be restored with a keystore and passphrase. If there is any tablespace which is not encrypted, then it is backed up as unencrypted.

      Note that a logical backup taken by pg_dump, pg_dumpall, or COPY command is not encrypted. This is because a logical backup is taken through SQL interface (like a client executing any other select statement), so encrypted data are decrypted before writing to a backup file.

      Platform: Linux  |  Version: All versions

      How can data, for example a credit card number, be masked with Data Masking?KBS003

      If you want to mask the first 12 digits of a credit card number, you can apply partial masking. There are 3 different types of Data Masking supported that can be applied using masking policies, which include:

      • Full masking, where a whole column value can be obfuscated with alternate values. For example, values in a numeric type of column are replaced with ‘0’ and values in a character type of column are replaced with a space.
      • Partial masking, which allows masking part of a string - for example, the first 12 digits of a credit card number can be replaced with ‘*’.
      • Regular expression masking is flexible and allows you to define masking by using regular expressions, which is useful for unstructured types like XML or JSON (ability to mask a single element). For example, for strings with variable length such as email address, characters preceding ‘@’ can be replaced with ‘*’.

      You can specify whether to apply a masking policy using a function - if it returns is true, then masking will be applied. This approach also gives the flexibility to selectively mask data to specific users.

      Platform: Linux  |  Version: All versions

      How do I check the log of a scheduled backup? OP001

      Logs of scheduled backups can be viewed in either of the following ways:

      • To viewing logs for pods created by CronJob, use kubectl logs pod/{clusterName} -cronjobXXX.

        Each time a scheduled backup is taken, a CronJob pod will be created with the name in the format {ClusterName} -cronjobXXX. The latest 3 pods will be stored, and older pods will be deleted. Users can view logs of each CronJob pod by running the kubectl logs command above.

      • To go to the backup container and view the logs under /var/log/pgbackrest, use kubectl rsh -c fepbackup {MasterPodName}.
      Can backup be switched on/off? OP002

      Yes, backup can be switched off by setting the schedule in the FEPCluster CR to 0, as follows:

      spec:
         fepChildCrVal:
            backup:
               schedule:
                  num: 0
      Can the initial backup be an incremental backup? OP003

      Yes, an initial backup can be taken by setting up an incremental backup. However, a full backup will be performed if an incremental backup is scheduled as the first backup, since incremental backups must be based on a full backup.

      Are there any limitations on the parameters of pgBackRest?OP004
      When restore is performed to a new FEP cluster, does the connection of application switch automatically?OP005

      No, the connection has to be changed manually. You can change the connection destination of Pgpool-II from the old cluster to the new cluster by editing the FEPPgpool2 CR parameter fepclustername.

      What should I do if the Pgpool-II container goes down? OP006

      If a Pgpool-II container goes down you don't need to do anything, it is automatically recovered. Note that connection from applications to the container are broken and will need to be re-established. For this reason, it is recommended to design application so that they automatically reconnect if connections are broken.

      What should I do if the FEP container goes down?OP007

      If an FEP container goes down you don't need to do anything, it is automatically recovered. In a redundant configuration, the master FEP container is switched and the FEP container that went down is repopulated as a replica.

      Note that connection from applications to the container are broken and will need to be re-established. For this reason, it is recommended to design application so that they automatically reconnect if connections are broken.

      Is it possible to have only one Pgpool-II container?OP008

      Yes, it is possible to deploy only one Pgpool-II container.

      When the CR of a Pgpool-II instance is changed to switch the connection to another FEP cluster, will the instance be redeployed? Will the user be disconnected from the database during redeployment?OP009

      Yes, Pgpool-II will be redeployed in this case. Connections requested to a Pgpool-II instance currently being redeployed will be denied. However, if there are multiple Pgpool-II instances configured, because the redeployment of Pgpool-II instances is conducted one by one, the user will be able to connect to the database through a Pgpool-II instance that is not going through redeployment.

      How do new users authenticate when connecting through Pgpool-II? OP010

      The server is accessed every minute to obtain information of the users registered in Fujitsu Enterprise Postgres. Therefore, a connection will be made as long as the new user is registered on the Postgres side.