pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: bad JIT decision
Date: Mon, 27 Jul 2020 16:24:38 -0600
Message-ID: <690D93FA-4A30-422D-94C3-18A089B8AEFE@elevated-dev.com> (raw)
In-Reply-To: <20200727220043.GA29801@alvherre.pgsql>
References: <20200727220043.GA29801@alvherre.pgsql>

> On Jul 27, 2020, at 4:00 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> 
> I don't quite understand why is it that a table with 1000 partitions
> means that JIT compiles the thing 1000 times.  Sure, it is possible that
> some partitions have a different column layout, but it seems an easy bet
> that most cases are going to have identical column layout, and so tuple
> deforming can be shared.  (I'm less sure about sharing a compile of an
> expression, since the varno would vary. But presumably there's a way to
> take the varno as an input value for the compiled expr too?)  Now I
> don't actually know how this works so please correct if I misunderstand
> it.

I'm guessing it's because of inlining. You could optimize a function that takes parameters, no problem. But what's happening is inlining, with parameters, then optimizing.






view thread (26+ messages)  latest in thread

Message-ID: <690D93FA-4A30-422D-94C3-18A089B8AEFE@elevated-dev.com>
Permalink:  ../690D93FA-4A30-422D-94C3-18A089B8AEFE@elevated-dev.com/
Also on:    postgresql.org/message-id/690D93FA-4A30-422D-94C3-18A089B8AEFE@elevated-dev.com

 · 

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-general@postgresql.org
  Cc: scott_ribe@elevated-dev.com, alvherre@2ndquadrant.com, andres@anarazel.de, tgl@sss.pgh.pa.us, dgrowleyml@gmail.com
  Subject: Re: bad JIT decision
  In-Reply-To: <690D93FA-4A30-422D-94C3-18A089B8AEFE@elevated-dev.com>
  References: <20200727220043.GA29801@alvherre.pgsql> <690D93FA-4A30-422D-94C3-18A089B8AEFE@elevated-dev.com>

* 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