Lists: | pgsql-general |
---|
From: | Ravi Kiran <ravi(dot)kolanpaka(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | gdb debugging with postgres |
Date: | 2014-07-09 10:18:09 |
Message-ID: | CAOh57xEnKpWJujyYwbB0OSAaMcGH8qNPQG7pJ-pEJaKmR=cetg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
hi ,
I am trying to attach a postgres process to gdb, Since I am using only 1
client , I am using the script give by Tom Lane posted in the mailing list.
http://www.postgresql.org/message-id/bd6a35510707221030p694cd515kfeb529078557ba42@mail.gmail.com
I started running the client by following command *psql test *where test is
my database.
But When I am running that script I am getting two client processes.
ravi 13368 13366 0 15:14 ? 00:00:00 postgres: checkpointer
process
ravi 13379 13366 0 15:14 ? 00:00:00 postgres: ravi test [local]
idle
Could any one tell me what is checkpointer process and is there any way of
running the script without that process.
Thank you,
K.Ravikiran
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ravi Kiran <ravi(dot)kolanpaka(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: gdb debugging with postgres |
Date: | 2014-07-09 13:36:14 |
Message-ID: | 27192.1404912974@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Ravi Kiran <ravi(dot)kolanpaka(at)gmail(dot)com> writes:
> I am trying to attach a postgres process to gdb, Since I am using only 1
> client , I am using the script give by Tom Lane posted in the mailing list.
> http://www.postgresql.org/message-id/bd6a35510707221030p694cd515kfeb529078557ba42@mail.gmail.com
You realize that's from 2007?
> But When I am running that script I am getting two client processes.
> ravi 13368 13366 0 15:14 ? 00:00:00 postgres: checkpointer
> process
> ravi 13379 13366 0 15:14 ? 00:00:00 postgres: ravi test [local]
> idle
There wasn't any checkpointer back in 2007. These days the filter step
of my script looks like
grep -v -e 'grep postgres:' -e 'postgres: stats' -e 'postgres: writer' -e 'p
ostgres: wal writer' -e 'postgres: checkpointer' -e 'postgres: archiver' -e 'pos
tgres: logger' -e 'postgres: autovacuum' | \
In any case you could (and should) have just done "attach 13379" to get
control of the process you wanted. The "ps | grep" dance is just an
aid, not something that is guaranteed to work every time.
regards, tom lane