Skip to main content

Troubleshoot `permission denied for schema` in PostgreSQL exports

Fix a PostgreSQL export that fails because the database user can't use the destination schema.

Problem summary

Your PostgreSQL export can't write to the destination schema because the database user doesn't have permission to use it.

​

Error message or symptoms

The export fails with an error that contains:

​

permission denied for schema

​

When does this occur

  • The Funnel database user doesn't own the schema in the export's Schema name setting and doesn't have USAGE and CREATE on it.

​

Root cause

Funnel needs to use the schema and create tables in it. Without USAGE and CREATE permissions, PostgreSQL blocks the export.

​

Solution

Grant the Funnel database user the access it needs on the schema.

​

Replace funnel with your schema name and funnel_export with your user.

GRANT USAGE, CREATE ON SCHEMA funnel TO funnel_export;

Then run the export again.

Did this answer your question?