Re: Split copy.c

From: Erik Rijkers <er(at)xs4all(dot)nl>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>
Subject: Re: Split copy.c
Date: 2020-11-02 12:24:12
Message-ID: d2034c9d5d1d2b8352d023c51940eaf9@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-11-02 12:19, Heikki Linnakangas wrote:
> On 02/11/2020 11:36, Erik Rijkers wrote:
>> On 2020-11-02 10:03, Heikki Linnakangas wrote:
>>> While looking at the parallel copy patches, it started to annoy me
>>> how
>>> large copy.c is. It confuses my little head. (Ok, it's annoyed me
>>> many
>>> times in the past, but I haven't done anything about it.)
>>
>>> [0001-Split-copy.c-into-...o.c-and-copyfrom.c.patch]
>>
>> There seems to be an oversight of contrib/file_fdw. (debian 10, gcc
>> 8.3.0)
>
> Ah yeah, I missed updating file_fdw. Here's a new patch.

Something still not quite right in the compile-with-assert:

-- [2020.11.02 12:49:12 split_copy/0] make core: make --quiet -j 4
(speed 0=debug_assertions speed 1=fast)

In file included from ../../../src/include/postgres.h:46,
from copyto.c:15:
copyto.c: In function ‘BeginCopyTo’:
copyto.c:477:11: error: ‘is_from’ undeclared (first use in this
function); did you mean ‘is_program’?
Assert(!is_from);
^~~~~~~
../../../src/include/c.h:790:9: note: in definition of macro ‘Assert’
if (!(condition)) \
^~~~~~~~~
copyto.c:477:11: note: each undeclared identifier is reported only once
for each function it appears in
Assert(!is_from);
^~~~~~~
../../../src/include/c.h:790:9: note: in definition of macro ‘Assert’
if (!(condition)) \
^~~~~~~~~
make[3]: *** [../../../src/Makefile.global:921: copyto.o] Error 1
make[2]: *** [common.mk:39: commands-recursive] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:42: all-backend-recurse] Error 2
make: *** [GNUmakefile:11: all-src-recurse] Error 2

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2020-11-02 12:32:05 Re: Split copy.c
Previous Message Pavel Stehule 2020-11-02 12:08:19 patch: reduce overhead of execution of CALL statement in no atomic mode from PL/pgSQL