From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Dale Anderson <danderso(at)crystalsugar(dot)com>, pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: Table locks |
Date: | 2000-10-09 18:25:05 |
Message-ID: | 200010091825.OAA22444@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I am thinking of a tcl/tk app that can go in and grab information from
> > backends by querying the actual structure values. Does gdb
> > automatically halt the running app?
>
> Yes. I suppose this is no big problem if you start a backend to be
> used only as the gdb target, but you'd not want to take over a live
> client's backend for the purpose.
That was the idea.
> A bigger problem is that it's not a portable approach, since gdb may not
> be available/installed on a given platform. Furthermore, you won't get
> far unless the installed executable was compiled with debug symbols,
> which isn't (and IMHO shouldn't be) the default configuration.
Good point. I certainly did not want to muck up the backend with an API
just so I could grab information for a monitoring utility.
>
> Finally (and probably the key point): what are you going to do about
> locking? You aren't going to be able to grab a spinlock via gdb, nor
> would it be a good idea if you could --- holding down a critical
> spinlock while a tcl-to-gdb-to-backend conversation goes on would be a
> killer for performance.
No spinlock. I was going to just grab a snapshot as it existed. If it
changes while I am grabbing it, I just try again.
>
> I think the information-grabbing routines need to be C code in the
> backend.
Not sure.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-10-09 18:41:03 | Re: Table locks |
Previous Message | Tom Lane | 2000-10-09 18:21:28 | Re: Table locks |