pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.
Date: Thu, 05 Jan 2017 17:07:30 -0500
Message-ID: <16488.1483654050@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmob2c4AU=PgofB0-d1uDV8vdkG7C6X7Hhkc_PwUou4ar9w@mail.gmail.com>
References: <E1cPBt9-0003R1-9h@gemulon.postgresql.org>
	<6989.1483637871@sss.pgh.pa.us>
	<CA+TgmoY5tK2LsDvpnL4=1V3TPTaxbxR70OcR1k5cPubQ4_uALA@mail.gmail.com>
	<7931.1483639378@sss.pgh.pa.us>
	<CA+TgmoZMaCNopg9Hn64WDMJfJwy_zs+Gy+z603JsZXqe=iqNNA@mail.gmail.com>
	<8402.1483640139@sss.pgh.pa.us>
	<CA+Tgmoa_ra9Z=o2nTd9+RvgVOPECQ4RkHo3Z=gxZsu6zWs0gUA@mail.gmail.com>
	<15257.1483652020@sss.pgh.pa.us>
	<CA+Tgmob2c4AU=PgofB0-d1uDV8vdkG7C6X7Hhkc_PwUou4ar9w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jan 5, 2017 at 4:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Better documentation seems required, but really the whole design seems
>> rather wacko.  Backends must agree on numeric tranche IDs, but every
>> backend has its own copy of the tranche name?  How do we even know what
>> agreement is?  And every one has to "register" every tranche ID for
>> itself?  Why in the world isn't registration done *once* and the tranche
>> name stored in shared memory?

> Well, with the original design, that wasn't feasible, because each
> backend had to store not only the name (which was constant across all
> backends) but also the array_base (which might not be, if the locks
> were stored in DSM) and array_stride.  Since commit
> 3761fe3c20bb040b15f0e8da58d824631da00caa, it would be much easier to
> do what you're proposing.  It's still not without difficulties,
> though.  There are 65,536 possible tranche IDs, and allocating an
> array of 64k pointers in shared memory would consume half a megabyte
> of shared memory the vast majority of which would normally be
> completely unused.  So I'm not very enthused about that solution, but
> you aren't the first person to propose it.

So, um, how do we know that backend A and backend B have the same idea
about what tranche id 37 means?

			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 (12+ messages)  latest in thread

Message-ID: <16488.1483654050@sss.pgh.pa.us>
Permalink:  ../16488.1483654050@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16488.1483654050@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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.
  In-Reply-To: <16488.1483654050@sss.pgh.pa.us>
  References: <E1cPBt9-0003R1-9h@gemulon.postgresql.org> <6989.1483637871@sss.pgh.pa.us> <CA+TgmoY5tK2LsDvpnL4=1V3TPTaxbxR70OcR1k5cPubQ4_uALA@mail.gmail.com> <7931.1483639378@sss.pgh.pa.us> <CA+TgmoZMaCNopg9Hn64WDMJfJwy_zs+Gy+z603JsZXqe=iqNNA@mail.gmail.com> <8402.1483640139@sss.pgh.pa.us> <CA+Tgmoa_ra9Z=o2nTd9+RvgVOPECQ4RkHo3Z=gxZsu6zWs0gUA@mail.gmail.com> <15257.1483652020@sss.pgh.pa.us> <CA+Tgmob2c4AU=PgofB0-d1uDV8vdkG7C6X7Hhkc_PwUou4ar9w@mail.gmail.com> <16488.1483654050@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