From: | ruben <ruben20(at)superguai(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: SQL command to dump the contents of table failed: PQendcopy() |
Date: | 2005-09-28 09:40:11 |
Message-ID: | 433A64FB.5080205@superguai.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Tom:
No way to get the core dump, this is what I did:
1) Add "ulimit" to /etc/rc.d/init.d/postgresql just before pg_ctl start
in the "start" section of the script:
...
ulimit -c unlimited
su -l postgres -s /bin/sh -c "/usr/local/pgsql/bin/pg_ctl -D $PGDATA
-p /usr/local/pgsql/bin/postmaster -l $DIRLOG/logfile start > /dev/null
2>&1" < /dev/null
...
I tried "man ulimit" but it didn't work, "man bash" returns the command
help.
2) Restart postmaster
/etc/rc.d/init.d/postgresql restart
3) Run the query that produces the crash.
4) Search core file:
-bash-2.05b$ find /usr/local/pgsql/ -name '*core*' -print
-bash-2.05b$
Nothing comes up.
Thanks for your help.
Ruben.
Tom Lane wrote:
> ruben <ruben20(at)superguai(dot)com> writes:
>
>>>As I recall, released versions of PostgreSQL usually dump core under
>>>$PGDATA/base/<database oid>. However, it's also possible that your
>>>coredumpsize resource limit prevents core dumps; you could fix that
>>>by putting a command like "ulimit -c unlimited" in your PostgreSQL
>>>startup script and then stopping and restarting PostgreSQL.
>
>
>>I cannot find a core file, ulimit is set to unlimit. I guess I'm doing
>>something wrong:
>
>
>>-bash-2.05b$ ulimit
>>unlimited
>>-bash-2.05b$ find /usr/local/pgsql -name '*core*' -print
>
>
> (1) The fact that it's unlimited in your user environment doesn't prove
> that it's unlimited in the environment the postmaster is started in.
>
> (2) I forget which constraint ulimit-with-no-argument prints, but it's
> not core file size. (Try "ulimit -a")
>
> Please actually follow the advice given to you above.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2005-09-28 09:44:03 | Re: postgresql and C++/C |
Previous Message | Peter Wiersig | 2005-09-28 09:37:56 | Re: postgresql and C++/C |