Christopher Browne cbbrowne at ca.afilias.info
Thu Sep 27 07:42:41 PDT 2007
Maxime Henrion wrote:
> Replying to myself:
>
> We've noticed that Slony-1 locks the tables in access exclusive mode
> when handling an EXECUTE SCRIPT command, thus preventing anyone from
> reading the tables.  I can't figure out why a simple exclusive lock
> wouldn't be sufficient; can someone enlighten me?
>   
Very simple: Because it must.

All of the tables are altered, twice:
 - once, to remove the Slony-created triggers, and restore the table to 
a "Slony-less form"
 - a second time, to add the triggers back, and return it to replication.

ALTER TABLE requires an AccessExclusiveLock to be requested, twice, as 
the natural result.


More information about the Slony1-hackers mailing list