Creating a C function fails with "ERROR: incompatible library version mismatch (dfmgr.c:367)" in VMware Tanzu Greenplum
search cancel

Creating a C function fails with "ERROR: incompatible library version mismatch (dfmgr.c:367)" in VMware Tanzu Greenplum

book

Article ID: 296616

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

You upgraded Greenplum Database (GPDB) and after your upgrade, you had to recompile the C functions written and used in previous GPDB version. 

Once the C code was recompiled, adding a new function failed with the following error:
gpadmin=# CREATE OR REPLACE FUNCTION hash64(text)
gpadmin-#   RETURNS bigint AS
gpadmin-# '/usr/local/greenplum-db-6.11.1/my_functions/my_functions.so', 'hash64'
gpadmin-#   LANGUAGE c IMMUTABLE STRICT;
ERROR:  incompatible library "/usr/local/greenplum-db-6.11.1/my_functions/my_functions.so": version mismatch (dfmgr.c:367)
DETAIL:  Server version is Greenplum 6.0 (header version: 1), library is PostgreSQL 9.4 (header version: 0).


Environment

Product Version: 6.11

Resolution

Check the md5sum on all hosts to clarify if the newly compiled code is everywhere. You may discover that there is an old version of the code on some of the hosts.

Upload a new compiled version and clarify the newly compiled version of the code is on all of the hosts with the following statements:
gpssh -f hostfile "ls -altrh /usr/local/greenplum-db-6.11.1/my_functions/my_functions.so"
gpssh -f hostfile "md5sum /usr/local/greenplum-db-6.11.1/my_functions/my_functions.so"

Once the new my_functions.so is present on all hosts, the create function statement will work.