Re: file cloning in pg_upgrade and CREATE DATABASE - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: file cloning in pg_upgrade and CREATE DATABASE
Date
Msg-id 9a3df7ee-6bc1-2ba6-7253-134e5bb9a943@2ndquadrant.com
Whole thread Raw
In response to Re: file cloning in pg_upgrade and CREATE DATABASE  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On 2/21/18 18:57, Tomas Vondra wrote:
> 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.

I ran a little test (on APFS and XFS): Create a large (unlogged) table,
copy the database, then delete everything from the table in the copy.
That should need to CoW all the blocks.  It has about the same
performance with cloning, possibly slightly faster.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Hash Joins vs. Bloom Filters / take 2
Next
From: Tatsuo Ishii
Date:
Subject: Re: Translations contributions urgently needed