Issue with schema only backup

I’ve created a schema only backup on a database and I’m trying to restore this backup to create a new empty database and the creation is failing. The create database command is:

CREATE DATABASE mydbname WITH TEMPLATE = template0 ENCODING = ‘UTF8’ LOCALE = ‘English_United States.1252’;

The error is:
ERROR: option “locale” not recognized
LINE 1: …name WITH TEMPLATE = template0 ENCODING = ‘UTF8’ LOCALE = '…
^
We are running postgreSQL 12.3. Is there a way to fix this so the generated script doesn’t include LOCALE which doesn’t appear to exist in postgreSQL 12?

Looking at the backup log it indicates pg_dump version 13.4 is being used. Can this be changed to the matching pg_dump version for the server?

image

Hi darryl_schmidt,

Thank you for the details.

Yes, you can specify the path to your PostgreSQL bin folder at the advanced connection settings.

If you have any other questions, please let us know.

Thank you!

Alexander,
Thanks, that fixed my issue!

Hi darryl_schmidt,

That’s great! Please feel free to contact us on any issues or concerns.