Scott Marlowe smarlowe
Mon Mar 20 11:33:58 PST 2006
On Mon, 2006-03-20 at 13:15, Christopher Browne wrote:
> Miguel wrote:
> 
> > Christopher Browne wrote:
> >
> >> Miguel wrote:
> >>
> >>  
> >>
> >>> does slony need exclusive lock for this initial transfer?
> >>>
> >>>
> >>>   
> >>
> >> It will ultimately need exclusive locks on the subscriber in order to
> >> complete the copy, as it will be modifying the table schemas a bit.
> >>
> >>  
> >>
> > I dont mind exclusive lock on the subscribers,  but the master node is
> > my production machine,  i cant  stop  the applications during the
> > initial transfer.
> > Reading the docs , in section 10 Locking Issues, you can read
> >
> > Unfortunately, there are several sorts of Slony-I events that do
> > require exclusive locks on PostgreSQL tables, with the result that
> > modifying Slony-I configuration can bring back some of those "locking
> > irritations." In particular:
> >
> > [...]
> > * During the COPY_SET event on a new subscriber
> > In a sense, this is the least provocative scenario, since, before the
> > replication set has been populated, it is pretty reasonable to say
> > that the node is "unusable" and that Slony-I could reasonably demand
> > exclusive access to the node.
> > [...]
> >
> > I understand that during the initial transfer, the cluster is unusable
> > by the applications, is this asumption correct?
> >
> No, happily you are incorrect about that.
> 
> The *subscriber* is either partly or entirely locked up (there are some
> variations based on time and what version of Slony-I you are running).
> 
> But the *provider* doesn't involve those locks.
> 
> On the origin, there is a brief table lock required when SET ADD TABLE
> is run; that action modifies the table to add the logtrigger trigger and
> stored procedure.  But that is just a very brief lock, once,
> independently, for each table.  That shouldn't destroy the usability of
> the "master node."

In my usage, all I've seen on the subscribers is that there's no data
there until the set finishes syncing up.  There's no problem accessing
the empty tables, just nothing to see there.



More information about the Slony1-general mailing list