PostgreSQL

You can use CARTO with your data in a PostgreSQL-compatible database, including Google Cloud SQL, Amazon Aurora & RDS, and Azure Database for PostgreSQL.

CARTO supports the following PostgreSQL and PostGIS versions:

  • PostgreSQL 12 and higher

  • PostGIS 2.4 and higher

If you want to create a connection to your PostgreSQL server, you need to select the PostgreSQL connector in the New connection dialog. After you select the connector click on the Setup connection button.

These are the parameters you need to provide:

  • Name for your connection: You can register different connections with the PostgreSQL connector. You can use the name to identify the connections.

  • Server: DNS name or IP address for your PostgreSQL server.

  • Username: Name of the user account.

  • Password: Password for the user account.

  • Database: Database your connection will use.

  • Port: TCP port where your server is listening for connections.

Once you have entered the parameters, you can click the Connect button. CARTO will try to connect to your PostgreSQL server. If everything is OK, your new connection will be registered.

CARTO will try to minimize and reuse the number of connections (sockets) made to the Postgres database. But in some cases the amount of connections can grow rapidly. If you have a strong requirement to control the incoming connections to your database, we recommend to put a proxy like PgBouncer between CARTO and your database.

The connections are only reused if they are going through the same CARTO-PostgreSQL Connection. If you set up many Connections in your organization, the amount of database connections will grow faster.

Advanced options

  • Analytics Toolbox location: This setting controls the location of the Analytics Toolbox used in SQL queries generated by Workflows components, Builder SQL Analyses, 'Create Tileset', 'Geocode Table' and 'Enrich Data' functionalities. By default, a carto schema will be used.

  • Data Observatory location: This settings controls the location of the Data Observatory subscriptions. This setting will be observed by Data Explorer, Workflows and Enrichment to access your data subscriptions. By default, a cartoschema will be used.

  • Workflows temp. location: This setting controls the location (database.schema) where Workflows will create temporal tables for each node. By default, it's a workflows_temp schema that will be created in the connection's project during the execution of a workflow. Learn more about it here.

  • Max number of concurrent queries: This setting controls the maximum number of simultaneous queries that CARTO will send to the PostgreSQL database using this connection.

  • Max query timeout: This setting controls the maximum allowed duration of queries that CARTO runs in the PostgreSQL database using this connection.

IP Whitelisting

If you're using the cloud version of CARTO (SaaS), CARTO will connect to PostgreSQL using a set of static IPs for each region. Check this guide to find the IPs you need to allow for your specific region.

Last updated