GitHub user iyerr3 opened a pull request:
https://github.com/apache/madlib/pull/221
Multiple: Hard-wire values for construct_array calls
JIRA: MADLIB-1185
Original investigation and RCA performed by
Nikhil Kak <[email protected]> and
Orhan Kislal <[email protected]>
Multiple modules called get_typlenbyvalalign in the constructor of a
struct, which led to querying the catalog during dlopen. This is frowned
down upon [1] and the problem got exposed in PG10. This commit provides
a temporary solution by hard-wiring the necessary values. This is OK in
these scenarios, since the types used are INT4, INT8 and FLOAT8, all
with fixed, stable storage and alignment patterns. Ideal solution to the
problem is to use MADlib's Allocator::allocateArray instead of the
construct_array functions.
[1]
https://www.postgresql.org/message-id/96420364a3d055172776752a1de80714%40smtp.hushmail.com
Closes #219
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/iyerr3/incubator-madlib bugfix/pg10_type_fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/madlib/pull/221.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #221
----
commit 4874224e529fbfd2b3e3cdd294d276dae20d6df2
Author: Rahul Iyer <riyer@...>
Date: 2017-12-26T19:01:44Z
PGXN: Add newline between files during concat
JIRA: MADLIB-1194
PGXN requires a single SQL file during installation. This is created by
concatenating all our sql_in files together. This was earlier performed
with a simple `cat` command, but that led to an error due to a missing
newline at EOF (MADLIB-1191). This commit avoids such an issue by
explicitly adding a newline during the concatenation. This is performed
by using `awk` instead of `cat`.
Closes #221
----
---