From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Memory-context slinging |
Date: | 2000-07-04 19:57:37 |
Message-ID: | Pine.LNX.4.21.0007042111030.3542-100000@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Tom Lane writes:
> If you really truly want a context that's destroyed by elog(ERROR),
> and not by any other event, then create it as a child of ErrorContext,
> and that's what will happen. But I suspect what you really want is a
> context that's a child of TopTransactionContext and will go away at
> either transaction commit or transaction abort.
No, actually I wanted the former. Notice how the configuration file is
first read in completely as a linked list. When something goes wrong
(garbage in the file) I need to free the list (and other things) before
calling elog. The alternative would be to create a separate memory context
for this processing, but that's more of a purity issue, it wouldn't make
it work better, AFAICT.
> A difficulty I have been noticing with some of these special-purpose
> contexts is that you'd like to keep a pointer to them in some global
> variable, but there's no easy way to determine whether that pointer is
> currently valid
Shouldn't it be NULL if it's not valid?
--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-07-04 19:58:06 | Re: [COMMITTERS] pgsql/doc/TODO.detail (alpha default distinct flock fsync function limit null pg_shadow primary) |
Previous Message | Peter Eisentraut - PostgreSQL | 2000-07-04 19:52:01 | pgsql/src/bin/pg_dump (Makefile) |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-07-04 19:57:52 | Dumping SQL type names |
Previous Message | Peter Eisentraut | 2000-07-04 19:57:31 | zlib for pg_dump |