Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Weird problem running checksetup on 3.6.2 with Pg 9.0.2

121 views
Skip to first unread message

nkl...@gmail.com

unread,
Oct 8, 2010, 8:30:13 PM10/8/10
to
Hi I am seeing a weird problem when running checksetup for the first
time after I have edited the localconfig file with the correct
paramaters to connect to the datbase.

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


Max Kanat-Alexander

unread,
Oct 9, 2010, 1:41:57 AM10/9/10
to support-...@lists.mozilla.org
On 10/08/2010 05:30 PM, NKl...@gmail.com wrote:
> Checking for PostgreSQL (v8.00.0000) ok: found v09.00.0000

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.

nkl...@gmail.com

unread,
Oct 9, 2010, 5:24:25 PM10/9/10
to
On Oct 8, 10:41 pm, Max Kanat-Alexander <mka...@bugzilla.org> wrote:

> On 10/08/2010 05:30 PM, NKla...@gmail.com wrote:
>
> > Checking for      PostgreSQL (v8.00.0000) ok: found v09.00.0000
>
>         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

nkl...@gmail.com

unread,
Oct 9, 2010, 8:43:50 PM10/9/10
to
Update on this thread, I created the bug here:
https://bugzilla.mozilla.org/show_bug.cgi?id=603127

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

0 new messages