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 1rAzdw-0091P4-K2 for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Dec 2023 21:41:20 +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 1rAzdv-00ClOx-83 for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Dec 2023 21:41:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAzdu-00ClOp-Ub for pgsql-hackers@lists.postgresql.org; Wed, 06 Dec 2023 21:41:18 +0000 Received: from mail-il1-x135.google.com ([2607:f8b0:4864:20::135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rAzds-0098v9-5P for pgsql-hackers@postgresql.org; Wed, 06 Dec 2023 21:41:17 +0000 Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-35d54370b4bso1142225ab.1 for ; Wed, 06 Dec 2023 13:41:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701898875; x=1702503675; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VS+UAQkiHRknoST2cExl+E8yCiZruyTGFlYFA3KeO2Y=; b=fGB1QnmOakt4SLjUMYVwLN6Y9YAGfGLsaRc+0n0GBDDUlDw2tImXIVuzu1X7SEyH7L UuarULCXDQPRxU/4xDWnKfInKct7H1SsK/zrZgSnP6+CViu8jzG1bGB4oYB/C7SXVwvl 8184fgnHVFmt96/HMuKKvS3pbfGSRrUMLpwqs76ky995VGKU28miENmlqzDek5WBLFND k+4HEYeHP9GYQN9araxArosY43qS1zIUxw8qIxiPs/eGu0Wva81l2g0zznJck/fj2c7A 3VzDm8Ekelo2vCSE/W53Xjy2ONZ2P/SwAOTddGcKTvsOeocbD7Q9VfIwPM2Z5KG7iqH0 O6Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701898875; x=1702503675; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VS+UAQkiHRknoST2cExl+E8yCiZruyTGFlYFA3KeO2Y=; b=tallWUfR9eozRhxx7VIB0D1wVRohWru9X1AEEJkJaIggjQ+ANFbVzcPXmRGbdBwlvK yee6lXKiweoPd5tFXlxjSYKGK0v+oRYwEy3/p5g2Cuj28MePlS4fNCQz4WsrajT6XAcu r/jkr0blgBdoEdVsgJhWgzTKMLXCGqVKwAxKZjYZnFjT5E6KMkhDhlPAriKwgDPOX93h oFxrWi2oBpmKgboH+xsZkUFDpxItFrZaMv8NlGM7Ulm68/28HGtFT2d+abk+bGba77Wc P9cHRtqCLA6uInnr+cfnxROnl+/Sbfb5wQPPbL04jZ4xQJPQGfI4RocgRxcggemxL4Su 8QKQ== X-Gm-Message-State: AOJu0YyvLIQudBxrkmvDcFpTmkqhAVTboI3wCX9VQWwZ53ZVcQmU4Rgs /W9U3MsxOQjO2hvwxWbnofk= X-Google-Smtp-Source: AGHT+IHXLBkFg/IYhGEeD1wV595YgOBaz6bAj69cMD+l+f/mmkBbb/yUtv5Pc0p3mLs9iPM7CHwtbg== X-Received: by 2002:a92:d391:0:b0:35d:7e05:8b01 with SMTP id o17-20020a92d391000000b0035d7e058b01mr1632964ilo.106.1701898875368; Wed, 06 Dec 2023 13:41:15 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id u8-20020a92da88000000b0035d65a1ea65sm209699iln.55.2023.12.06.13.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 13:41:14 -0800 (PST) Date: Wed, 6 Dec 2023 15:41:11 -0600 From: Nathan Bossart To: Tom Lane Cc: Joe Conway , Andrew Dunstan , Davin Shearer , PostgreSQL-development Subject: Re: Emitting JSON to file using COPY TO Message-ID: <20231206214111.GA2878164@nathanxps13> References: <7a60faf6-e7f1-419d-aee6-10a78ea2fe81@joeconway.com> <2e7ff718-895d-83fc-46f7-be25e23b23b4@dunslane.net> <1104915.1701877459@sss.pgh.pa.us> <19a5f9d8-bd1f-9!e51-0f5b-510c1189a8a7@dunslane.net> <1110690.1701880139@sss.pgh.pa.us> <20231206163349.GA2873889@nathanxps13> <20231206164439.GC2873889@nathanxps13> <77312d02-9325-4f14-9fe0-2746c2ee12bc@joeconway.com> <1136975.1701894046@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1136975.1701894046@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Dec 06, 2023 at 03:20:46PM -0500, Tom Lane wrote: > If Nathan's perf results hold up elsewhere, it seems like some > micro-optimization around the text-pushing (appendStringInfoString) > might be more useful than caching. The 7% spent in cache lookups > could be worth going after later, but it's not the top of the list. Agreed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com