pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Rick Otten <rottenwindfish@gmail.com>
Cc: ronan.dunklau@dalibo.com, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: your mail
Date: Tue, 08 Aug 2017 18:12:35 -0400
Message-ID: <25045.1502230355@sss.pgh.pa.us> (raw)
In-Reply-To: <20170808211941.p74wtzo5oxt7t5is@alap3.anarazel.de>
References: <20170808194943.smet3uuvtxats44v@alap3.anarazel.de>
	<15541.1502223315@sss.pgh.pa.us>
	<20170808201838.vt5lyujd3fvgtxyq@alap3.anarazel.de>
	<17591.1502226734@sss.pgh.pa.us>
	<20170808211941.p74wtzo5oxt7t5is@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Andres Freund <andres@anarazel.de> writes:
> On 2017-08-08 17:12:14 -0400, Tom Lane wrote:
>> And it would cause a lot of code that *doesn't* assume that to fail,
>> too. That has basically nothing to do with not being in a transaction,
>> so I don't think it would be helpful here.

> Wouldn't mostsuch code be a bad idea anyway?

No, not really.  You're right that a palloc appearing directly in a
_PG_init function is a bit dubious, but that doesn't mean that _PG_init
can't call anything that allocates memory.  Also, since _PG_init is by
definition only called once per process, I do not think that authors
need to be rapped on the knuckles if they leak a small amount of
TopMemoryContext memory.

In any case, the result of doing that would only be that people would
throw in MemoryContextSwitchTo calls, it wouldn't discourage them from
trying to do catalog accesses for instance.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <25045.1502230355@sss.pgh.pa.us>
Permalink:  ../25045.1502230355@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25045.1502230355@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, rottenwindfish@gmail.com, amit.kapila16@gmail.com, robertmhaas@gmail.com
  Subject: Re: your mail
  In-Reply-To: <25045.1502230355@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox