Skip site navigation (1) Skip section navigation (2)

Re: _penalty gist method invoked with one key NULL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Grzegorz Piotr Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: _penalty gist method invoked with one key NULL
Date: 2005-10-27 21:44:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Grzegorz Piotr Jaskiewicz <gj(at)pointblue(dot)com(dot)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

			regards, tom lane


# 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 ]
    exec gdb $PGINSTROOT/bin/postgres -silent "$PROCS"
    exec gdb $PGINSTROOT/bin/postgres -silent

In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2005-10-27 21:44:30
Subject: Re: ERROR: invalid memory alloc request size <a_big_number_here>
Previous:From: Kevin MurphyDate: 2005-10-27 21:42:45
Subject: Re: [GENERAL] aix build question re: duplicate symbol warning

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group