[Bucardo-general] speeding up bucardo.validate_sync

Ben Chobot bench at silentmedia.com
Tue Jan 12 20:18:12 UTC 2016


Line 821 of Bucardo 4.5.1's validate_sync function reads:

DELETE FROM bucardo.bucardo_delta_targets
 WHERE tablename NOT IN (select oid from pg_class)

Is there some reason why this isn't the much more performant:

DELETE FROM bucardo.bucardo_delta_targets
 WHERE NOT EXISTS (select oid from pg_class where oid=tablename)

?

Especially when setting up a lot of tables to replicate, this can make orders of magnitude of difference.


More information about the Bucardo-general mailing list