From: | <tom(at)minnesota(dot)com> |
---|---|
To: | <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: table schema causes crash |
Date: | 2002-12-20 22:31:31 |
Message-ID: | 2603.63.226.186.156.1040423491.squirrel@www.minnesota.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Let me ask --- if you execute \a, then \d in psql, does it display OK?
> How about \x and then \d?
I created the table as described earlier, it segmentation fault. I ran
psql again, then:
authtest=# \d imap_passwd
Table "imap_passwd"
Column | Type | Modifiers
----------+------------------------+-----------
username | character varying(128) | Primary key: imap_passwd_pkey
*** NOTE: it only shows the first column and none of the other columns ***
authtest=# \a
Output format is unaligned.
authtest=# \a
Output format is aligned.
authtest=# \d imap_passwd
Table "imap_passwd"
Column | Type | Modifiers
----------+------------------------+-----------
username | character varying(128) | Primary key: imap_passwd_pkey
authtest=# \a
Output format is unaligned.
authtest=# \d imap_passwd
Table "imap_passwd"
Column|Type|Modifiers
username|character varying(128)|Primary key: imap_passwd_pkey
authtest=# \x
Expanded display is on.
authtest=# \d imap_passwd
Table "imap_passwd"
Column|username
Type|character varying(128)
Primary key: imap_passwd_pkey
authtest=# \x
Expanded display is off.
authtest=# \d imap_passwd
Table "imap_passwd"
Column|Type|Modifiers
username|character varying(128)|Primary key: imap_passwd_pkey
authtest=# drop table imap_passwd;
DROP
authtest=# CREATE TABLE imap_passwd (
authtest(# username varchar(128) PRIMARY KEY,
pw_crypt varchar(128) DEFAULT '' NOT NULL,
pw_clear varchar(128) DEFAULT '' NOT NULL,
real_name varchar(128) DEFAULT '' NOT NULL,
user_id int DEFAULT '65534' NOT NULL,
group_id int DEFAULT '65534' NOT N username
varcha
r(128) PRIMARY KEY,
authtest(# pw_crypt varchar(128) DEFAULT '' NOT NULL,
authtest(# pw_clear varchar(128) DEFAULT '' NOT NULL,
authtest(# real_name varchar(128) DEFAULT '' NOT NULL,
authtest(# user_id int DEFAULT '65534' NOT NULL,
authtest(# group_id int DEFAULT '65534' NOT NULL,
authtest(# home varchar(255) DEFAULT '' NOT NULL,
authtest(# maildir varchar(255) DEFAULT '' NOT NULL,
authtest(# quota varchar(255) DEFAULT '' NOT NULL
authtest(# );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
'imap_passwd_pkey' for table
'imap_passwd'
CREATE
authtest=# \d imap_passwd
Table "imap_passwd"
Column|Type|Modifiers
Segmentation fault
***
NOTE: it only crashes when \d imap_passwd AFTER fresh new create of
imap_passwd
***
---------------------------------------------------------------------------
>
> tom(at)minnesota(dot)com wrote:
>> [...]
>> > Hmm. Evidently a null (or invalid) pointer is getting passed to
>> strlen(), but it's hard to say more without a symbolic backtrace ---
>> for which you'll need to recompile psql with debug symbols.
>> [...]
>>
>> I recompiled psql with debug.
>>
>> ---
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x160275d84 in strlen () from /usr/lib/libc.so.12
>> (gdb) bt
>> #0 0x160275d84 in strlen () from /usr/lib/libc.so.12
>> #1 0x120010a10 in print_aligned_text (
>> title=0x120036580 "Table \"imap_passwd\"", headers=0x1fffff510,
>> cells=0x120036100, footers=0x12003a460, opt_align=0x120020d16
>> "llll", opt_barebones=0 '\000', opt_border=1, fout=0x160293568) at
>> print.c:280
>> #2 0x120012ea8 in printTable (title=0x120036580 "Table
>> \"imap_passwd\"",
>> headers=0x1fffff510, cells=0x120036100, footers=0x12003a460,
>> align=0x120020d16 "llll", opt=0x1fffff4e8, fout=0x160293568) at
>> print.c:1123
>> #3 0x120015a94 in describeTableDetails (name=0x120020cc4 "Primary
>> key",
>> desc=0 '\000') at describe.c:914
>> #4 0x1200041f0 in exec_command (cmd=0x12003a430 "d",
>> options_string=0x12003a432 "imap_passwd",
>> continue_parse=0x1fffff6e0, query_buf=0x1200389e0) at
>> command.c:347
>> #5 0x120003a50 in HandleSlashCmds (line=0x12003a3b1 "d imap_passwd",
>> query_buf=0x1200389e0, end_of_cmd=0x1fffff750) at command.c:135
>> #6 0x12000bb8c in MainLoop (source=0x1602934d0) at mainloop.c:467 #7
>> 0x12000d974 in main (argc=1613313248, argv=0x12001ea33) at
>> startup.c:305 (gdb)
>>
>>
>>
>> ---------------------------(end of
>> broadcast)--------------------------- TIP 6: Have you searched our
>> list archives?
>>
>> http://archives.postgresql.org
>>
>
> --
> 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 | Date | Subject | |
---|---|---|---|
Next Message | tom | 2002-12-20 22:51:40 | Re: table schema causes crash |
Previous Message | Bruce Momjian | 2002-12-20 22:11:15 | Re: table schema causes crash |