Documentation

PostgreSQL - Troubleshooting

Updated on

Dec 26, 2023

While configuring your PostgreSQL connection, you may encounter several issues. Understanding these common errors can help streamline the setup process and facilitate quick resolutions.

Wrong input data

  • Wrong host
  • Wrong port
  • Static IP not selected
  • Whitelist error
  • Wrong user
  • Wrong password
  • Wrong database name
  • Wrong schema

Error messages:

{%docs-informer error%} "Wrong host name. Make sure you provide the correct host." "Failed to connect to the server. Please check that host and port are correct. If your database is behind a firewall, make sure you whitelisted our IP's and select "Use static IP = YES" in connection parameters." "Database "database_name" does not exist. Make sure you provide the correct database name." "Schema "public_schema" does not exist. Please specify an existing schema." {%docs-informer-end%}

General Solution

Verify Host Information:

  • For 'Wrong hostname' and connection failures, ensure the hostname and port number are correctly entered. Double-check for any typos or incorrect details.

Firewall and IP Whitelisting:

  • If your database is behind a firewall, verify that your IP addresses are whitelisted. In your connection settings, select "Use static IP = YES" for a stable connection.

Database and Schema Verification:

  • For errors indicating a non-existent database like "Database ```‘database_name'``` does not exist," confirm the correct database name is provided.
  • Similarly, for "Schema ```'public_schema'``` does not exist," ensure you specify an existing schema in your database.

Refer to the Documentation if necessary

SSL certificate errors

  • Invalid SSL certificate

Error message:

{%docs-informer error%} "SSL certificate verification failed. It has wrong format or has been revoked." {%docs-informer-end%}

Solution

Check Certificate Format:

  • Ensure that your SSL certificate is in the correct format required by your server or application. Common formats include .pem, .cer, and .key.

Verify Certificate Validity:

  • Check if the SSL certificate has expired or been revoked. You can use online tools to verify the certificate's status or refer to the issuing Certificate Authority (CA) for confirmation.

Reissue or Renew SSL Certificate:

  • If the certificate is invalid or revoked, obtain a new SSL certificate from a trusted CA. Follow the CA's instructions for generating a new certificate request and installing it on your server.

Install Certificate Correctly:

  • Make sure the SSL certificate is properly installed on your server. This may include installing intermediate certificates and ensuring that the certificate chain is complete.

Test the SSL Connection:

  • After installing or updating the certificate, test your SSL connection to ensure it's working correctly. Tools like SSL Labs' SSL Test can be helpful for this purpose.

Wrong permissions

Error message:

{%docs-informer error%} "Insufficient privileges to perform operations.' 'You should grant all permissions specified in the docs." {%docs-informer-end%}

Solution

Confirm Necessary Permissions:

  • Ensure the user or role interacting with PostgreSQL has the following permissions: ```CREATE```, ```ALTER TABLE```, ```SELECT```, ```INSERT```, and ```DELETE```.
  • These permissions are essential for a wide range of database operations.

Grant Permissions:

  • Use PostgreSQL commands to grant these permissions to the user or role. For example, ```GRANT SELECT ON table_name TO user_name;``` grants the user the ability to read data from a specified table.
  • If your user needs to perform a broad range of operations, consider granting more comprehensive permissions like ```ALTER```, ```CREATE```, and ```DELETE```.

Verify Permissions:

  • After granting permissions, verify that the user or role can perform the required operations without encountering 'Insufficient privileges' errors.
  • You can check the current permissions of a user using the ```\du``` command in the psql command-line interface.

Seek Administrator Help:

  • If you do not have the necessary privileges to grant permissions, or if you encounter difficulties, contact your PostgreSQL database administrator for assistance.

{%docs-informer info%} If none of the provided solutions worked, feel free to raise a request via the Service Desk {%docs-informer-end%}

Schema information

Setup guide

Settings

No items found.

Troubleshooting

Troubleshooting guides

Check out troubleshooting guides for
PostgreSQL - Troubleshooting
here:

Limits

Frequently asked questions

No items found.
☶ On this page
Description
Related articles
No items found.
No items found.

Questions?

Improvado team is always happy to help with any other questions you might have! Send us an email.

Contact your Customer Success Manager or raise a request in Improvado Service Desk.