Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAud0-008hrs-7g for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Dec 2023 16:20:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rAucy-00B2u4-Tq for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Dec 2023 16:20:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAucy-00B2tn-F5 for pgsql-hackers@lists.postgresql.org; Wed, 06 Dec 2023 16:20:00 +0000 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rAucv-00APqw-Qx for pgsql-hackers@postgresql.org; Wed, 06 Dec 2023 16:19:59 +0000 Received: by mail-qv1-xf36.google.com with SMTP id 6a1803df08f44-67ac0ef6bb8so20641196d6.1 for ; Wed, 06 Dec 2023 08:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1701879596; x=1702484396; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=cz4fnnzko6gSPIcbtmrPvo+ScvafpO+0CYY0SCZ1STo=; b=zvkdSVsnP+mWh8rlkbE7+nLkgtUkZQQMS7SMaQZCVrrewiZreHpACnZhRsFq9HMVVD 25Sl0FxTQoBPfpTi36o/5fdB4QDSKSZ5TU7xslyf4eiyukTFGM4vfT/ff5l9JC1EjM8i bRmSS0A9gS1SiYQ8bYiQiBcaoO5wF7z0+QVXb2oiR4HlDjsx2m/d/LICDRmlpbMaz84b qQ9EqKpIx5lm/sM4lOh6D3eTEFhLBMI6QGHm/mPhyUFxNgot+1eew9YmRO0ooT5PrXYX Oi+SBbUCiNZEBx1Kbp7P1scmunAfHjXZczym7iKMbozNw4du/85n3qup52Asw8fy3G/A UrfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701879596; x=1702484396; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cz4fnnzko6gSPIcbtmrPvo+ScvafpO+0CYY0SCZ1STo=; b=eZJUoH6ftTBdCq2WffK5yL46QxMxYwNBC9xjoBFQCQkuNXCkFtgjOZCxHGcndRh6nn EbFABGbPDmAfJdAX4CkAAB8VcaA5acIwr51e80+197WUylIjcvbg+o+5VsV1P+ZMntQr 5MevZ4SfkKZbd9IsZ9hhwVhLjUXLwNXXXu6seUXN2ceklIlvgXKeBkOjSmGrghwth2hL Can14MTpMCA9wWSDBfZkNu9NbjYmzqmSix6Iu3IpbaZ9oDj4wAtYmTEgJ2EEDHiLfG1D FVLLVvkMwp1qIhL2mlrxqjvJvDXeqk9g1Goqo4P33MkSYTolaJij4pCacooRlJAmfqrX vj6Q== X-Gm-Message-State: AOJu0YxyPaex2cDcOaYXlPIN/1mnhSnjHPUz5LQomoqbshD9kfpooLNw OW4iC5FqmOcC9b04gwNgRBsC5w== X-Google-Smtp-Source: AGHT+IHUMzpE7yhf5Iec+mHsBMM4B7aiMS5SV2hkZ5GsSBbBj8+OXAhnZhRHn+XsBxVVGl4cmuqFMw== X-Received: by 2002:a05:6214:a64:b0:67a:a721:9ec9 with SMTP id ef4-20020a0562140a6400b0067aa7219ec9mr959276qvb.122.1701879596224; Wed, 06 Dec 2023 08:19:56 -0800 (PST) Received: from ?IPV6:2605:a601:91bc:f600::2bb? ([2605:a601:91bc:f600::2bb]) by smtp.googlemail.com with ESMTPSA id k1-20020a056214102100b0067abfe5709dsm81615qvr.139.2023.12.06.08.19.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Dec 2023 08:19:55 -0800 (PST) Message-ID: <19a5f9d8-bd1f-9e51-0f5b-510c1189a8a7@dunslane.net> Date: Wed, 6 Dec 2023 11:19:54 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Content-Language: en-US To: Tom Lane , Joe Conway Cc: Davin Shearer , PostgreSQL-development References: <5c84b70b-ba18-c45d-dbbe-612fa229b2ce@dunslane.net> <398c22f6-4299-4b17-80bf-2f14f4afd592@joeconway.com> <46cc4507-a0d9-4044-b2ce-5a8bca8015c0@joeconway.com> <2554e520-e103-8978-dcb5-807dfeb77402@dunslane.net> <926ff917-8371-40ec-b5e6-ab7b0e09bdc5@joeconway.com> <315b81d4-4b67-7828-0355-3808cd14acd1@dunslane.net> <7a60faf6-e7f1-419d-aee6-10a78ea2fe81@joeconway.com> <2e7ff718-895d-83fc-46f7-be25e23b23b4@dunslane.net> <1104915.1701877459@sss.pgh.pa.us> From: Andrew Dunstan Subject: Re: Emitting JSON to file using COPY TO In-Reply-To: <1104915.1701877459@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-12-06 We 10:44, Tom Lane wrote: > Joe Conway writes: >> I believe this is ready to commit unless there are further comments or >> objections. > I thought we were still mostly at proof-of-concept stage? > > In particular, has anyone done any performance testing? > I'm concerned about that because composite_to_json() has > zero capability to cache any metadata across calls, meaning > there is going to be a large amount of duplicated work > per row. > > Yeah, that's hard to deal with, too, as it can be called recursively. OTOH I'd rather have a version of this that worked slowly than none at all. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com