pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Aleksander Alekseev <a.alekseev@postgrespro.ru>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: Missing checks when malloc returns NULL...
Date: Thu, 01 Sep 2016 09:03:44 -0400
Message-ID: <20942.1472735024@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqSVawK_Ms-J3n90hVjaHdQnaPYZCghWEpiX3tbdpejQEg@mail.gmail.com>
References: <CAB7nPqRu07Ot6iht9i9KRfYLpDaF2ZuUv5y_+72uP23ZAGysRg@mail.gmail.com>
	<7978.1466516782@sss.pgh.pa.us>
	<CAB7nPqRRR8mnM9kbGObV2tzP-BpmLotiKyVBPbY2bxjuAyeCpw@mail.gmail.com>
	<d4b09f6b-06b9-2678-a0f8-714e3468b9eb@iki.fi>
	<CAB7nPqQhEF854DuLPaqpx+FfrY3YEcqYTVa12YKXMk_ayCtqqQ@mail.gmail.com>
	<CAB7nPqSCxBWt7Q1dpFTekg-zDx_GZ-ELgEOfYJ47zrD8=v=yHg@mail.gmail.com>
	<20160829130513.GA8340@e733>
	<20160829141315.GB8340@e733>
	<CAB7nPqSaEQPSXusCEqT=dsB3rpSA=k7EQVxCu63y8N4URmV3CA@mail.gmail.com>
	<CAB7nPqRB2qQVughKon-viUwACR4mKPnFRu4hu4aAKBX=UpVjEg@mail.gmail.com>
	<11202.1472597262@sss.pgh.pa.us>
	<CAB7nPqTfSDR7T4aPxELJbw1W9qR5U3L4=i+KgR11vH+smxZ0Yg@mail.gmail.com>
	<27675.1472656473@sss.pgh.pa.us>
	<CAB7nPqSVawK_Ms-J3n90hVjaHdQnaPYZCghWEpiX3tbdpejQEg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Michael Paquier <michael.paquier@gmail.com> writes:
> Also, we could take one extra step forward then, and just introduce
> ShmemAllocExtended that holds two flags as per the attached:
> - SHMEM_ALLOC_ZERO that zeros all the fields
> - SHMEM_ALLOC_NO_OOM that does not fail

Don't see the point really ... it's just more API churn without any
very compelling reason.

(It doesn't look like you correctly implemented the case of both
flags being set, either.)

			regards, tom lane


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



view thread (33+ messages)  latest in thread

Message-ID: <20942.1472735024@sss.pgh.pa.us>
Permalink:  ../20942.1472735024@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20942.1472735024@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, a.alekseev@postgrespro.ru, hlinnaka@iki.fi
  Subject: Re: Missing checks when malloc returns NULL...
  In-Reply-To: <20942.1472735024@sss.pgh.pa.us>
  References: <CAB7nPqRu07Ot6iht9i9KRfYLpDaF2ZuUv5y_+72uP23ZAGysRg@mail.gmail.com> <7978.1466516782@sss.pgh.pa.us> <CAB7nPqRRR8mnM9kbGObV2tzP-BpmLotiKyVBPbY2bxjuAyeCpw@mail.gmail.com> <d4b09f6b-06b9-2678-a0f8-714e3468b9eb@iki.fi> <CAB7nPqQhEF854DuLPaqpx+FfrY3YEcqYTVa12YKXMk_ayCtqqQ@mail.gmail.com> <CAB7nPqSCxBWt7Q1dpFTekg-zDx_GZ-ELgEOfYJ47zrD8=v=yHg@mail.gmail.com> <20160829130513.GA8340@e733> <20160829141315.GB8340@e733> <CAB7nPqSaEQPSXusCEqT=dsB3rpSA=k7EQVxCu63y8N4URmV3CA@mail.gmail.com> <CAB7nPqRB2qQVughKon-viUwACR4mKPnFRu4hu4aAKBX=UpVjEg@mail.gmail.com> <11202.1472597262@sss.pgh.pa.us> <CAB7nPqTfSDR7T4aPxELJbw1W9qR5U3L4=i+KgR11vH+smxZ0Yg@mail.gmail.com> <27675.1472656473@sss.pgh.pa.us> <CAB7nPqSVawK_Ms-J3n90hVjaHdQnaPYZCghWEpiX3tbdpejQEg@mail.gmail.com> <20942.1472735024@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