Casey Duncan casey
Wed Oct 4 16:43:52 PDT 2006
On Oct 4, 2006, at 2:06 PM, Christopher Browne wrote:

> Casey Duncan wrote:
>> [..]
>> AFAICS, this is where the 'delete from "_radio".sl_setsync_offline
>> where ssy_setid= 9999;' query is generated. It looks like it should
>> just be written to the archive file, but from what I can tell it is
>> trying to execute the query on the secondary as well.
>>
>> Perhaps this has been addressed in 1.2, though it's not really an
>> option for me to upgrade to that within the release schedule we're
>> under. Any suggestions for a workaround or an obvious error on my
>> part? Seems like I could temporarily run slon without -a, but then
>> the log shipping secondaries won't get updated properly.
>>
> The code looks different in 1.2, due to more paranoid error checking
> being added in.
>
> I'm not sure that it actually changes the shape of things.
>
> It looks like the query in query1 is getting re-submitted later in the
> event loop.
>
> You might try dropping the following line in at the end of that if
> (archive_dir) section...
>
>     dstring_reset(&query1);
> [e.g. - right after the submit_query_to_archive() call]

That seems to have done the trick, thanks!

FWIW looking at that massive if/else if statement, I wouldn't be  
surprised if variants of this same bug are still lurking there. A  
simple thing that could be done to prevent that might be to use a  
different buffer for queries to be written to the archive file only.  
As it is it seems pretty easy for queries to "escape" and get  
executed when they shouldn't.

-Casey




More information about the Slony1-general mailing list