Il 02/05/11 18:20, Simon Riggs ha scritto:
I'm sure Gabriele can add those things as well - that also looks like another 1 line change.
Yes, today we have performed some tests with that patch as well (attached is version 2). The version 2 of the patch (which includes the change Tom suggested on Saturday), smooths the process even more.
You can look at the attached graph for now - even though we are currently relaunching a test with all 3 different versions from scratch (unpatched, patch v1 and patch v2), with larger data in order to confirm this behaviour.
I'm just observing that the patch as-is appears effective and I feel it is important.
Exactly. One thing also important to note as well is that with the vacuum delay being honoured, "vacuum full" operations in a SyncRep scenario take less time as well - as the load is more distributed over time.
You can easily spot in the graphs the point where VACUUM FULL terminates, then it is just a matter of flushing the WAL delay for replication.
Anyway, I hope I can give you more detailed information tomorrow. Thanks. Cheers, Gabriele -- Gabriele Bartolini - 2ndQuadrant Italia PostgreSQL Training, Services and Support [email protected] | www.2ndQuadrant.it
<<attachment: vacuum_full_delay-v2.png>>
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index bcc7d1e..fa3d22f 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -894,7 +894,8 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid
OIDOldIndex,
Buffer buf;
bool isdead;
- CHECK_FOR_INTERRUPTS();
+ /* Launches vacuum delay */
+ vacuum_delay_point();
if (indexScan != NULL)
{
@@ -1012,7 +1013,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid
OIDOldIndex,
HeapTuple tuple;
bool shouldfree;
- CHECK_FOR_INTERRUPTS();
+ vacuum_delay_point();
tuple = tuplesort_getheaptuple(tuplesort, true,
&shouldfree);
if (tuple == NULL)
-- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
