Skip to content

Conversation

@Terry1504
Copy link
Contributor

@Terry1504 Terry1504 commented Aug 23, 2024

#583

== repro step ==

as issue described

== compile failure ==

pxf_fragment.c: In function ‘ProcessRequest’:
pxf_fragment.c:547:15: error: ‘RAW_BUF_SIZE’ undeclared (first use in this function)
547 | char buffer[RAW_BUF_SIZE];
| ^~~~~~~~~~~~

== analysis ==

RAW_BUF_SIZE is defined in copyfrom_internal.h

src/include/commands/copyfrom_internal.h:#define RAW_BUF_SIZE 65536 /* we palloc RAW_BUF_SIZE+1 bytes */

in pxf_fragment.c

#if (PG_VERSION_NUM <= 140000)
#include "commands/copyfrom_internal.h"
#endif

PG version is 14.4,

PG_VERSION_NUM is 140004

happen to see below code in pxf_fdw.c

#if (PG_VERSION_NUM >= 140000)
#include "commands/copyfrom_internal.h"
#include "commands/copyto_internal.h"
#endif

the one in pxf_fragment.c looks to be typo

#if (PG_VERSION_NUM <= 140000) ==> should be (PG_VERSION_NUM >= 140000)
#include "commands/copyfrom_internal.h"
#endif

note: git log history for the two files

  • git log pxf_fdw.c

commit 10538ad
Merge: d5573b9 d457cb4
Author: Cloudberry cloudberry@initial.code.dump
Date: Wed Jun 7 08:57:14 2023 +0000

Initial Cloudberry code dump.

commit 7c3ae7b
Author: Ashwin Agrawal aashwin@vmware.com
Date: Tue Jan 12 09:38:40 2021 -0800

Change "ON MASTER" to "ON COORDINATOR" for gpcontrib

Reviewed-by: Jesse Zhang <sbjesse@gmail.com>

commit 19cd1cf
Merge: a714299 9e1c9f9
Author: Heikki Linnakangas hlinnakangas@pivotal.io
Date: Tue Sep 22 18:12:30 2020 +0300

Merge with PostgreSQL version 12 (up to a point between beta2 and beta3).

...

  • git log pxf_fragment.c

commit 10538ad
Merge: d5573b9 d457cb4
Author: Cloudberry cloudberry@initial.code.dump
Date: Wed Jun 7 08:57:14 2023 +0000

Initial Cloudberry code dump.

commit 3b1ada5
Author: Oliver Albertini oalbertini@pivotal.io
Date: Thu Jan 30 15:16:58 2020 -0800

Remove gpcontrib/pxf, rename {,gp}contrib/pxf_fdw

Now that we are moving to FDW, we can remove the old external
table-based PXF module. Since PXF FDW only currently supports Greenplum
(not stand-alone Postgres) `pxf_fdw` should live under `gpcontrib`.

Authored-by: Oliver Albertini <oalbertini@pivotal.io>

(END)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hiiii, @Terry1504 welcome!🎊 Thanks for taking the effort to make our project better! 🙌 Keep making such awesome contributions!

@tuhaihe
Copy link
Member

tuhaihe commented Aug 23, 2024

Hi @Terry1504 welcome to rewrite your commit title and details following this template to make it look clearer. Thanks!

@Terry1504
Copy link
Contributor Author

Hi @Terry1504 welcome to rewrite your commit title and details following this template to make it look clearer. Thanks!

I have closed this one, and submitted a new pull request with respect to the commit template.
#590

@Terry1504 Terry1504 closed this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants