Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOXdh-0002lT-Ri for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Mar 2021 03:23:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOXdg-0000b6-NS for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Mar 2021 03:23:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOXdg-0000az-8w for pgsql-hackers@lists.postgresql.org; Tue, 23 Mar 2021 03:23:28 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lOXdd-00087W-VV for pgsql-hackers@postgresql.org; Tue, 23 Mar 2021 03:23:27 +0000 Received: by mail-io1-xd33.google.com with SMTP id n21so16230034ioa.7 for ; Mon, 22 Mar 2021 20:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WRUnnZnhNw+tPC41Z47PnLyHIJIrqSjUSJmLkT3YElo=; b=yUOmkXyndtLERpqHvv38PNlFLGMLf29EcyKvxm9JOLSFdI54HoI4OXAOvriam7jpnV OOQx5q8ZZQhUun3I85sg3zbzjXxlf6LSyu4hRX9ybKze24VlExlY4nsIhXG9ny8IWptY 92Ky27BJL9+vGS9jkb4U22w3NIznoAlnt2e2pEmBpYy0dYZxGv5dM0UBALQPZiULSLVV Gs61wHC2uyNmNO06B/IryZ5miSWED0RDt7oGnZrhnW9Tocaj+5XDofyy4KyGkaI8UO6T A++WSTdiGG7wgWjlw43jKmRc2L/BuraVQDlHNwR6oiao5XXarcljqR0XqwubqpNwmMFq Brjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WRUnnZnhNw+tPC41Z47PnLyHIJIrqSjUSJmLkT3YElo=; b=m4XsJ8QvZjdtCmFRD/j4L62NAJai5OKM5Dl7+tagIgVhERnfI0TLIAwu4+Bl8XlddB UiXUtslS1UBT8qGO59gFTcJtU82PzXRNid7vSlpHiPtaZ1Q18Xb9yEGoiEALhrcqH439 OqwfAl8VdGr2bOGmhMj9PcJFV17BX3/gsq6wFhqCK+CKPMOI0EyLKSGZXwItKdzDDeJW tt/wqT8lrmrCtiBTEgB/Dx4isikYz8TZY6nWwQ8lLF4z3Y9xvBxNypz9DcunKaDoXIDB yxqU67/iVKcz9pLb2YnKyVmYcyGseFbinG4NZW4nW2ERYkrLNGlM04w1/r1taA21KPYg thfQ== X-Gm-Message-State: AOAM5309UdY7IQMQ2F5VBzKplofz+M5z6vCoEHzbXtlAyCp0lTbRZft0 1ht0df+2rNCGWo9jjmD+HrqvZA== X-Google-Smtp-Source: ABdhPJwsON5Q54JzsL447xD9HV0a7lULe1mDTSJKHFhhFrjXYGVDhkesh7p4OgFgbDHpAcu8vkH/BA== X-Received: by 2002:a5e:9908:: with SMTP id t8mr2611797ioj.101.1616469804110; Mon, 22 Mar 2021 20:23:24 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id o13sm8177529iob.17.2021.03.22.20.23.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Mar 2021 20:23:23 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id B888F8010CC; Mon, 22 Mar 2021 22:23:22 -0500 (CDT) Date: Mon, 22 Mar 2021 22:23:22 -0500 From: Justin Pryzby To: Zhihong Yu Cc: tsunakawa.takay@fujitsu.com, Andrey Lepikhov , Amit Langote , tanghy.fnst@fujitsu.com, Alexey Kondratov , Michael Paquier , Ashutosh Bapat , Ashutosh Bapat , Etsuro Fujita , pgsql-hackers@postgresql.org, Tomas Vondra , houzj.fnst@fujitsu.com Subject: Re: [POC] Fast COPY FROM command for the table with foreign partitions Message-ID: <20210323032322.GW4203@telsasoft.com> References: <20210303202703.GI29832@telsasoft.com> <20210304203949.GQ29832@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 22, 2021 at 08:18:56PM -0700, Zhihong Yu wrote: > with data_dest_cb callback. It is used for send text representation of a > tuple to a custom destination. > > send text -> sending text I would say "It is used to send the text representation ..." > struct PgFdwModifyState *aux_fmstate; /* foreign-insert state, if > * created */ > + CopyToState cstate; /* foreign COPY state, if used */ > > Since foreign COPY is optional, should cstate be a pointer ? That would be > in line with aux_fmstate. It's actually a pointer: src/include/commands/copy.h:typedef struct CopyToStateData *CopyToState; There's many data structures like this, where a structure is typedefed with a "Data" suffix and the pointer is typedefed without the "Data" -- Justin