Re: pg_basebackup and error messages dependent on the order of the arguments - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_basebackup and error messages dependent on the order of the arguments
Date
Msg-id 1483128.1727716542@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_basebackup and error messages dependent on the order of the arguments  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_basebackup and error messages dependent on the order of the arguments
List pgsql-hackers
I wrote:
> As this example shows, we really ought to validate the compression
> argument on sight in order to get sensible error messages.  The
> trouble is that for server-side compression the code wants to just
> pass the string through to the server and not form its own opinion
> as to whether it's a known algorithm.

> Perhaps it would help if we simply rejected strings beginning
> with a dash?  I haven't tested, but roughly along the lines of

Taking a closer look, many of the other switches-requiring-an-argument
also just absorb "optarg" without checking its value till much later,
so I'm not sure how far we could move the needle by special-casing
--compress.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.
Next
From: Laurenz Albe
Date:
Subject: Re: On disable_cost