{"id":228,"date":"2021-03-10T09:08:42","date_gmt":"2021-03-10T08:08:42","guid":{"rendered":"https:\/\/ptdb.ch\/?p=228"},"modified":"2021-03-10T09:08:42","modified_gmt":"2021-03-10T08:08:42","slug":"postgresql-do-i-need-to-relink-recompile-postgresql-after-os-upgrade-from-rhel-8-2-to-8-3","status":"publish","type":"post","link":"https:\/\/ptdb.ch\/?p=228","title":{"rendered":"PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3?"},"content":{"rendered":"<p>To answer that question immediately. In most cases you don&#8217;t need to Relink\/Recompile PostgreSQL after an OS upgrade. However, there are exceptions, e.g. if you are using PostgreSQL with the JIT feature. Recently I did an OS Upgrade from RHEL 8.2 to 8.3 including the Kernel update from 4.18.0-193.14.3.el8_2.x86_64 to 4.18.0-240.8.1.el8_3.x86_64. What I didn&#8217;t noticed immediately, was that the llvm was upgraded as well. From Version 9.x to 10.x.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ rpm -qa | grep llvm\nllvm-devel-10.0.1-3.module+el8.3.0+7719+53d428de.x86_64\nllvm-10.0.1-3.module+el8.3.0+7719+53d428de.x86_64\nllvm-libs-10.0.1-3.module+el8.3.0+7719+53d428de.x86_64\n<\/pre>\n<p>In case you want to learn more about LLVM you might want to check out the following page: <a href=\"https:\/\/llvm.org\/\">https:\/\/llvm.org\/<\/a><\/p>\n<p>Remember that PostgreSQL has builtin support to perform JIT compilation using LLVM when PostgreSQL is built with &#8211;with-llvm. Check out the following page to learn more about it.<br \/>\n<a href=\"https:\/\/www.postgresql.org\/docs\/12\/jit-reason.html\">https:\/\/www.postgresql.org\/docs\/12\/jit-reason.html<\/a><\/p>\n<p>So &#8230; if you have compiled PostgreSQL with LLVM, and you upgrade your OS (which might come with new LLVM libs), you need to relink\/recompile PostgreSQL. If you do not relink it, you might end up with the following ERROR&#8217;s.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n2021-03-09 15:17:23.156 CET &#x5B;113465] ERROR:  could not load library &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;: libLLVM-9.so: cannot open shared object file: No such file or directory\n2021-03-09 15:17:23.156 CET &#x5B;103680] ERROR:  could not load library &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;: libLLVM-9.so: cannot open shared object file: No such file or directory\n2021-03-09 15:17:23.156 CET &#x5B;113466] ERROR:  could not load library &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;: libLLVM-9.so: cannot open shared object file: No such file or directory\n2021-03-09 15:17:23.156 CET &#x5B;113467] ERROR:  could not load library &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;: libLLVM-9.so: cannot open shared object file: No such file or directory\n2021-03-09 15:17:37.303 CET &#x5B;113689] ERROR:  could not load library &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;: libLLVM-9.so: cannot open shared object file: No such file or directory\n2021-03-09 15:17:37.303 CET &#x5B;103680] ERROR:  could not load library &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;: libLLVM-9.so: cannot open shared object file: No such file or directory\n2021-03-09 15:17:37.303 CET &#x5B;113691] ERROR:  could not load library &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;: libLLVM-9.so: cannot open shared object file: No such file or directory\n2021-03-09 15:17:37.303 CET &#x5B;113690] ERROR:  could not load library &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;: libLLVM-9.so: cannot open shared object file: No such file or directory\n<\/pre>\n<p>By double checking it with the command ldd, you can see that the shared object libLLVM-9.so is indeed not available.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ ldd &quot;\/app\/lib\/postgres\/pgproduct\/pg-12.4\/lib\/llvmjit.so&quot;\n        linux-vdso.so.1 (0x00007fffaf52f000)\n        libLLVM-9.so =&gt; not found\n        libstdc++.so.6 =&gt; \/lib64\/libstdc++.so.6 (0x0000150578d40000)\n        libgcc_s.so.1 =&gt; \/lib64\/libgcc_s.so.1 (0x0000150578b28000)\n        libc.so.6 =&gt; \/lib64\/libc.so.6 (0x0000150578765000)\n        libm.so.6 =&gt; \/lib64\/libm.so.6 (0x00001505783e3000)\n        \/lib64\/ld-linux-x86-64.so.2 (0x00001505792f4000)\n<\/pre>\n<p>To correct this issue, you have two possibilities. The first one is to compile your software again with the new Kernel and LLVM libraries.<\/p>\n<p>https:\/\/ptdb.ch\/2020\/10\/26\/how-to-compile-postgresql-13-on-centos-8-2\/<\/p>\n<p>Or to disable JIT by changing the following parameter in the postgresql.conf file<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\njit = off\n<\/pre>\n<p>Turning this option off is an online operation. It just requires a reload of your configuration.<\/p>\n<h3>Conclusion<\/h3>\n<p>In case you are not using PostgreSQL with JIT, you don&#8217;t need to relink your PostgreSQL software. However, if you are using JIT, which is available since PostgreSQL 11, you need to relink\/re-compile your software, or to temporarily disable JIT.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To answer that question immediately. In most cases you don&#8217;t need to Relink\/Recompile PostgreSQL after an OS upgrade. However, there are exceptions, e.g. if you are using PostgreSQL with the JIT feature. Recently I did an OS Upgrade from RHEL 8.2 to 8.3 including the Kernel update from 4.18.0-193.14.3.el8_2.x86_64 to 4.18.0-240.8.1.el8_3.x86_64. What I didn&#8217;t noticed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[6,7],"tags":[21],"class_list":["post-228","post","type-post","status-publish","format-standard","hentry","category-postgresql","category-red-hat","tag-postgresql","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3? - ptdb - Platinum DB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ptdb.ch\/?p=228\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3? - ptdb - Platinum DB\" \/>\n<meta property=\"og:description\" content=\"To answer that question immediately. In most cases you don&#8217;t need to Relink\/Recompile PostgreSQL after an OS upgrade. However, there are exceptions, e.g. if you are using PostgreSQL with the JIT feature. Recently I did an OS Upgrade from RHEL 8.2 to 8.3 including the Kernel update from 4.18.0-193.14.3.el8_2.x86_64 to 4.18.0-240.8.1.el8_3.x86_64. What I didn&#8217;t noticed [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ptdb.ch\/?p=228\" \/>\n<meta property=\"og:site_name\" content=\"ptdb - Platinum DB\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-10T08:08:42+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ptdb.ch\/?p=228\",\"url\":\"https:\/\/ptdb.ch\/?p=228\",\"name\":\"PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3? - ptdb - Platinum DB\",\"isPartOf\":{\"@id\":\"https:\/\/ptdb.ch\/#website\"},\"datePublished\":\"2021-03-10T08:08:42+00:00\",\"author\":{\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b\"},\"breadcrumb\":{\"@id\":\"https:\/\/ptdb.ch\/?p=228#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ptdb.ch\/?p=228\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ptdb.ch\/?p=228#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ptdb.ch\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ptdb.ch\/#website\",\"url\":\"https:\/\/ptdb.ch\/\",\"name\":\"ptdb - Platinum DB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ptdb.ch\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ptdb.ch\"],\"url\":\"https:\/\/ptdb.ch\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3? - ptdb - Platinum DB","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ptdb.ch\/?p=228","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3? - ptdb - Platinum DB","og_description":"To answer that question immediately. In most cases you don&#8217;t need to Relink\/Recompile PostgreSQL after an OS upgrade. However, there are exceptions, e.g. if you are using PostgreSQL with the JIT feature. Recently I did an OS Upgrade from RHEL 8.2 to 8.3 including the Kernel update from 4.18.0-193.14.3.el8_2.x86_64 to 4.18.0-240.8.1.el8_3.x86_64. What I didn&#8217;t noticed [&hellip;]","og_url":"https:\/\/ptdb.ch\/?p=228","og_site_name":"ptdb - Platinum DB","article_published_time":"2021-03-10T08:08:42+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ptdb.ch\/?p=228","url":"https:\/\/ptdb.ch\/?p=228","name":"PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3? - ptdb - Platinum DB","isPartOf":{"@id":"https:\/\/ptdb.ch\/#website"},"datePublished":"2021-03-10T08:08:42+00:00","author":{"@id":"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b"},"breadcrumb":{"@id":"https:\/\/ptdb.ch\/?p=228#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ptdb.ch\/?p=228"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ptdb.ch\/?p=228#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ptdb.ch\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL: Do I Need To Relink\/Recompile PostgreSQL after OS Upgrade from RHEL 8.2 to 8.3?"}]},{"@type":"WebSite","@id":"https:\/\/ptdb.ch\/#website","url":"https:\/\/ptdb.ch\/","name":"ptdb - Platinum DB","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ptdb.ch\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ptdb.ch\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/ptdb.ch"],"url":"https:\/\/ptdb.ch\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts\/228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=228"}],"version-history":[{"count":0,"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts\/228\/revisions"}],"wp:attachment":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}