Re: making the backend's json parser work in frontend code - Mailing list pgsql-hackers

From David Steele
Subject Re: making the backend's json parser work in frontend code
Date
Msg-id dd72960a-6f10-9db6-178d-e06769454142@pgmasters.net
Whole thread Raw
In response to Re: making the backend's json parser work in frontend code  (Andres Freund <andres@anarazel.de>)
Responses Re: making the backend's json parser work in frontend code  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 1/15/20 4:40 PM, Andres Freund wrote:
 >
 > I'm not sure where I come down between using json and a simple ad-hoc
 > format, when the dependency for the former is making the existing json
 > parser work in the frontend. But if the alternative is to add a second
 > json parser, it very clearly shifts towards using an ad-hoc
 > format. Having to maintain a simple ad-hoc parser is a lot less
 > technical debt than having a second full blown json parser.

Maybe at first, but it will grow and become more complex as new features 
are added.  This has been our experience with pgBackRest, at least.

 > Imo even
 > when an external project or three also has to have that simple parser.

I don't agree here.  Especially if we outgrow the format and they need 
two parsers, depending on the version of PostgreSQL.

To do page-level incrementals (which this feature is intended to enable) 
the user will need to be able to associate full and incremental backups 
and the only way I see to do that (currently) is to read the manifests, 
since the prior backup should be stored there.  I think this means that 
parsing the manifest is not really optional -- it will be required to do 
any kind of automation with incrementals.

It's easy enough for a tool like pgBackRest to do something like that, 
much harder for a user hacking together a tool in bash based on 
pg_basebackup.

 > If the alternative were to use that newly proposed json parser to
 > *replace* the backend one too, the story would again be different.

That was certainly not my intention.

Regards,
-- 
-David
david@pgmasters.net



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Enabling B-Tree deduplication by default
Next
From: David Steele
Date:
Subject: Re: making the backend's json parser work in frontend code