Re: POC: Sharing record typmods between backends

From: Andres Freund <andres(at)anarazel(dot)de>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: POC: Sharing record typmods between backends
Date: 2017-09-15 03:03:35
Message-ID: 20170915030335.tnzxircl5vpjstvj@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2017-09-04 18:14:39 +1200, Thomas Munro wrote:
> Thanks for the review and commits so far. Here's a rebased, debugged
> and pgindented version of the remaining patches.

I've pushed this with minor modifications:
- added typedefs to typedefs.list
- re-pgindented, there were some missing reindents in headers
- added a very brief intro into session.c, moved some content repeated
in various places to the header - some of them were bound to become
out-of-date due to future uses of the facility.
- moved NULL setting in detach hook directly after the respective
resource deallocation, for the not really probable case of it being
reinvoked due to an error in a later dealloc function

Two remarks:
- I'm not sure I like the order in which things are added to the typemod
hashes, I wonder if some more careful organization could get rid of
the races. Doesn't seem critical, but would be a bit nicer.

- I'm not yet quite happy with the Session facility. I think it'd be
nicer if we'd a cleaner split between the shared memory notion of a
session and the local memory version of it. The shared memory version
would live in a ~max_connections sized array, referenced from
PGPROC. In a lot of cases it'd completely obsolete the need for a
shm_toc, because you could just store handles etc in there. The local
memory version then would just store local pointers etc into that.

But I think we can get there incrementally.

It's very nice to push commits that have stats like
6 files changed, 27 insertions(+), 1110 deletions(-)
even if it essentially has been paid forward by a lot of previous work
;)

Thanks for the work on this!

Regards,

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2017-09-15 03:16:54 Re: POC: Sharing record typmods between backends
Previous Message Andres Freund 2017-09-15 03:03:21 pgsql: Add support for coordinating record typmods among parallel worke