Re: Introduce psystem() to replace system() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Introduce psystem() to replace system()
Date
Msg-id bf4e5496-ec09-429e-b8df-7d450c721154@eisentraut.org
Whole thread
In response to Re: Introduce psystem() to replace system()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 11.08.26 01:00, Tom Lane wrote:
> However, I think your apparent ambition to have*zero* use of system()
> is a bridge too far.  In particular:
> 
>> There's an important topic related to using shell versus not a shell. In
>> some places like `archive_command` people may use `&&`, but this idea
>> aims to avoid this kind of behavior since it's not secure.
> I think breaking the existing definition of archive_command and
> similar GUCs is a nonstarter.  You're going to make many users
> unhappy and only a tiny minority happier.

Right.  The direction should be, you don't have to use archive_command. 
There is already an alternative in archive_library, or indirectly by 
using something like pg_receivewal.  Similar alternatives could be 
designed for other cases where a shell command appears in a public API.




pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: SQL-level pg_datum_image_equal
Next
From: Andrey Borodin
Date:
Subject: Re: [PATCH]Fix pg_xact corruption from subtransaction abort after subcommit