Bug 124745 - bacula postgres create database script
Bug#: 124745 Product:  Gentoo Linux Version: 2006.0 Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P5
Resolution: FIXED Assigned To: labmonkey@gentoo.org Reported By: aron@aron.nu
Component: Ebuilds
URL: 
Summary: bacula postgres create database script
Keywords:  
Status Whiteboard: 
Opened: 2006-03-02 23:40 0000
Description:   Opened: 2006-03-02 23:40 0000
Only an annoyance really, but

Ebuild states:
 * If this is a new install, you must create the postgresql databases with:
 *  /var/lib/bacula/create_postgresql_database
 *  /var/lib/bacula/grant_postgresql_privileges
 *  /var/lib/bacula/make_postgresql_tables

But if it is entered in that order, the following happens when the second
script is run:
CREATE USER
psql:<stdin>:5: ERROR:  relation "unsavedfiles" does not exist
psql:<stdin>:6: ERROR:  relation "basefiles" does not exist
psql:<stdin>:7: ERROR:  relation "jobmedia" does not exist
psql:<stdin>:8: ERROR:  relation "file" does not exist
psql:<stdin>:9: ERROR:  relation "job" does not exist
psql:<stdin>:10: ERROR:  relation "media" does not exist
psql:<stdin>:11: ERROR:  relation "client" does not exist
psql:<stdin>:12: ERROR:  relation "pool" does not exist
psql:<stdin>:13: ERROR:  relation "fileset" does not exist
psql:<stdin>:14: ERROR:  relation "path" does not exist
psql:<stdin>:15: ERROR:  relation "filename" does not exist
psql:<stdin>:16: ERROR:  relation "counters" does not exist
psql:<stdin>:17: ERROR:  relation "version" does not exist
psql:<stdin>:18: ERROR:  relation "cdimages" does not exist
psql:<stdin>:22: ERROR:  relation "filename_filenameid_seq" does not exist
psql:<stdin>:23: ERROR:  relation "path_pathid_seq" does not exist
psql:<stdin>:24: ERROR:  relation "fileset_filesetid_seq" does not exist
psql:<stdin>:25: ERROR:  relation "pool_poolid_seq" does not exist
psql:<stdin>:26: ERROR:  relation "client_clientid_seq" does not exist
psql:<stdin>:27: ERROR:  relation "media_mediaid_seq" does not exist
psql:<stdin>:28: ERROR:  relation "job_jobid_seq" does not exist
psql:<stdin>:29: ERROR:  relation "file_fileid_seq" does not exist
psql:<stdin>:30: ERROR:  relation "jobmedia_jobmediaid_seq" does not exist
psql:<stdin>:31: ERROR:  relation "basefiles_baseid_seq" does not exist
Privileges for bacula granted.


Suggestion:
List the scripts in the following order:
Ebuild states:
 * If this is a new install, you must create the postgresql databases with:
 *  /var/lib/bacula/create_postgresql_database
 *  /var/lib/bacula/make_postgresql_tables
 *  /var/lib/bacula/grant_postgresql_privileges

------- Comment #1 From Jakub Moc (RETIRED) 2006-03-03 00:06:49 0000 -------
Wrong product, read the descriptions before filing a bug.

------- Comment #2 From Chris Lee (RETIRED) 2006-03-26 16:48:58 0000 -------
Fixed in cvs, thanks for reporting.