I've used the heap_sync() API call to improve performance of CLUSTER by
avoiding WAL when archive_command is not set.
I've refactored the heap_sync() call very slightly, to hide some of the
complexity that was previously exposed to COPY. It now syncs a TOAST
relation automatically if one exists for the table. That also fixes a
latent bug in CREATE TABLE AS SELECT which would have meant that the
TOAST table wasn't properly synced (my bug), effectively caused by the
original API design.
Patch applies cleanly, passes make check.
No user interface changes. Performance docs updated also to reflect this
change and slightly improve directly related wording.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com