[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slony1-general
Subject:    Re: [Slony1-general] xxid in a where clause
From:       Christopher Browne <cbbrowne () ca ! afilias ! info>
Date:       2006-04-21 22:08:22
Message-ID: 444957D6.2040806 () ca ! afilias ! info
[Download RAW message or body]

Hannu Krosing wrote:
> Ühel kenal päeval, R, 2006-04-21 kell 12:50, kirjutas David Parker:
>   
>> 1.1.5-RC2
>>  
>> I have a single node in which I have a replication environment
>> installed, and a replication set defined, but with no subscribers to
>> the node. As I add data, the sl_log_1 table keeps getting larger. I
>> see messages in the slon log that the cleanup thread is running, but
>> it is not deleting from the log table.
>>  
>> Trying to track this down, I'm extracting sql statements from the
>> cleanup thread code to try running against the database, but I can't
>> seem to get the syntax correct for a SELECT statement with "where
>> log_xid = x" - I get errors about not being able to cast xid to
>> integer, etc.
>>     
>
>
> try: where log_xid = 'x'
>
> usually postgres can input string representation of any type.
>
> --------------
> Hannu
>   
This is a conspicuous exception...

XIDs are a rather peculiar type. 

When it has been proposed to allow them to be coerced semi-automatically
from integers, Tom Lane has tended to weigh in against the idea, and get
what I'd have to characterize as "oddly cranky."

In any case, the problem is MUCH more simply resolved by deleting
elderly events from sl_event, which does not require any manipulations
of XIDs, thereby making it unnecessary to solve the "XID casting problem."

In effect, you don't need to risk Tom's ire; do things the easy way
instead :-).  And those times that Tom thinks things are Just Wrong,
those tend to be times when further examination bears that out.  His
instincts seem pretty good :-).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic