Re: _penalty gist method invoked with one key NULL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: _penalty gist method invoked with one key NULL
Дата
Msg-id 24328.1130449464@sss.pgh.pa.us
обсуждение исходный текст
Ответ на _penalty gist method invoked with one key NULL  (Grzegorz Piotr Jaskiewicz <gj@pointblue.com.pl>)
Ответы Re: _penalty gist method invoked with one key NULL  (gj <gj@pointblue.com.pl>)
Re: _penalty gist method invoked with one key NULL  (gj <gj@pointblue.com.pl>)
Список pgsql-hackers
Grzegorz Piotr Jaskiewicz <gj@pointblue.com.pl> writes:
> can I just run postgres, in non forking mode, on gdb?

Just start a normal session and then attach to the backend process with
gdb in a separate window.  There's no reason to fool with a standalone
backend for 99.99% of debugging problems.  With a regular session, you
can use psql to input the SQL commands, which is MUCH friendlier than a
standalone backend, and you can run additional sessions in case you'd
like to examine the state of the database while you've got your debug
backend pinned down someplace.

I tend to use the attached script so that I don't even need to manually
discover the PID to attach to, assuming there's only one backend running
(else it shows me all the plausible candidates to attach to).

Dunno about the gist-specific issue, Oleg or Teodor will have to answer
that.
        regards, tom lane

#!/bin/sh

# Usage: gdblive

# tee /dev/tty is for user to see the set of procs considered
PROCS=`ps auxww | \   grep postgres: | \   grep -v -e 'grep postgres:' -e 'postgres: stats' -e 'postgres: writer' -e
'postgres:archiver' -e 'postgres: logger' | \   tee /dev/tty | \   awk '{print $2}'`
 

if [ `echo "$PROCS" | wc -w` -eq 1 ]
then   exec gdb $PGINSTROOT/bin/postgres -silent "$PROCS"
else   exec gdb $PGINSTROOT/bin/postgres -silent
fi


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: ERROR: invalid memory alloc request size
Следующее
От: gj
Дата:
Сообщение: Re: _penalty gist method invoked with one key NULL