dbTalk Databases Forums  

[BUGS] More graceful handling of invalid log_*_stats conf in 7.4

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] More graceful handling of invalid log_*_stats conf in 7.4 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Pitt
 
Posts: n/a

Default [BUGS] More graceful handling of invalid log_*_stats conf in 7.4 - 06-02-2005 , 05:24 AM







--eJnRUKwClWJh1Khz
Content-Type: multipart/mixed; boundary="opJtzjQTFsWo+cga"
Content-Disposition: inline


--opJtzjQTFsWo+cga
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi PostgreSQL developers!

We just experienced a bug that gave us a serious headache until we
found the reason. When doing "psql template1" we got an error message

psql: FATAL: invalid cache id: 30

Evert Meulie found a similar problem at

http://archives.postgresql.org/pgsql...1/msg00237.php

so maybe it's the same bug, since the thread never came to a
conclusion.

I found out that activating

log_parser_stats =3D true
log_planner_stats =3D true
log_executor_stats =3D true
log_statement_stats =3D true

in postgresql.conf leads to this bug (test case attached, adapt the
$BIN variable to your postgresql bin directory and run the script). In
8.0 the server complains about an "invalid value for
log_statement_stats", and the documentation explains that the first
three and the 4th option are mutually exclusive. However, this is not
mentioned in the 7.4 docs. Can this case be handled more gracefully in
7.4? Maybe the check from 8.0 can be ported to 7.4?

Thanks and have a nice day!

Martin

--=20
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntulinux.org
Debian Developer http://www.debian.org

--opJtzjQTFsWo+cga
Content-Type: application/x-sh
Content-Disposition: attachment; filename="psql_bug_cacheid.sh"
Content-Transfer-Encoding: quoted-printable

#!/bin/sh=0A=0ABIN=3D/usr/lib/postgresql/7.4/bin=0ADB=3D/tmp/testdb=0APORT=
=3D9876=0A=0A$BIN/initdb -D $DB=0A=0A# activate logging and start server=0A=
patch $DB/postgresql.conf <<EOF=0A--- /tmp/testdb/postgresql.conf 2005-06-0=
2 11:59:01.000000000 +0200=0A+++ postgresql-cacheidbug.conf 2005-06-02 11:=
54:55.000000000 +0200=0A@@ -185,10 +185,10 @@=0A=0A # - Statistics Monitori=
ng -=0A=0A-#log_parser_stats =3D false=0A-#log_planner_stats =3D false=0A-#=
log_executor_stats =3D false=0A-#log_statement_stats =3D false=0A+log_parse=
r_stats =3D true=0A+log_planner_stats =3D true=0A+log_executor_stats =3D tr=
ue=0A+log_statement_stats =3D true=0A=0A # - Query/Index Statistics Collect=
or -=0A=0AEOF=0A=0A$BIN/postmaster -D $DB -p $PORT -S=0Asleep 3=0A=0A$BIN/p=
sql -l -p $PORT=0A=0A# cleanup=0Akillall postmaster=0Arm -rf $DB=0A
--opJtzjQTFsWo+cga--

--eJnRUKwClWJh1Khz
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnt4LDecnbV4Fd/IRAkhMAJ0cQVpd8r76WvROxQ4C1VWeTa4tPwCfU3TQ
XN0svus1jC/0EZ1YdrntiEk=
=PqZZ
-----END PGP SIGNATURE-----

--eJnRUKwClWJh1Khz--

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] More graceful handling of invalid log_*_stats conf in 7.4 - 06-02-2005 , 10:47 AM






Martin Pitt <martin (AT) piware (DOT) de> writes:
Quote:
I found out that activating

log_parser_stats = true
log_planner_stats = true
log_executor_stats = true
log_statement_stats = true

in postgresql.conf leads to this bug
This is another manifestation of the 7.4 problem with trying to test
superuser-ness at inappropriate times. We eventually gave up on the
entire concept of "USERLIMIT" variables. I don't think there is any
reasonably practical patch to fix it in 7.4, sorry ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #3  
Old   
Martin Pitt
 
Posts: n/a

Default Re: [BUGS] More graceful handling of invalid log_*_stats conf in 7.4 - 06-02-2005 , 04:27 PM




--QTprm0S8XgL7H0Dt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi!

Tom Lane [2005-06-02 11:46 -0400]:
Quote:
Martin Pitt <martin (AT) piware (DOT) de> writes:
I found out that activating
=20
log_parser_stats =3D true
log_planner_stats =3D true
log_executor_stats =3D true
log_statement_stats =3D true
=20
in postgresql.conf leads to this bug
=20
This is another manifestation of the 7.4 problem with trying to test
superuser-ness at inappropriate times. We eventually gave up on the
entire concept of "USERLIMIT" variables. I don't think there is any
reasonably practical patch to fix it in 7.4, sorry ...
Ok. To save other people the headache, I will add such a test to
the Debian/Ubuntu distribution scripts, which has the same effect in
the end and is easy to do.

Thanks and have a nice day,

Martin

--=20
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntulinux.org
Debian Developer http://www.debian.org

--QTprm0S8XgL7H0Dt
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCn3l0DecnbV4Fd/IRApAKAJ9bqVkkfKwEA0szr08vMxWd9Hu6DwCfZVM7
NY+gKSDxkTCuL1jqljgf07g=
=ptNH
-----END PGP SIGNATURE-----

--QTprm0S8XgL7H0Dt--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.