Skip to content

Connect Aiven for PostgreSQL to Infograph

What it brings in: Every table and view the user can read.

What you need

  • An Aiven for PostgreSQL service.
  • Access to the service's Overview and Service settings.
  • Infograph's sync servers connect from 51.222.152.247.

Your connection string

Each part is one thing you fill in, and each can fail on its own.

Aiven for PostgreSQL· Connection string
postgres://:@[host].aivencloud.comhost: fix for "We couldn't find that host. Check the host name, then try again.":[port]port: fix for "The host refused the connection. Check the port, and that your database accepts connections from Infograph's address."/defaultdbdatabase: fix for "That database does not exist on this server."?sslmode=require
AddressSign inDatabaseSelect a label for its fix

Steps

  1. Allow Infograph's sync servers

    If the service has an IP allowlist, open Service settings, then Cloud and network, choose Set IP address allowlist and add the addresses below. If the service is in a VPC, enable public access too.

    51.222.152.247/32
  2. Create a read-only user

    Infograph only reads. Give it its own user so you can see and revoke its access in one place. Run this as avnadmin, with your own password and database name. Then use the new user and password in the string.

    CREATE USER infograph WITH PASSWORD '[strong-password]';
    GRANT CONNECT ON DATABASE [database] TO infograph;
    GRANT USAGE ON SCHEMA public TO infograph;
    GRANT SELECT ON ALL TABLES IN SCHEMA public TO infograph;
    ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO infograph;
  3. Copy the Service URI

    On the service Overview, under Connection information, copy the Service URI. Do not use a connection pool URI, which breaks syncing. If the service is in a VPC, pick the Public access route first.

    postgres://avnadmin:[password]@[host].aivencloud.com:[port]/defaultdb?sslmode=require
  4. Paste it in Infograph and choose your tables

    Open Aiven for PostgreSQL in Infograph, paste the string and press Connect. Pick the tables you want and Infograph starts loading them.

    Allow 51.222.152.247 through your firewall so Infograph can connect.

    Connect

Troubleshooting

Each entry is the message Infograph shows when a connection fails. Open it for the fix.

This host is not reachable from Infograph. Use your database's public address.

The service is in a VPC and you copied its private address. Enable public access, pick the Public access route under Connection information and copy the Service URI again.

We couldn't find that host. Check the host name, then try again.

Copy the Service URI again rather than typing the host. The letter before aivencloud.com varies between services.

The host refused the connection. Check the port, and that your database accepts connections from Infograph's address.

Aiven services use their own port, not 5432. Copy the Service URI again so the port matches.

The server closed the connection. Check that it allows Infograph's address, and whether it requires an encrypted connection.

The server answered, then hung up before Infograph could sign in. Check it allows 51.222.152.247: some hosts close the connection rather than refuse it. If the server accepts only encrypted connections, set SSL Mode to Require under Advanced.

The host did not answer in time. Check the host and port, and that your firewall allows Infograph's address.

If the service has an IP allowlist, add 51.222.152.247 under Service settings, Cloud and network. If it is in a VPC, use the Public access route.

The username or password was not accepted.

Copy the Service URI again from Connection information. Characters such as @, # or / must be percent-encoded, so @ becomes %40.

Those credentials were not accepted.

Copy the Service URI again. If you created a read-only user, check its name and password in the string.

That database does not exist on this server.

The default database is defaultdb. A pool URI names the pool instead, so copy the Service URI.