Re: [Bacula-users] mysql- postgres conversion. Problems...

2010-03-29 Thread Alan Brown
On Fri, 26 Mar 2010, Matija Nalis wrote:

 have you perhaps succeded in transition from MySQL to PostgreSQL for
 bacula ?

Eventually...

 An update to the documentation (or your explanation about problems
 and what you did) would be greately appreciated, as we're also being
 pinned down with extreme MySQL slowdowns in 5.0.x (bacula bug 1472)
 and must move to PostgreSQL without losing catalog data (or die
 trying, which I'd like to avoid if at all possible :)

The single biggest problem is that mysql's compatible dumps contain 
characters, which cause an exact match in postgres on inserts. The way to
fix that is  perl -pi.bak s/\/\'/g 

I spent a lot of time and effort case smashing the inserts, but changing
the character works better.

The other thing you need to do is tune postgres. There are a couple of
perversities - #1 is that if vaccuum is slow, you need to run it more
often and #2 is that if you assign too much memory to the engine it can
die on lack of memory errors for large inserts as it won't try to use
system ram.

AB




--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mysql- postgres conversion. Problems...

2010-03-26 Thread Matija Nalis

On Sun, Mar 21, 2010 at 10:20:22PM +, Alan Brown wrote:
 On 21/03/10 20:43, Bruno Friedmann wrote:
  After moving your data from mysql to postgresql, it's important to adjust 
  the pkey index to the correct values
  (last of the table)
  Check for each table of the db.
 
  If I remember correctly this is noted in the manual or the wiki.
 
 It's not, but I've found how to fix it. The steps given in both 
 documents are deficient and I'll submit updates when done.

Hi Alan, 

have you perhaps succeded in transition from MySQL to PostgreSQL for
bacula ? 

An update to the documentation (or your explanation about problems
and what you did) would be greately appreciated, as we're also being
pinned down with extreme MySQL slowdowns in 5.0.x (bacula bug 1472)
and must move to PostgreSQL without losing catalog data (or die
trying, which I'd like to avoid if at all possible :)


-- 
Matija Nalis
Odjel racunalno-informacijskih sustava i servisa
  
Hrvatska akademska i istrazivacka mreza - CARNet 
Josipa Marohnica 5, 1 Zagreb
tel. +385 1 6661 616, fax. +385 1 6661 766
www.CARNet.hr

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mysql- postgres conversion. Problems...

2010-03-21 Thread Bruno Friedmann
On 03/19/2010 06:53 PM, Alan Brown wrote:
 bacula 5.0.1, postgres 8.1
 
 Any ideas why I'm getting this?
 
 9-Mar 17:47 msslay-dir JobId 6: Fatal error: sql_create.c:875 Fill 
 Filename table Query failed: INSERT INTO Filename (Name) SELECT a.Name 
 FROM (SELECT DISTINCT Name FROM batch) as a WHERE NOT EXISTS (SELECT 
 Name FROM Filename WHERE Name = a.Name): ERR=ERROR:  duplicate key 
 violates unique constraint filename_pkey
 
 Dan?
 
 
After moving your data from mysql to postgresql, it's important to adjust the 
pkey index to the correct values
(last of the table)
Check for each table of the db.

If I remember correctly this is noted in the manual or the wiki.


-- 

 Bruno Friedmann

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mysql- postgres conversion. Problems...

2010-03-21 Thread Alan Brown
On 21/03/10 20:43, Bruno Friedmann wrote:
 On 03/19/2010 06:53 PM, Alan Brown wrote:

 bacula 5.0.1, postgres 8.1

 Any ideas why I'm getting this?

 9-Mar 17:47 msslay-dir JobId 6: Fatal error: sql_create.c:875 Fill
 Filename table Query failed: INSERT INTO Filename (Name) SELECT a.Name
 FROM (SELECT DISTINCT Name FROM batch) as a WHERE NOT EXISTS (SELECT
 Name FROM Filename WHERE Name = a.Name): ERR=ERROR:  duplicate key
 violates unique constraint filename_pkey

 Dan?


  
 After moving your data from mysql to postgresql, it's important to adjust the 
 pkey index to the correct values
 (last of the table)
 Check for each table of the db.

 If I remember correctly this is noted in the manual or the wiki.




It's not, but I've found how to fix it. The steps given in both 
documents are deficient and I'll submit updates when done.





--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users