On 7 Sep 2007 at 11:22, Martin Simmons wrote:

> >>>>> On Thu, 06 Sep 2007 20:09:15 -0400, Dan Langille said:
> > Priority: normal
> >     <[EMAIL PROTECTED]>,
> >     <[EMAIL PROTECTED]>
> > Content-description: Mail message body
> > 
> > On 6 Sep 2007 at 18:00, Scott Barninger wrote:
> > 
> > > On Thu, 2007-09-06 at 17:49 -0400, Dan Langille wrote:
> > > > > >
> > > > > > Yeah, I saw that after posting this. Question is, should I withdraw 
> > > > > > the
> > > > > > 2.2.1 EL3 mysql package from sourceforge? And long term, do I need 
> > > > > > to
> > > > > > stop support for EL3 since it also had the postgresql problem?
> > > > > 
> > > > > Can you remind me what the PostgreSQL problem is?
> > > > 
> > > > I think Scott refers to our upcoming use of PQescapeStringCon() which 
> > > > is available only in PostgreSQL > 7.4
> > > > 
> > > > > I think it is a very bad thing to move Bacula forward so fast that we
> > > > > start dropping somewhat older systems.  So, I would really like to see
> > > > > the details of what is going wrong and try to come up with some work
> > > > > arounds. 
> > > > 
> > > > 
> > > > 
> > > I refer to what I wrote after building the 2.2.1 packages, that on rhel3
> > > the postgresql package fails to compile. You indicated I think that this
> > > was an issue with older postgresql versions?
> > 
> > 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 */

That looks very similar to a patch I tried last night.  

   http://www.langille.org/tmp/batch.diff

Ignore the db_escape_string() alteration; that is for the quoting 
changes, also in my working copy.

It passed all regression tests overnight, with --disable-batch-insert 
invoked.  After double checking my regressiong test config, I'm 
rerunning the tests again now.

-- 
Dan Langille - http://www.langille.org/
Available for hire: http://www.freebsddiary.org/dan_langille.php



-------------------------------------------------------------------------
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