Reading ./localconfig...
Checking for DBD-Pg (v1.45) ok: found v2.17.1
Checking for PostgreSQL (v8.00.0000) ok: found v09.00.0000
Creating database bugs...
Adding new table bz_schema ...
Initializing the new Schema storage...
Table already exists: bz_schema at Bugzilla/DB/Schema.pm line 2435.
If I connect to the database I see that it indeed created the table:
List of relations
Schema | Name | Type | Owner
--------+-----------+-------+-------
public | bz_schema | table | bugs
Looking at that file it dies if bz_schema exists.
sub add_table {
my ($self, $name, $definition) = @_;
(die "Table already exists: $name")
if exists $self->{abstract_schema}->{$name};
I thought maybe the database had some junk in it so I dropped it and I
get the same problem every time.
If I try and run again i get separate errors, only pasting one here:
Creating function array_accum...
Removing index 'bugs_fulltext_comments_idx' from the bugs_fulltext
table...
Failed SQL: [DROP INDEX bugs_fulltext_comments_idx] Error: DBD::Pg::db
do failed: ERROR: index "bugs_fulltext_comments_idx" does not exist
at Bugzilla/DB.pm line 835
eval {...} called at Bugzilla/DB.pm line 835
Bugzilla::DB::bz_drop_index_raw('Bugzilla::DB::Pg=HASH(0x11503a80)',
'bugs_fulltext', 'bugs_fulltext_comments_idx') called at Bugzilla/
DB.pm line 804
Bugzilla::DB::bz_drop_index('Bugzilla::DB::Pg=HASH(0x11503a80)',
'bugs_fulltext', 'bugs_fulltext_comments_idx') called at Bugzilla/DB/
Pg.pm line 229
Bugzilla::DB::Pg::bz_setup_database('Bugzilla::DB::Pg=HASH(0x11503a80)')
called at ./checksetup.pl line 147
If I look at the db now I still see the bz_schema
Schema | Name | Type | Owner
--------+-----------+-------+-------
public | bz_schema | table | bugs
If anyone has a clue as to what is going wrong I would appreciate
it .
Thanks,
Neven
Ah, we've never tested with Pg 9. It's very likely that there is some
problem there. Would you file a bug?
-Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla and Perl Services. Everything Else, too.
K will do.
I looked into the first problem some more, seems there is discrepancy
as to what is put in db and what is read back, in terms of
formatting.
When the schema is first stored, it is a string generated by Dumper
serialization.
$VAR1 = {};
When it is read back it is in hex format:
x2456415231203d207b7d3b0a
If I dump the db i get:
ALTER TABLE public.bz_schema OWNER TO bugs;
--
-- Data for Name: bz_schema; Type: TABLE DATA; Schema: public; Owner:
bugs
--
COPY bz_schema (schema_data, version) FROM stdin;
\\x2456415231203d207b7d3b0a 2.00
\.
Could this be a DBG:Pg problem? Bugzilla is using BLOB_TYPE as format
but not sure why its not reading it back as a string.
Im not sure what this is supposed to look like in older PG versions.
~Neven
Also after many hours I finally managed to fix this this issue with PG
9.0, by changing one parameter in the db setup:
In file: postgresql.conf , I specifically set bytea output to espace.
The default value is 9.0 is hex, which is why the data read back was a
hex string and not an excaped string as what Bugzilla was expecting.
bytea_output = 'escape' # hex, escape
Hope this helps someone out there using the latest PG.
~Neven