JSON_POPULATE_RECORDSET empty array bug

From: Vladimír Houba ml(dot) <vladojr(at)prosoft(dot)sk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: JSON_POPULATE_RECORDSET empty array bug
Date: 2018-12-21 14:35:32
Message-ID: CAP=jTS5vVFFfqes6zz12k1n71tqe-i-2_=YCD==iDv7TPGeAkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

the following command works as expected
SELECT * FROM JSON_POPULATE_RECORDSET(NULL::information_schema.columns,
'[{}]')

but the following command crashes the backend
SELECT * FROM JSON_POPULATE_RECORDSET(NULL::information_schema.columns,
'[]')

server log
2018-12-21 15:34:11.710 CET [581] LOG: server process (PID 26654) was
terminated by signal 11: Segmentation fault
2018-12-21 15:34:11.710 CET [581] DETAIL: Failed process was running:
DECLARE OmniDB_a6dd10a962824e70961053e6809c61fc CURSOR WITH HOLD FOR SELECT
* FROM JSON_POPULATE_RECORDSET(NULL::information_schema.columns, '[]'::JSON)
2018-12-21 15:34:11.710 CET [581] LOG: terminating any other active server
processes
2018-12-21 15:34:11.710 CET [26488] WARNING: terminating connection
because of crash of another server process
2018-12-21 15:34:11.710 CET [26488] DETAIL: The postmaster has commanded
this server process to roll back the current transaction and exit, because
another server process exited abnormally and possibly corrupted shared
memory.
2018-12-21 15:34:11.710 CET [26488] HINT: In a moment you should be able
to reconnect to the database and repeat your command.
2018-12-21 15:34:11.711 CET [26626] rekre(at)rekre WARNING: terminating
connection because of crash of another server process
2018-12-21 15:34:11.711 CET [26626] rekre(at)rekre DETAIL: The postmaster has
commanded this server process to roll back the current transaction and
exit, because another server process exited abnormally and possibly
corrupted shared memory.
2018-12-21 15:34:11.711 CET [26626] rekre(at)rekre HINT: In a moment you
should be able to reconnect to the database and repeat your command.
2018-12-21 15:34:11.714 CET [581] LOG: all server processes terminated;
reinitializing
2018-12-21 15:34:11.737 CET [26655] LOG: database system was interrupted;
last known up at 2018-12-21 15:33:26 CET
2018-12-21 15:34:11.829 CET [26655] LOG: database system was not properly
shut down; automatic recovery in progress
2018-12-21 15:34:11.831 CET [26655] LOG: redo starts at 24/E1C64E90
2018-12-21 15:34:11.831 CET [26655] LOG: invalid record length at
24/E1C64EC8: wanted 24, got 0
2018-12-21 15:34:11.831 CET [26655] LOG: redo done at 24/E1C64E90
2018-12-21 15:34:11.844 CET [581] LOG: database system is ready to accept
connections

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-12-21 15:39:22 Re: JSON_POPULATE_RECORDSET empty array bug
Previous Message Michael Paquier 2018-12-21 07:51:23 Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction