Jan Wieck JanWieck
Sun Dec 17 19:30:06 PST 2006
On 12/13/2006 12:31 PM, Andrew Sullivan wrote:
> On Wed, Dec 13, 2006 at 06:06:34PM +0100, hubert depesz lubaczewski wrote:
>> i also dont mean any harm or insult to anybody here - if you find the topic
>> offensive, please just skip it. i'm asking out of pure curiosite - why it
>> works, and what (how) might break.
> 
> And what I keep saying is that it's _already broken_.  I'm not taking
> it personally (people who know me can probably confirm that there are
> very few things I take personally).

What it actually does is to use the current system catalog idea of the 
tables columns. That is "why it seems to work".

The problem is that from the moment there are more columns than the 
trigger knows about, update and delete statements let the trigger access 
the attkind (that funny 'kvvvvvv' string) info past its end. Meaning, 
the check if to include that column into the WHERE clause of the 
replication update/delete is done against random bytes on the stack. If 
one of them happens to be a 'k', the trigger will attempt to add it and 
its value to the where clause and if that value happens to be a NULL 
your transaction will go kaput.

Andrew is right, I actually didn't add that check. But this whole 
discussion makes me think about adding it again ...


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