Documentation
Data sources
Connect Databses
PostgreSQL

PostgreSQL

With Querier, you can integrate with PostgreSQL and execute various queries.

Preparation

Connecting via IP Whitelisting

Add the following IP address to the whitelist in your database's firewall rules:

35.187.200.118

Connecting via SSH Tunneling

Refer to this document to set up a bastion server.

Connection Method

1. Create a new data source connection

  1. Click the [Resources] tab.
  2. Click the [Create] button next to [Resources].
  3. Select [PostgreSQL].

2. Enter the connection information

Common Items

FieldDescription
NameEnter the name of the PostgreSQL connection (e.g., Querier DB).
Managed ServiceSelect None or Cloud SQL.
Database nameEnter the database name of the PostgreSQL you are connecting to.
Database usernameEnter the database username for the PostgreSQL connection.
Database passwordEnter the password for the PostgreSQL connection.

🙋‍♂️ About Managed Service

Querier currently supports connections via Cloud SQL Proxy. If you use Cloud SQL, selecting Cloud SQL under [Managed Service] will allow connection via Cloud SQL Proxy.
Otherwise, please select None.

If None is selected for Managed Service

FieldDescription
HostEnter the host of the PostgreSQL connection.
PortEnter the port for the PostgreSQL connection (e.g., 3306).

If Cloud SQL is selected for Managed Service

FieldDescription
Project IDEnter the Project ID for the GCP where Cloud SQL is set up.
Instance nameEnter the instance name of the Cloud SQL you are connecting to.
RegionEnter the region of the Cloud SQL (e.g., asia-northeast1).
Credentials JSONEnter the service account for the GCP where Cloud SQL is set up in JSON format.

🙋‍♂️ Required Permissions for the Service Account

The service account must have one of the following permissions:

  • Cloud SQL Client
  • Cloud SQL Editor
  • Cloud SQL Admin

When SSL connection is enabled

FieldDescription
CA CertificateUpload the CA certificate file.
Client KeyUpload the client key file.
Client CertificateUpload the client certificate file.
Verification modeSelect the verification method.

3. Set Up a Bastion Server

If you are connecting via a bastion server, follow these additional steps. Otherwise, skip this section.

  1. Check [Set up a bastion server].
  2. Select the bastion server you set up during the preparation.