Actually SSD themselves implement COW filesystem since NAND cannot be written without erase step.
Re:PostgreSQL Indexes: First principles
by tominous on Saturday February 27, 2016 @01:44AM
(#11186321)
That's true but not particularly relevant to database performance. As I mentioned, random reads on an SSD do not suffer from a head seek penalty so it doesn't matter how the blocks are allocated. On the other hand with spinning disk there is a huge difference in throughput for large sequential vs small random reads.
Re:PostgreSQL Indexes: First principles
by pmalynin on Saturday February 27, 2016 @01:38AM
(#11186315)
What about TRIM?
TRIM is like the free() equivalent to malloc(). It releases a NAND page back to free state for other uses. It dones't require any NAND access or writes per-se but if persistent TRIM is needed (vs best effort,) it gets much more complicated.
Luckily SSDs have a much lower penalty for random reads compared to spinning disks, so in future this will be less of an issue.
In the meantime all you can do is use a different filesystem, hide the problem with cache, or manually defragment your data files from time to time.