Re: BUG #14876: Segmentation fault with JSONB column used in store proc that gets used by view and later altered

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: samuel(dot)horwitz(at)gmail(dot)com
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14876: Segmentation fault with JSONB column used in store proc that gets used by view and later altered
Date: 2017-10-26 19:24:06
Message-ID: CAB7nPqTxBZ5GorM8bejJ0z1aQo0Z93ChRJ9gCV5zu8B=ZrARVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Oct 26, 2017 at 11:40 AM, <samuel(dot)horwitz(at)gmail(dot)com> wrote:
> I have created a public Gist with reproduction steps and dumps, attached
> here:
> https://gist.github.com/samuelhorwitz/0bc77a517238914512fc8cdf50d217cd
>
> Please scroll to the bottom (or click here
> https://gist.github.com/samuelhorwitz/0bc77a517238914512fc8cdf50d217cd#gistcomment-2240442)
> to see my steps.

I haven't looked at this thing in details. But this data may not be
present forever, say github.com is down or is removed from existence.
So if you can, please always attach any self-contained test case in a
way that it is saved in the archives of postgresql.org. In this case,
that would have been to email directly pgsql-bugs instead of using the
website form.

psql -f initial.sql
# This works
psql -c 'SELECT id, json FROM base_table_json'
psql -f break-it.sql
# this breaks
psql -c 'SELECT id, json FROM base_table_json'
psql -f fix-it.sql
# this works
psql -c 'SELECT id, json FROM base_table_json'

This reminds me of this case:
https://www.postgresql.org/message-id/20150707165212.1188.60819@wrigleys.postgresql.org.
The backtrace is not exactly the same, but that's really close.
--
Michael

Attachment Content-Type Size
initial.sql application/octet-stream 1.4 KB
fix-it.sql application/octet-stream 146 bytes
break-it.sql application/octet-stream 383 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2017-10-26 20:23:03 Re: Segmentation fault with JSONB column from view passed into stored PL/PGSQL procedure that builds a new JSON return value
Previous Message Dmitry Dolgov 2017-10-26 19:09:00 Re: BUG #14876: Segmentation fault with JSONB column used in store proc that gets used by view and later altered