Re: "create implicit sequence" crashes postgres

Поиск
Список
Период
Сортировка
От Mike Williams
Тема Re: "create implicit sequence" crashes postgres
Дата
Msg-id 200802051324.12712.mike.williams@comodo.com
обсуждение исходный текст
Ответ на Re: "create implicit sequence" crashes postgres  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-admin
On Tuesday 05 February 2008 11:37:59 Alvaro Herrera wrote:
> I guess it would still be good to know why it crashes.  I think the
> reason you're not getting a good backtrace is that you're attempting to
> get it from the client process, which is not the guilty one here.  Same
> for the ulimit setting: you have to apply it to the session running
> postmaster, not psql.  The core file should be located in your "data"
> directory.

Ahh, so there is a core dump!

postgres@mcsql1 ~ $ !ul
ulimit -c unlimited
postgres@mcsql1 ~ $ !po
postgres -D /var/lib/postgresql/data/


postgres@mcsql1 ~ $ psql
Welcome to psql 8.2.6, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

postgres=# CREATE TABLE billing_transaction_items (
    id serial NOT NULL,
    billing_transaction_id integer NOT NULL,
    pricing_term_id integer,
    product_id integer NOT NULL,
    is_free boolean NOT NULL,
    is_visible boolean NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    cost numeric(15,4) DEFAULT 0.0 NOT NULL,
    tax numeric(15,4) DEFAULT 0.0 NOT NULL,
    quoted_cost numeric(15,4) DEFAULT 0.0 NOT NULL,
    quoted_tax numeric(15,4) DEFAULT 0.0 NOT NULL
);
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> \q
postgres@mcsql1 ~ $ gdb /usr/bin/postgres /var/lib/postgresql/data/core
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
Reading symbols from /lib64/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib64/libssl.so.0.9.8...done.
Loaded symbols for /usr/lib64/libssl.so.0.9.8
Reading symbols from /usr/lib64/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/lib64/libcrypto.so.0.9.8
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib64/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib64/libnss_nis.so.2...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib64/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by `postgres: postgres postgres [local] CR'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000006292bf in pfree (pointer=0x9bba00) at mcxt.c:585
585     mcxt.c: No such file or directory.
        in mcxt.c
(gdb)
(gdb)
(gdb) bt
#0  0x00000000006292bf in pfree (pointer=0x9bba00) at mcxt.c:585
#1  0x00000000006115b4 in EmitErrorReport () at elog.c:1746
#2  0x0000000000610b3e in errfinish (dummy=0) at elog.c:390
#3  0x00000000004a4ddc in transformColumnDefinition (pstate=0xa75978, cxt=0x7fff06ee5b50, column=0xa4d190) at
analyze.c:1098
#4  0x00000000004a6180 in transformStmt (pstate=0xa757d8, parseTree=0xa75738, extras_before=0x7fff06ee5c00,
extras_after=0x7fff06ee5c08)at analyze.c:970 
#5  0x00000000004a7a7a in do_parse_analyze (parseTree=0x0, pstate=0xa757d8) at analyze.c:251
#6  0x00000000004a8544 in parse_analyze (parseTree=0xa75738,
    sourceText=0xa4c6d0 "CREATE TABLE billing_transaction_items (\n    id serial NOT NULL,\n    billing_transaction_id
integerNOT NULL,\n    pricing_term_id integer,\n    product_id integer NOT NULL,\n    is_free boolean NOT NULL"...,
paramTypes=0x0,numParams=0) at analyze.c:173 
#7  0x0000000000592f2b in pg_analyze_and_rewrite (parsetree=0xa75738,
    query_string=0xa4c6d0 "CREATE TABLE billing_transaction_items (\n    id serial NOT NULL,\n
billing_transaction_idinteger NOT NULL,\n    pricing_term_id integer,\n    product_id integer NOT NULL,\n    is_free
booleanNOT NULL"..., paramTypes=0x0, numParams=0) at postgres.c:567 
#8  0x000000000059322d in exec_simple_query (
    query_string=0xa4c6d0 "CREATE TABLE billing_transaction_items (\n    id serial NOT NULL,\n
billing_transaction_idinteger NOT NULL,\n    pricing_term_id integer,\n    product_id integer NOT NULL,\n    is_free
booleanNOT NULL"...) at postgres.c:875 
#9  0x0000000000594bec in PostgresMain (argc=4, argv=0x9bb0c0, username=0x9bb080 "postgres") at postgres.c:3424
#10 0x000000000056c058 in ServerLoop () at postmaster.c:2932
#11 0x000000000056dc26 in PostmasterMain (argc=3, argv=0x9b69e0) at postmaster.c:966
#12 0x0000000000529133 in main (argc=3, argv=0x9b69e0) at main.c:188
(gdb)

Means nothing to me...

--
Mike Williams
System Administration Manager - Comodo
Office Tel Europe: +44 (0) 161 8747070
Fax Europe: +44 (0) 161 8771767

В списке pgsql-admin по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: "create implicit sequence" crashes postgres
Следующее
От: jkohlmeier@pronet-systeme.de
Дата:
Сообщение: PG 8.2 change Letter Sort Order