Re: [BUGS] BUG #1148: server restarts depending on stats options

Lists: pgsql-bugspgsql-patches
From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1148: server restarts depending on stats options
Date: 2004-05-06 21:10:04
Message-ID: 20040506211004.13C78CF5427@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches


The following bug has been logged online:

Bug reference: 1148
Logged by: Robert Treat

Email address: xzilla(at)users(dot)sourceforge(dot)net

PostgreSQL version: 7.5 Dev

Operating system: Slackware Linux 8.1 (Kernel 2.4.18)

Description: server restarts depending on stats options

Details:

set log_statement_stats = true and any of
log_(executer|planner|parser)_stats = true and you will get a database
restart when attempting to connect.

from my logs:

postgres(at)phppgadmin:/usr/local/pgsql-7.5dev$ cat data/logfile
LOG: received smart shutdown request
LOG: shutting down
LOG: database system is shut down
LOG: database system was shut down at 2004-05-06 12:59:01 PDT
LOG: checkpoint record is at 0/9DDC68
LOG: redo record is at 0/9DDC68; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 460; next OID: 17207
LOG: database system is ready
WARNING: statement-level statistics are disabled because parser, planner,
or executor statistics are on
TRAP: BadState("!(((bool) ((CurrentUserId) != 0)))", File: "miscinit.c",
Line: 252)
LOG: server process (PID 22690) was terminated by signal 6
LOG: terminating any other active server processes
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the
current transaction and exit, because another server process exited
abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and
repeat your command.
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted at 2004-05-06 12:59:02 PDT
LOG: checkpoint record is at 0/9DDC68
LOG: redo record is at 0/9DDC68; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 460; next OID: 17207
LOG: database system was not properly shut down; automatic recovery in
progress
LOG: record with zero length at 0/9DDCA8
LOG: redo is not required
LOG: database system is ready

this is from a snapshot build on may 5th


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1148: server restarts depending on stats options
Date: 2004-05-06 22:10:21
Message-ID: 200405062210.i46MALJ11697@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches


Yes, I am aware of this error and will fix it in a few days.

---------------------------------------------------------------------------

PostgreSQL Bugs List wrote:
>
> The following bug has been logged online:
>
> Bug reference: 1148
> Logged by: Robert Treat
>
> Email address: xzilla(at)users(dot)sourceforge(dot)net
>
> PostgreSQL version: 7.5 Dev
>
> Operating system: Slackware Linux 8.1 (Kernel 2.4.18)
>
> Description: server restarts depending on stats options
>
> Details:
>
> set log_statement_stats = true and any of
> log_(executer|planner|parser)_stats = true and you will get a database
> restart when attempting to connect.
>
> from my logs:
>
> postgres(at)phppgadmin:/usr/local/pgsql-7.5dev$ cat data/logfile
> LOG: received smart shutdown request
> LOG: shutting down
> LOG: database system is shut down
> LOG: database system was shut down at 2004-05-06 12:59:01 PDT
> LOG: checkpoint record is at 0/9DDC68
> LOG: redo record is at 0/9DDC68; undo record is at 0/0; shutdown TRUE
> LOG: next transaction ID: 460; next OID: 17207
> LOG: database system is ready
> WARNING: statement-level statistics are disabled because parser, planner,
> or executor statistics are on
> TRAP: BadState("!(((bool) ((CurrentUserId) != 0)))", File: "miscinit.c",
> Line: 252)
> LOG: server process (PID 22690) was terminated by signal 6
> LOG: terminating any other active server processes
> WARNING: terminating connection because of crash of another server process
> DETAIL: The postmaster has commanded this server process to roll back the
> current transaction and exit, because another server process exited
> abnormally and possibly corrupted shared memory.
> HINT: In a moment you should be able to reconnect to the database and
> repeat your command.
> LOG: all server processes terminated; reinitializing
> LOG: database system was interrupted at 2004-05-06 12:59:02 PDT
> LOG: checkpoint record is at 0/9DDC68
> LOG: redo record is at 0/9DDC68; undo record is at 0/0; shutdown TRUE
> LOG: next transaction ID: 460; next OID: 17207
> LOG: database system was not properly shut down; automatic recovery in
> progress
> LOG: record with zero length at 0/9DDCA8
> LOG: redo is not required
> LOG: database system is ready
>
>
> this is from a snapshot build on may 5th
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #1148: server restarts depending on stats options
Date: 2004-05-07 01:33:19
Message-ID: 200405070133.i471XJu02046@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches


I have applied the attached patch to fix this problem. Sample output
is:

test=> set log_statement_stats = true;
SET
test=> set log_parser_stats = true;
ERROR: Can not enable parameter when "log_statement_stats" is true.
test=> begin;
BEGIN
test=> set log_statement_stats = false;
SET
test=> set log_parser_stats = true;
SET
test=> commit;
COMMIT
test=> set log_statement_stats = true;
ERROR: Can not enable "log_statement_stats" when "log_parser_stats",
"log_planner_stats", or "log_executor_stats" is true.

And setting postgresql.conf with conflicting options puts this in the
server logs:

FATAL: Can not enable "log_statement_stats" when "log_parser_stats",
"log_planner_stats", or "log_executor_stats" is true.

---------------------------------------------------------------------------

PostgreSQL Bugs List wrote:
>
> The following bug has been logged online:
>
> Bug reference: 1148
> Logged by: Robert Treat
>
> Email address: xzilla(at)users(dot)sourceforge(dot)net
>
> PostgreSQL version: 7.5 Dev
>
> Operating system: Slackware Linux 8.1 (Kernel 2.4.18)
>
> Description: server restarts depending on stats options
>
> Details:
>
> set log_statement_stats = true and any of
> log_(executer|planner|parser)_stats = true and you will get a database
> restart when attempting to connect.
>
> from my logs:
>
> postgres(at)phppgadmin:/usr/local/pgsql-7.5dev$ cat data/logfile
> LOG: received smart shutdown request
> LOG: shutting down
> LOG: database system is shut down
> LOG: database system was shut down at 2004-05-06 12:59:01 PDT
> LOG: checkpoint record is at 0/9DDC68
> LOG: redo record is at 0/9DDC68; undo record is at 0/0; shutdown TRUE
> LOG: next transaction ID: 460; next OID: 17207
> LOG: database system is ready
> WARNING: statement-level statistics are disabled because parser, planner,
> or executor statistics are on
> TRAP: BadState("!(((bool) ((CurrentUserId) != 0)))", File: "miscinit.c",
> Line: 252)
> LOG: server process (PID 22690) was terminated by signal 6
> LOG: terminating any other active server processes
> WARNING: terminating connection because of crash of another server process
> DETAIL: The postmaster has commanded this server process to roll back the
> current transaction and exit, because another server process exited
> abnormally and possibly corrupted shared memory.
> HINT: In a moment you should be able to reconnect to the database and
> repeat your command.
> LOG: all server processes terminated; reinitializing
> LOG: database system was interrupted at 2004-05-06 12:59:02 PDT
> LOG: checkpoint record is at 0/9DDC68
> LOG: redo record is at 0/9DDC68; undo record is at 0/0; shutdown TRUE
> LOG: next transaction ID: 460; next OID: 17207
> LOG: database system was not properly shut down; automatic recovery in
> progress
> LOG: record with zero length at 0/9DDCA8
> LOG: redo is not required
> LOG: database system is ready
>
>
> this is from a snapshot build on may 5th
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 3.0 KB

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #1148: server restarts depending on stats options
Date: 2004-05-07 20:32:50
Message-ID: 200405072232.50941.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Bruce Momjian wrote:
> I have applied the attached patch to fix this problem. Sample output
> is:
>
> test=> set log_statement_stats = true;
> SET
> test=> set log_parser_stats = true;
> ERROR: Can not enable parameter when "log_statement_stats" is true.

According to message style guide (and English dictionary):

ERROR: cannot ... is true


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #1148: server restarts depending on stats options
Date: 2004-05-08 02:07:42
Message-ID: 200405080207.i4827gq05396@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > I have applied the attached patch to fix this problem. Sample output
> > is:
> >
> > test=> set log_statement_stats = true;
> > SET
> > test=> set log_parser_stats = true;
> > ERROR: Can not enable parameter when "log_statement_stats" is true.
>
> According to message style guide (and English dictionary):
>
> ERROR: cannot ... is true

Thanks:

errmsg("cannot enable parameter when \"log_statement_stats\" is true.")));
errmsg("cannot enable \"log_statement_stats\" when \"log_parser_stats\",\n"
"\"log_planner_stats\", or \"log_executor_stats\" is true.")));

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #1148: server restarts depending on stats options
Date: 2004-05-08 02:54:35
Message-ID: 20646.1083984875@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Thanks:

> errmsg("cannot enable parameter when \"log_statement_stats\" is true.")));
> errmsg("cannot enable \"log_statement_stats\" when \"log_parser_stats\",\n"
> "\"log_planner_stats\", or \"log_executor_stats\" is true.")));

Still not right: no trailing period on errmsg() strings.

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #1148: server restarts depending on stats options
Date: 2004-05-08 03:00:35
Message-ID: 200405080300.i4830ZK07694@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Thanks:
>
> > errmsg("cannot enable parameter when \"log_statement_stats\" is true.")));
> > errmsg("cannot enable \"log_statement_stats\" when \"log_parser_stats\",\n"
> > "\"log_planner_stats\", or \"log_executor_stats\" is true.")));
>
> Still not right: no trailing period on errmsg() strings.

Yea, found that after posting. Fixed another problem one in guc.c.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073