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 1sVsHZ-00C6vf-Gt for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2024 12:36:49 +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 1sVsHX-000xI1-HV for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2024 12:36:47 +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 1sVsHX-000xHt-65 for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2024 12:36:47 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sVsHU-000s5X-AV for pgsql-hackers@postgresql.org; Mon, 22 Jul 2024 12:36:46 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2ef27bfd15bso17412801fa.2 for ; Mon, 22 Jul 2024 05:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1721651803; x=1722256603; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=LXWPD7Am4+T2jrBuJ7k0ozSJRDcoZLlAp2KBSNU8MOo=; b=HjcwoUjCD5hOXmMIMeQsaFTSstO4mZk0WXIb4mGnK2h0rVdrErKThbd+xk9GCGnOwv F6PIgI/ltzQ8+pAzI/2stby2jujcjnrzathiDntm6fCA2Bd9UX70hHjhecW+vwAhGB3p EYAn0m60lY+hzW9wtqtb2+j/7WdBeTWSA3k1SbAq4E9VM+o+sPJZON8toeKq7tWPiZ/r Mdh/CiUhlV9dQlKacSQgmRyTIZLJFzoDGfl6QJLVcmDjQGcwDbAKn13/AmisH1BlRXlg oZalAzGsYoUP+2k4uxnPsk5bD67dbmb7+Hr7UV/i3vtwmE6pPKXvrKWI5yDtdOQXrqGy NzaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721651803; x=1722256603; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LXWPD7Am4+T2jrBuJ7k0ozSJRDcoZLlAp2KBSNU8MOo=; b=ozsmk7ERz0QuxQw042ZSl7vI0CVeJ0pzhw9DtvkV601FqsjxcHml6GdyDKkuUJNRB0 U5RkltPuwawNJ/sHb+L+XK942WAkHrk/D1aPmihGim0jewN4oQ7U5OZHquHNu0aHA2iu COlRDgGGrCqmjaEmD770uMHcmUUs8g1Xpu2mvqRqJ+yDxTE4hvfHtu0pJ7haesR9eqQo qn4Yt2pHqrn2JKdqP2Z2Q9wVIg9wE8GfBISGlCBtZz/DPDpzArgIk/Zwtp/UeZOtgY+Q 51msahK1iuv9Npkj+yxv2PnwD8DxApnwZVgncRsvRMVH6wfaUY+sGloAayQYR0FtxNKR nK7w== X-Forwarded-Encrypted: i=1; AJvYcCWLB2G5+/u+ObU2hfC9ciAKZVq//dHq++kim3cold4yppfqG3jK/TtMTGlG+pol+c3vb4QlUK82uoNl1Mb7whaVGfBxQD7HRzAHG/Gb X-Gm-Message-State: AOJu0YygFxqcRsCiMnO7hpUJ0RdkDx4IXAS6lHWj/6aYNagMR2MJ9G79 ihMw87/N+RS4OPI3UBhWylkp0kmuWKJDbHpsgj/eyY8bQn6UD0CwlcuEYGf/4TtwAEYHUi4VyKQ = X-Google-Smtp-Source: AGHT+IEBl52MP/O9v+uGUMmapbTm6JLKhxuKbawpExOpvSzXcDPW1ZU0hv96kpPUtKx/7QJIk+8tRw== X-Received: by 2002:a2e:98d9:0:b0:2ef:23ec:9357 with SMTP id 38308e7fff4ca-2ef23ec990dmr39858671fa.0.1721651802582; Mon, 22 Jul 2024 05:36:42 -0700 (PDT) Received: from [10.137.0.18] (ip-86-49-229-30.bb.vodafone.cz. [86.49.229.30]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a30a4d6bf8sm6064473a12.18.2024.07.22.05.36.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jul 2024 05:36:42 -0700 (PDT) Message-ID: <9172d4eb-6de0-4c6d-beab-8210b7a2219b@enterprisedb.com> Date: Mon, 22 Jul 2024 14:36:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Make COPY format extendable: Extract COPY TO format implementations To: Sutou Kouhei Cc: andres@anarazel.de, michael@paquier.xyz, sawada.mshk@gmail.com, zhjwpku@gmail.com, andrew@dunslane.net, nathandbossart@gmail.com, pgsql-hackers@postgresql.org References: <20240320.232732.488684985873786799.kou@clear-code.com> <20240410.171626.772425261553816667.kou@clear-code.com> <257d5573-07da-48c3-ac07-e047e7a65e99@enterprisedb.com> <20240722.164540.889091645042390373.kou@clear-code.com> Content-Language: en-US From: Tomas Vondra In-Reply-To: <20240722.164540.889091645042390373.kou@clear-code.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/22/24 09:45, Sutou Kouhei wrote: > Hi Tomas, > > Thanks for joining this thread! > > In <257d5573-07da-48c3-ac07-e047e7a65e99@enterprisedb.com> > "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 19 Jul 2024 14:40:05 +0200, > Tomas Vondra wrote: > >> I think it'd be helpful if you could post a patch status, i.e. a message >> re-explaininig what it aims to achieve, summary of the discussion so >> far, and what you think are the open questions. Otherwise every reviewer >> has to read the whole thread to learn this. > > It makes sense. It seems your questions covers all important > points in this thread. So my answers of your questions > summarize the latest information. > Thanks for the summary/responses. I still think it'd be better to post a summary as a separate message, not as yet another post responding to someone else. If I was reading the thread, I would not have noticed this is meant to be a summary. I'd even consider putting a "THREAD SUMMARY" title on the first line, or something like that. Up to you, of course. As for the patch / decisions, thanks for the responses and explanations. But I still find it hard to review / make judgements about the approach based on the current version of the patch :-( Yes, it's entirely possible earlier versions did something interesting - e.g. it might have implemented the existing formats to the new approach. Or it might have a private pointer in v6. But how do I know why it was removed? Was it because it's unnecessary for the initial version? Or was it because it turned out to not work? And when reviewing a patch, I really don't want to scavenge through old patch versions, looking for random parts. Not only because I don't know what to look for, but also because it'll be harder and harder to make those old versions work, as the patch moves evolves. My suggestions would be to maintain this as a series of patches, making incremental changes, with the "more complex" or "more experimental" parts larger in the series. For example, I can imagine doing this: 0001 - minimal version of the patch (e.g. current v17) 0002 - switch existing formats to the new interface 0003 - extend the interface to add bits needed for columnar formats 0004 - add DML to create/alter/drop custom implementations 0005 - minimal patch with extension adding support for Arrow Or something like that. The idea is that we still have a coherent story of what we're trying to do, and can discuss the incremental changes (easier than looking at a large patch). It's even possible to commit earlier parts before the later parts are quite cleanup up for commit. And some changes changes may not be even meant for commit (e.g. the extension) but as guidance / validation for the earlier parts. I do realize this might look like I'm requiring you to do more work. Sorry about that. I'm just thinking about how to move the patch forward and convince myself the approach is OK. Also, it's what I think works quite well for other patches discussed on this mailing list (I do this for various patches I submitted, for example). And I'm not even sure it actually is more work. As for the performance / profiling issues, I've read the reports and I'm not sure I see something tremendously wrong. Yes, there are differences, but 5% change can easily be noise, shift in binary layout, etc. Unfortunately, there's not much information about what exactly the tests did, context (hardware, ...). So I don't know, really. But if you share enough information on how to reproduce this, I'm willing to take a look and investigate. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company