Re: [GENERAL] More details on Database corruption

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: g(dot)kousi(at)albourne(dot)com (George Kousi)
Cc: hackers(at)postgreSQL(dot)org (PostgreSQL-development), lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Subject: Re: [GENERAL] More details on Database corruption
Date: 1998-08-22 12:29:45
Message-ID: 199808221229.IAA18045@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

I am able to reproduce this. The problem is that the DEFAULT string is
not the same length as the column. Anyone know how to fix this?

> Hi,
>
> I managed to recreate a simple example that's crashing postgres. I am
> running on a DEC Alpha with Digital Unix Version 4.0d and Postgres
> 3.2. I tried this example several times, on several databases and it
> crashes every time. We also re-built Postgres and still did not work.
> Here's the example. Can anybody please help?
>
> Thank you...
> George K.
> /***** INPUT FILE: hist.sql *******/
>
> drop table tasks;
> CREATE TABLE tasks (
> task INT4 NOT NULL,
> job INT4 NOT NULL,
> Version1 CHAR(6) DEFAULT '',
> Version2 CHAR(6) DEFAULT '',
> Version3 CHAR(6) DEFAULT '',
> Version4 CHAR(6) DEFAULT '',
> Version5 CHAR(6) DEFAULT ''
> );
>
> INSERT INTO tasks (task, job) VALUES (1, 1);
> select * from tasks;
> update tasks set version1='1',version2='2', version3='3', version4='4',
> version5='5' where task=1;
> select * from tasks;
>
>
> /****** OUTPUT FROM pgsql **********/
> test=> \i hist.sql
> drop table tasks;
> DROP
> CREATE TABLE tasks (
> task INT4 NOT NULL,
> job INT4 NOT NULL,
> Version1 CHAR(6) DEFAULT '',
> Version2 CHAR(6) DEFAULT '',
> Version3 CHAR(6) DEFAULT '',
> Version4 CHAR(6) DEFAULT '',
> Version5 CHAR(6) DEFAULT ''
> );
> CREATE
>
> INSERT INTO tasks (task, job) VALUES (1, 1);
> INSERT 4410388 1
> select * from tasks;
> task|job|version1|version2|version3|version4|version5
> ----+---+--------+--------+--------+--------+--------
> 1| 1| | | | |
> (1 row)
>
> update tasks set version1='1',version2='2', version3='3', version4='4',
> version5='5' where task=1;
> UPDATE 1
> select * from tasks;
> FATAL: unrecognized data from the backend. It probably dumped core.
> FATAL: unrecognized data from the backend. It probably dumped core.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1998-08-22 12:42:16 Re: [GENERAL] view problems
Previous Message Bruce Momjian 1998-08-22 03:53:39 Re: [INTERFACES] Re: [HACKERS] changes in 6.4

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-08-22 12:40:21 Re: [HACKERS] tuple return from function
Previous Message Bruce Momjian 1998-08-22 11:41:25 Re: [HACKERS] Re: Default 'now'