pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@2ndquadrant.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Subject: Volatility - docs vs behaviour?
Date: Mon, 30 Jun 2014 17:24:55 +0800
Message-ID: <53B12CE7.5090506@2ndquadrant.com> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Hi all

The docs say:

"For best optimization results, you should label your functions with the
strictest volatility category that is valid for them."

http://www.postgresql.org/docs/current/interactive/xfunc-volatility.html

... but I recall discussion here suggesting that in fact IMMUTABLE
functions may not be inlined where you'd expect, e.g.

http://www.postgresql.org/message-id/CAFj8pRBF3Qr7WtQwO1H_WN=hhFGk0semwhdE+ODz3iyv-TroMQ@mail.gmail....

That's always seemed counter to my expectations. Am I just
misunderstanding? Tom's comment seemed to confirm what Pavel was saying.

I know STRICT can prevent inlining (unfortunately, though necessarily),
but it seems inexplicable that IMMUTABLE should. If it can, then the
documentation is wrong.

Which is it?

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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



view thread (5+ messages)  latest in thread

Message-ID: <53B12CE7.5090506@2ndquadrant.com>
Permalink:  ../53B12CE7.5090506@2ndquadrant.com/
Also on:    postgresql.org/message-id/53B12CE7.5090506@2ndquadrant.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: craig@2ndquadrant.com, tgl@sss.pgh.pa.us, pavel.stehule@gmail.com
  Subject: Re: Volatility - docs vs behaviour?
  In-Reply-To: <53B12CE7.5090506@2ndquadrant.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