On 02/21/2018 04:00 AM, Peter Eisentraut wrote: > ... > > Some example measurements: > > 6 GB database, pg_upgrade unpatched 30 seconds, patched 3 seconds (XFS > and APFS) > > similar for a CREATE DATABASE from a large template >
Nice improvement, of course. How does that affect performance on the cloned database? If I understand this correctly, it essentially enables CoW on the files, so what's the overhead on that? It'd be unfortunate to speed up CREATE DATABASE only to get degraded performance later. In any case, I find this interesting mainly for pg_upgrade use case. On running systems I think the main issue with CREATE DATABASE is that it forces a checkpoint. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services