pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Leif Jensen <leif@crysberg.dk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Server process crash - Segmentation fault
Date: Thu, 8 May 2014 15:59:09 +0200 (CEST)
Message-ID: <7070852.11378.1399557549199.JavaMail.root@quick> (raw)
In-Reply-To: <31796.1399484383@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

   Hi Tom,

   I already compiled postgreSQL myself and now using 9.3.4, so I would very much like a patch. Where can I find that ?

 Leif


----- Original Message -----
> Leif Jensen <leif@crysberg.dk> writes:
> >    Could it be related to the OFFSET part of the statement ? I have
> >    another query on the same table without OFFSET, which seems to
> >    work fine.
> 
> Yeah, the specific code path here involves executing a stable (or
> possibly
> immutable) SQL function in a LIMIT or OFFSET clause. I was able to
> reproduce the crash like so:
> 
> create function foo(int) returns int as 'select $1 limit 1'
> language sql stable;
> 
> begin;
> 
> declare c cursor for select * from int8_tbl limit foo(3);
> 
> select * from c;
> 
> move backward all in c;
> 
> select * from c;
> 
> commit;
> 
> You might be able to dodge the problem if you can make the SQL
> function
> inline-able (the LIMIT 1 in my example is just to prevent that from
> happening). A less appealing alternative is to mark the function
> VOLATILE, which I think would also prevent this crash, but might have
> negative performance consequences.
> 
> If you don't mind building your own PG then you could grab the actual
> fix
> from our git repo; I should have something committed before long.
> 
> regards, tom lane


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



view thread (16+ messages)  latest in thread

Message-ID: <7070852.11378.1399557549199.JavaMail.root@quick>
Permalink:  ../7070852.11378.1399557549199.JavaMail.root@quick/
Also on:    postgresql.org/message-id/7070852.11378.1399557549199.JavaMail.root@quick

 · 

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-bugs@postgresql.org
  Cc: leif@crysberg.dk, tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, pgsql-general@postgresql.org
  Subject: Re: Server process crash - Segmentation fault
  In-Reply-To: <7070852.11378.1399557549199.JavaMail.root@quick>
  References: <31796.1399484383@sss.pgh.pa.us> <7070852.11378.1399557549199.JavaMail.root@quick>

* 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