Tag PostgreSQL

Avoid constraint errors when running parallel pg_restore

To enhance the restore speed for PostgreSQL databases, the pg_restore command running the most time-consumping steps concurrently by providing the number of jobs with -j/--jobs.

Unfortunately the parallel restore can fail when restoring foreign keys due to not yet restored tables:

pg_restore: error: could not execute query: ERROR:  there is no unique constraint matching given keys for referenced table "page"
Command was: ALTER TABLE ONLY pagecontent
    ADD CONSTRAINT "$1" FOREIGN KEY (page_id) REFERENCES page(id);


read more

Configure Java/JDBC to connect to PostgreSQL with JRE certificate validation

Using the PostgreSQL JDBC driver since 42.2.5, the SSL behaviour changed which can cause FileNotFoundExceptions looking for .postgresql/root.crt.

read more

© 2015 - 2022 Moritz Kobel

Theme by Anders NorenUp ↑