Postgresapp: Horrible CREATE DATABASE Performance in High Sierra

Created on 30 Sep 2017  路  7Comments  路  Source: PostgresApp/PostgresApp

I just recently "upgraded" to High Sierra and experiencing horrendous CREATE DATABASE performance. Creating a database from a 3G template DB used to take ~1m but post-upgrade is taking ~22m at a sustained write of around 4MB/s. Occasionally, attempting to create an empty database hangs indefinitely as well. When this happens, restarting the Postgres server allows empty database initialization in ~1s.

I'm running on an encrypted APFS volume, but am currently decrypting it to determine if it's somehow related. Previous Sierra volume was HFS+ encrypted.

A multi-threaded pg_restore seems to sustain writes of ~38M/s and completes in about the same time as pre-upgrade (Sierra), so I'm not sure it's entirely related to APFS / disk IO.

I've completely rebuilt the Postgres data directory, re-installed Postgres.app (2.0.5) etc. I don't have any reasonable explanation for what could have broken so catastrophically.

Has anyone else experienced this issue or have any insight as to what could be happening?

Most helpful comment

This is apparently a major regression and is trackable on this thread - https://www.postgresql.org/message-id/flat/13746.1506974083%40sss.pgh.pa.us#13746.1506974083@sss.pgh.pa.us

All 7 comments

Dropping encryption (FileVault) has dropped the total task time to ~15m which is still a far cry from the ~1m it used to take.

FWIW, I'm seeing this as well after upgrading to High Sierra. Unencrypted APFS.

The specific command I'm running is createdb -T <existing database> <copied database name>. Prior to upgrade, it took 1-2 minutes; now, at least 15 minutes.

Thanks for reporting this! It would probably be best to report this issue to the hackers mailing list:
[email protected] -- that's where people who can most likely help you hang out.

Will do, thanks Jakob!

Reported and awaiting any feedback. Thanks @jakob .

This is apparently a major regression and is trackable on this thread - https://www.postgresql.org/message-id/flat/13746.1506974083%40sss.pgh.pa.us#13746.1506974083@sss.pgh.pa.us

This is fixed with the latest release bundling 10.1 !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoeFryer picture JoeFryer  路  6Comments

chrispysoft picture chrispysoft  路  9Comments

klouie93 picture klouie93  路  11Comments

songproducer picture songproducer  路  10Comments

Kontributer picture Kontributer  路  10Comments