Re: Introduce psystem() to replace system()

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jonathan Gonzalez V(dot)" <jonathan(at)abdiel(dot)eu>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Introduce psystem() to replace system()
Date: 2026-08-12 17:05:36
Message-ID: bf4e5496-ec09-429e-b8df-7d450c721154@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-08-12 17:12:26 Re: Introduce psystem() to replace system()
Previous Message Matthias van de Meent 2026-08-12 16:36:53 Re: SQL-level pg_datum_image_equal