Обсуждение: Re: [PERFORM] rapid degradation after postmaster restart

Поиск
Список
Период
Сортировка

Re: [PERFORM] rapid degradation after postmaster restart

От
Joe Conway
Дата:
[moving to hackers]

Matthew T. O'Connor wrote:
> Good luck, I hope you can get permission.  Would e nice to fix this 
> little crash.

I went ahead and recompiled with --enable-debug, and get this trace:

#0  0xfefb3218 in strlen () from /usr/lib/libc.so.1
#1  0xff006520 in _doprnt () from /usr/lib/libc.so.1
#2  0xff0082e8 in sprintf () from /usr/lib/libc.so.1
#3  0x1213c in print_db_info (dbi=0x28980, print_tbl_list=0)    at pg_autovacuum.c:681
#4  0x120fc in print_db_list (db_list=0x25f80, print_table_lists=0)    at pg_autovacuum.c:673
#5  0x11b44 in init_db_list () at pg_autovacuum.c:416
#6  0x12c58 in main (argc=154384, argv=0xff043a54) at pg_autovacuum.c:1007

Line 681 is this:  sprintf(logbuffer, "dbname: %s Username %s Passwd %s",                      dbi->dbname,
dbi->username,dbi->password);
 

It appears that dbi->password is a null pointer:
(gdb) print dbi->dbname
$1 = 0x25f68 "template1"
(gdb) print dbi->username
$2 = 0x25b20 "dba"
(gdb) print dbi->password
$3 = 0x0

Problem is, since this is a development machine, they have everything 
set to "trust" in pg_hba.conf. I added a "-P foo" to the command line, 
and it starts up fine now.

HTH,

Joe


Re: [PERFORM] rapid degradation after postmaster restart

От
"Matthew T. O'Connor"
Дата:
> [moving to hackers]
>
> Line 681 is this:
>    sprintf(logbuffer, "dbname: %s Username %s Passwd %s",
>                        dbi->dbname, dbi->username, dbi->password);
>
> It appears that dbi->password is a null pointer:
> (gdb) print dbi->dbname
> $1 = 0x25f68 "template1"
> (gdb) print dbi->username
> $2 = 0x25b20 "dba"
> (gdb) print dbi->password
> $3 = 0x0
>
> Problem is, since this is a development machine, they have everything
> set to "trust" in pg_hba.conf. I added a "-P foo" to the command line,
> and it starts up fine now.

Ok, that is about what I figured the problem would be.  I will try to take
a look at this soon and submit a patch.  However since you can work around
it now, can you do another test run with -d2?

Thanks for tracking this down.

Matthew