Re: Table locks - Mailing list pgsql-general

From Tom Lane
Subject Re: Table locks
Date
Msg-id 26008.971115688@sss.pgh.pa.us
Whole thread Raw
In response to Re: Table locks  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Table locks  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Bruce Momjian <pgman@candle.pha.pa.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.

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.

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.

I think the information-grabbing routines need to be C code in the
backend.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: How does TOAST compare to other databases' mechanisms?
Next
From: Bruce Momjian
Date:
Subject: Re: Table locks