BUG #15449: file_fdw using program cause exit code error when using LIMIT

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: eric(dot)cyr(at)gmail(dot)com
Subject: BUG #15449: file_fdw using program cause exit code error when using LIMIT
Date: 2018-10-22 14:00:50
Message-ID: 15449-1cf737dd5929450e@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

The following bug has been logged on the website:

Bug reference: 15449
Logged by: Eric Cyr
Email address: eric(dot)cyr(at)gmail(dot)com
PostgreSQL version: 10.5
Operating system: Ubuntu 16.04.2 LTS (Xenial Xerus)
Description:

CREATE FOREIGN TABLE test_file_fdw_program_limit
(
message text
)
SERVER pg_log_fdw OPTIONS (program 'echo "test"', format 'csv')
;

--

SELECT * FROM test_file_fdw_program_limit;
/*
OK
*/

SELECT * FROM test_file_fdw_program_limit LIMIT 2;
/*
OK
*/

SELECT * FROM test_file_fdw_program_limit LIMIT 0;
/*
[38000] ERROR: program "echo "test"" failed Detail: child process exited
with exit code 1
*/

--

LIMIT 0 is the easiest way we found to reproduce the error, but we
encountered same issue with LIMIT (< file lines) on a program doing an if
exists + file output stream manipulation.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2018-10-22 17:23:20 Re: BUG #15446: Crash on ALTER TABLE
Previous Message PG Bug reporting form 2018-10-22 12:34:14 BUG #15448: server process (PID 22656) was terminated by exception 0xC0000005

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-10-22 14:03:03 Re: CVE-2017-7484-induced bugs, or, btree cmp functions are not leakproof?
Previous Message Tom Lane 2018-10-22 13:46:44 Re: Side effect of CVE-2017-7484 fix?