GitHub user iyerr3 opened a pull request:

    https://github.com/apache/madlib/pull/219

    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/219.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 #219
    
----
commit 44f89c9a1f161c884215b48a99780f01b69bed0d
Author: Rahul Iyer <riyer@...>
Date:   2017-12-21T22:19:44Z

    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

----


---

Reply via email to