Csaba Nagy nagy
Mon Jul 17 08:02:52 PDT 2006
> This is still probably *somewhat* susceptible to race conditions, but
> it seems to be a "safening action" to me...

Wouldn't it be feasible to use a form of "LOCK ... NOWAIT" to lock first
the truncated tables in the proper mode, and then only truncate if the
lock succeeded, otherwise issue the warning ? That would probably
eliminate the race condition. 

OTOH this would only work for postgres 8.x and newer.

Cheers,
Csaba.





More information about the Slony1-general mailing list