Jan Wieck JanWieck
Wed Jul 12 11:57:51 PDT 2006
On 7/12/2006 2:06 PM, Christopher Browne wrote:

> Darcy Buskermolen wrote:
>> On Wednesday 12 July 2006 10:01, Rod Taylor wrote:
>>   
>>> On Wed, 2006-07-12 at 12:43 -0400, Jan Wieck wrote:
>>>     
>>>> On 7/11/2006 12:43 PM, Christopher Browne wrote:
>>>>       
>>>>> I have set up tarballs for a first release candidate; Jan should be
>>>>> uploading those soon, and I'll see about updating the web site when
>>>>> they are uploaded...
>>>>>         
>>>> I have run them through a compile and a few tests and uploaded them to
>>>> the usual location at
>>>>
>>>> http://developer.postgresql.org/~wieck/slony1/download/
>>>>
>>>> One thing I wanted to discuss is related to a recent discussion on the
>>>> hackers mailing list with respect to possible btree corruption due to
>>>> xxid not being suitable. With a single origin setup, there is not
>>>>       
>>> How about one partial index per node?
>>>
>>> CREATE INDEX node5_xid_idx ON sl_log_1(log_xid) WHERE log_origin = 5;
>>>
>>> This should give the performance benefits and prevent index rollover
>>> problems.
>>>
>>> Since you rotate sl_log_N structures, it should be possible to slip in
>>> the index creation or destruction when you truncate the sl_log_N
>>> structure.
>>>     
>>
>> This sounds like a valid solution to me,  Anybody else have any thoughts on 
>> this ?
>>   
> It sure sounds like an interesting answer.
> 
> There would presumably be two times when you could safely create the
> indexes without risk of slowing things up...
> 
> 1.  When you do STORE NODE, it is known that sl_log_* will be empty on
> that node.

The CREATE INDEX would still require an exclusive lock over a sequential 
scan ... scrap that.

> 
> 2.  At truncate time, it is known that sl_log_* will be empty.

After TRUNCATE is probably the best time.


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