pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: removal of dangling temp tables
Date: Fri, 28 Dec 2018 14:34:44 -0300
Message-ID: <201812281734.zwh3cexl4p2i@alvherre.pgsql> (raw)
In-Reply-To: <30574.1546015645@sss.pgh.pa.us>

On 2018-Dec-28, Tom Lane wrote:

> I wrote:
> > Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> >> I looked at 
> >> https://github.com/postgrespro/pg_wait_sampling/blob/master/pg_wait_sampling.c
> >> https://github.com/citusdata/citus/search?q=pgproc&unscoped_q=pgproc
> >> and skimmed a few others can't find any instance where the full struct
> >> is used, as opposed to just a pointer to it.
> 
> > No, the point Michael is making is that the array stride in the ProcArray
> > is part of our ABI.  For example, accessing a PGPROC from its pgprocno
> > using the GetPGProcByNumber macro will be broken if we change the
> > struct size.  I do not think you can assume that no extension does that.
> 
> In fact, there's a counterexample right here in pg_wait_sampling:
> 
> https://github.com/postgrespro/pg_wait_sampling/blob/master/pg_wait_sampling.c#L343

Ughh.  I stand corrected.

This seems a terrible interface, from an ABI compatibility point of
view, and exposing proclist_node_get() as an inline function, doubly so.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (29+ messages)

Message-ID: <201812281734.zwh3cexl4p2i@alvherre.pgsql>
Permalink:  ../201812281734.zwh3cexl4p2i@alvherre.pgsql/
Also on:    postgresql.org/message-id/201812281734.zwh3cexl4p2i@alvherre.pgsql

 · 

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-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, tsunakawa.takay@jp.fujitsu.com, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: removal of dangling temp tables
  In-Reply-To: <201812281734.zwh3cexl4p2i@alvherre.pgsql>

* 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