From: | Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru> |
---|---|
To: | Surafel Temesgen <surafel3000(at)gmail(dot)com>, "asaba(dot)takanori(at)fujitsu(dot)com" <asaba(dot)takanori(at)fujitsu(dot)com> |
Cc: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Anthony Nowocien <anowocien(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Conflict handling for COPY FROM |
Date: | 2020-03-10 17:05:24 |
Message-ID: | 9ffdd63f-a279-99b6-30be-9defe51ea6a1@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 09.03.2020 15:34, Surafel Temesgen wrote:
>
> okay attached is a rebased patch with it
>
+ Portal portal = NULL;
...
+ portal = GetPortalByName("");
+ SetRemoteDestReceiverParams(dest, portal);
I think that you do not need this, since you are using a ready
DestReceiver. The whole idea of passing DestReceiver down to the
CopyFrom was to avoid that code. This unnamed portal is created in the
exec_simple_query [1] and has been already set to the DestReceiver there
[2].
Maybe I am missing something, but I have just removed this code and
everything works just fine.
[1]
https://github.com/postgres/postgres/blob/0a42a2e9/src/backend/tcop/postgres.c#L1178
[2]
https://github.com/postgres/postgres/blob/0a42a2e9/src/backend/tcop/postgres.c#L1226
Regards
--
Alexey Kondratov
Postgres Professional https://www.postgrespro.com
Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2020-03-10 17:19:14 | Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side |
Previous Message | Kuntal Ghosh | 2020-03-10 17:05:05 | Re: backend type in log_line_prefix? |