Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iraQ2-0004Hn-GR for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jan 2020 04:36:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iraQ1-0001tH-9w for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jan 2020 04:36:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iraQ0-0001tA-Tm for pgsql-hackers@lists.postgresql.org; Wed, 15 Jan 2020 04:36:37 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iraPx-0000n9-6U for pgsql-hackers@postgresql.org; Wed, 15 Jan 2020 04:36:35 +0000 Received: from Davids-MacBook-Pro.local (ip24-251-133-144.ph.ph.cox.net [24.251.133.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 107D454667; Wed, 15 Jan 2020 04:36:30 +0000 (UTC) Subject: Re: backup manifests To: Stephen Frost , David Fetter Cc: Tom Lane , Robert Haas , Tels , Suraj Kharage , Rushabh Lathia , Andrew Dunstan , PostgreSQL Hackers , Jeevan Chalke , vignesh C References: <20200103170123.GX3195@tamriel.snowman.net> <20200103193559.GY3195@tamriel.snowman.net> <20200108013348.GF3195@tamriel.snowman.net> <00b28009-3781-4c4a-174b-be2c1bc52f27@pgmasters.net> <12445.1579024384@sss.pgh.pa.us> <20200114183312.GF32763@fetter.org> <20200114203540.GC3195@tamriel.snowman.net> From: David Steele Message-ID: <1115c3d4-2d80-8388-4fd4-5fdb3ee9b429@pgmasters.net> Date: Tue, 14 Jan 2020 21:36:30 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200114203540.GC3195@tamriel.snowman.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Stephen, On 1/14/20 1:35 PM, Stephen Frost wrote: > > My thought, which I had expressed to David (though he obviously didn't > entirely agree with me since he suggested the other options), was to > adapt the pgBackRest JSON parser, which isn't really all that much code. It's not that I didn't agree, it's just that the pgBackRest code does use mem contexts, the type system, etc. After looking at some other solutions with similar amounts of code I thought they might be more acceptable. At least it seemed like a good idea to throw it out there. > Even so, David's offered to adjust the code to use the frontend's memory > management (*cough* malloc()..), and error handling/logging, and he had > some idea for Variadics (or maybe just pulling the backend's Datum > system in..? He could answer better), and basically write a frontend > JSON parser for PG without too much code, no external dependencies, and > to make sure it answers this requirement, and I've agreed that he can > spend some time on that instead of pgBackRest to get us through this, if > everyone else is agreeable to the idea. To keep it simple I think we are left with callbacks or a somewhat static "what's the next datum" kind of approach. I think the latter could get us through a release or two while we make improvements. > Obviously this isn't intended > to box anyone in- if there turns out even after the code's been written > to be some fatal issue with using it, so be it, but we're offering to > help. I'm happy to work up a prototype unless the consensus is that we absolutely don't want a second JSON parser in core. Regards, -- -David david@pgmasters.net