Jan Wieck JanWieck
Fri Jun 9 14:25:56 PDT 2006
On 6/6/2006 12:17 PM, Jim C. Nasby wrote:
> On Tue, Jun 06, 2006 at 11:58:48AM -0400, Rod Taylor wrote:
>> On Tue, 2006-06-06 at 10:25 -0500, Jim C. Nasby wrote:
>> > On Wed, May 31, 2006 at 10:01:26AM -0400, Rod Taylor wrote:
>> > > I've been thinking of the initial COPY process.
>> > > 
>> > > The problem is that with a large amount of data you end up with a very
>> > > large transaction on the data provider. The transaction on the
>> > > subscriber isn't as important since it will normally be an otherwise
>> > > idle database.
>> > > 
>> > > COPY in is one part, but building indexes on the subscriber is the
>> > > painful part and during much of this process the data provider has an
>> > > idle connection.
>> >  
>> > Pardon my ignorance, but is the provider actually sitting in a
>> > transaction while the subscriber is building indexes, and if so, why?
>> > ISTM there's no reason you'd need indexes (or RI for that matter) while
>> > loading data into a subscriber.
>> 
>> Yes it does. Indexes are mostly disabled during the copy itself then a
>> second pass is made after the COPY to re-enable indexes and rebuild
>> them. The provider is in a transaction for the same duration as the
>> subscriber.
> 
> Why does re-enabling the indexes have to happen in the same provider
> transaction?

It doesn't. It is implemented that way at the moment.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #



More information about the Slony1-general mailing list