Yes, in looking over the code.  It does appear that we just missed one set of 
subroutines in PostgreSQL that should have been turned off as Martin has 
indicated.

I do believe that this patch is very likely to fix the problem.  I have just 
made it in the trunk (not yet committed) and will also make it in the Branch.  

It would be really nice if someone could test.  Perhaps Scott can try again.  
I'll indicate when the patch is in the Branch.  I would like to free up my 
time for working on the open bugs, some of which appear pretty serious, but 
require a lot of effort to try to duplicate ...

Regards,

Kern

On Friday 07 September 2007 14:00, BOLLENGIER Eric wrote:
> > > > > Ahh, related to PQputCopyData?
> > > >
> > > > Maybe a patch like this would help?  I.e. only compile the postgresql
> > > > batch code when enabled.
> > > >
> > > >
> > > > Index: src/cats/postgresql.c
> > > > ===================================================================
> > > > --- src/cats/postgresql.c       (revision 5487)
> > > > +++ src/cats/postgresql.c       (working copy)
> > > > @@ -596,6 +596,8 @@
> > > >     return id;
> > > >  }
> > > >
> > > > +#ifdef HAVE_BATCH_FILE_INSERT
> > > > +
> > > >  int my_postgresql_batch_start(JCR *jcr, B_DB *mdb)
> > > >  {
> > > >     char *query = "COPY batch FROM STDIN";
> > > > @@ -799,4 +801,6 @@
> > > >                                          "    (SELECT DISTINCT Name
> > > > FROM batch) as a " "    WHERE NOT EXISTS               " "     
> > > > (SELECT Name FROM Filename WHERE Name = a.Name)"; +#endif /*
> > > > HAVE_BATCH_FILE_INSERT */ +
> > > >  #endif /* HAVE_POSTGRESQL */
> > >
> > > Hmmm. I missed that and had assumed that the code was not compiled if
> > > it was disabled.  I think you have found the key problem in getting
> > > this to be backward compatible.
>
> I think it's possible that it fixes the problem. If i'm remember well, not
> all batch code is protected by ifdef/endif.
>
> I will fix this.
>
> > > What about MySQL?
> >
> > Sorry, I don't have MySQL, but I would guess that the same thing could
> > can be in mysql.c.  I'm not sure that will solve the problem being
> > reported there though, because the code doesn't call any batch-specific
> > MySQL APIs, just SQL statements.
>
> It's true. It seems that old version of mysql doesn't support batch
> specific SQL queries. I can update the manual.
>
> => Old mysql have to use --disable-batch-mode
>
> > > What about functions that may call the code from elsewhere in bacula?
> >
> > I guess they are all conditionalized with HAVE_BATCH_FILE_INSERT already,
> > otherwise it would have failed to link.
>
> I'm ok too
>
> Bye
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> Bacula-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to