Thread: 7.2.3 -> 7.3.2: timeofday(), server crashed

7.2.3 -> 7.3.2: timeofday(), server crashed

From
"A.Bhuvaneswaran"
Date:
Hi,

In the first place, do we have any document which list the points to be
considered while upgrading to 7.3.2, other than HISTORY and
http://www.ca.postgresql.org/docs/momjian/upgrade_tips_7.3 ?

Since in 7.3.2 the default timestamp is without timezone, the below
command fails:

# CREATE TABLE history_log (history_id text, ctime timestamp default
timeofday());
ERROR:  Column "ctime" is of type timestamp without time zone but default
expression is of type text
        You will need to rewrite or cast the expression

rather, i must try

# CREATE TABLE history_log (history_id text, ctime timestamp default
timeofday()::timestamp);

This is fine.

Further, due to the above reason, while restoring, the server is crashed.
FYI, i have included the server log.

<serverlog>
ERROR:  Relation "history_log" does not exist
ERROR:  parser: parse error at or near "INSERT_FROM_DBLINK_VIEW" at
character 1
LOG:  recycled transaction log file 0000000000000012
LOG:  recycled transaction log file 0000000000000013
LOG:  recycled transaction log file 0000000000000014
LOG:  recycled transaction log file 0000000000000015
LOG:  recycled transaction log file 0000000000000016
ERROR:  parser: parse error at or near "602869" at character 1
LOG:  server process (pid 31373) was terminated by signal 9
LOG:  terminating any other active server processes
LOG:  statistics collector process (pid 31329) was terminated by signal 9
WARNING:  Message from PostgreSQL backend:
        The Postmaster has informed me that some other backend
        died abnormally and possibly corrupted shared memory.
        I have rolled back the current transaction and am
        going to terminate your database system connection and exit.
        Please reconnect to the database system and repeat your query.
LOG:  database system was interrupted at 2003-04-03 16:20:17 IST
</serverlog>

regards,
bhuvaneswaran


Re: 7.2.3 -> 7.3.2: timeofday(), server crashed

From
Tom Lane
Date:
"A.Bhuvaneswaran" <bhuvansql@myrealbox.com> writes:
> Since in 7.3.2 the default timestamp is without timezone, the below
> command fails:

> # CREATE TABLE history_log (history_id text, ctime timestamp default
> timeofday());
> ERROR:  Column "ctime" is of type timestamp without time zone but default
> expression is of type text
>         You will need to rewrite or cast the expression

This is unrelated to the change in the with/without time zone default;
it happens because we have tightened up the rules for implicit casting.

> Further, due to the above reason, while restoring, the server is crashed.

> ERROR:  parser: parse error at or near "602869" at character 1
> LOG:  server process (pid 31373) was terminated by signal 9

This is also unrelated.  There is no scenario in which a parse error
will lead to signal 9.  I would guess that you have one of the versions
of Linux in which the kernel will issue kill -9's against
randomly-selected user processes anytime it starts feeling low on
memory.  Buying more RAM or increasing swap space is the best answer
AFAIK.

            regards, tom lane


Re: 7.2.3 -> 7.3.2: timeofday(), server crashed

From
Will LaShell
Date:
<snip>
> > ERROR:  parser: parse error at or near "602869" at character 1
> > LOG:  server process (pid 31373) was terminated by signal 9
>
> This is also unrelated.  There is no scenario in which a parse error
> will lead to signal 9.  I would guess that you have one of the versions
> of Linux in which the kernel will issue kill -9's against
> randomly-selected user processes anytime it starts feeling low on
> memory.  Buying more RAM or increasing swap space is the best answer
> AFAIK.
>
>             regards, tom lane

As a side note it will show up in /var/log/messages  if the kernel is
doing the killing like Tom suggested.

Sincerely,
Will LaShell


Attachment

Re: 7.2.3 -> 7.3.2: timeofday(), server crashed

From
"A.Bhuvaneswaran"
Date:
> As a side note it will show up in /var/log/messages  if the kernel is
> doing the killing like Tom suggested.

Yes, /var/log/messages stated that it was killed due to out of memory.
Thank you.

regards,
bhuvaneswaran