{"id":19621,"date":"2022-10-10T08:25:25","date_gmt":"2022-10-10T06:25:25","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=19621"},"modified":"2022-10-10T08:25:25","modified_gmt":"2022-10-10T06:25:25","slug":"postgresql-from-source-on-openbsd","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/","title":{"rendered":"PostgreSQL from source on OpenBSD"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In the <a href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/\" target=\"_blank\" rel=\"noreferrer noopener\">last post<\/a> we&#8217;ve seen that it is quite easy to get started with PostgreSQL on OpenBSD when you install from the provided packages. The downside of this was, that not the latest version of PostgreSQL was provided, 14.2 instead of 14.5, which is the current version as of today. If you want to stay more up to date, and you really should, then you can always install PostgreSQL from source code for your own.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll start again from a fresh installation but this time, the latest patches are already applied. As we need a group and a user to run PostgreSQL let&#8217;s create those:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nopenbsd-latest$ groupadd -g 1000 postgres\nopenbsd-latest$ useradd -g postgres -d \/home\/postgres\/ -m -u 1000 postgres\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As there is no <a href=\"https:\/\/en.wikipedia.org\/wiki\/Sudo\" target=\"_blank\" rel=\"noreferrer noopener\">sudo<\/a> in OpenBSD we need to configure <a href=\"https:\/\/en.wikipedia.org\/wiki\/Doas\" target=\"_blank\" rel=\"noreferrer noopener\">doas<\/a>, that makes life a bit easier because we do not need to switch accounts for root related tasks:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ cat \/etc\/doas.conf                                                                                                                 \npermit postgres as root\npermit nopass keepenv postgres\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Once we have that we need to download and extract the PostgreSQL source code. I&#8217;ll use <a href=\"https:\/\/en.wikipedia.org\/wiki\/Wget\" target=\"_blank\" rel=\"noreferrer noopener\">wget<\/a> for that:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,2,5,6,7,8]; title: ; notranslate\" title=\"\">\nopenbsd-latest$ su - postgres\nopenbsd-latest$ doas pkg_add wget                                                                                                                  \nquirks-5.5 signed on 2022-10-08T12:25:54Z\nwget-1.21.3: ok\nopenbsd-latest$ wget https:\/\/ftp.postgresql.org\/pub\/source\/v15rc2\/postgresql-15rc2.tar.bz2\nopenbsd-latest$ bunzip2 postgresql-15rc2.tar.bz2                                                                                                   \nopenbsd-latest$ tar xf postgresql-15rc2.tar                                                                                                        \nopenbsd-latest$ cd postgresql-15rc2  \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Our Linux, the default configuration we use for the PostgreSQL source code looks like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n.\/configure --prefix=${PGHOME} \\\n            --exec-prefix=${PGHOME} \\\n            --bindir=${PGHOME}\/bin \\\n            --libdir=${PGHOME}\/lib \\\n            --sysconfdir=${PGHOME}\/etc \\\n            --includedir=${PGHOME}\/include \\\n            --datarootdir=${PGHOME}\/share \\\n            --datadir=${PGHOME}\/share \\\n            --with-pgport=5432 \\\n            --with-perl \\\n            --with-python \\\n            --with-openssl \\\n            --with-pam \\\n            --with-ldap \\\n            --with-libxml \\\n            --with-libxslt \\\n            --with-segsize=${SEGSIZE} \\\n            --with-blocksize=${BLOCKSIZE} \\\n            --with-llvm LLVM_CONFIG=&#039;\/usr\/bin\/llvm-config&#039; \\\n            --with-uuid=ossp \\\n            --with-lz4 \\\n            --with-zstd \\\n            --with-gssapi \\\n            --with-systemd \\\n            --with-icu \\\n            --with-system-tzdata=\/usr\/share\/zoneinfo\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">What OS packages do we need to get a comparable build on OpenBSD? First of all, there is no PAM authentication on OpenBSD, so we can replace that with &#8220;&#8211;with-bsd-auth&#8221; and there is no <a href=\"https:\/\/en.wikipedia.org\/wiki\/Systemd\" target=\"_blank\" rel=\"noreferrer noopener\">systemd<\/a>, no <a href=\"https:\/\/en.wikipedia.org\/wiki\/Generic_Security_Services_Application_Program_Interface\" target=\"_blank\" rel=\"noreferrer noopener\">gssapi<\/a>, this will give us this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; highlight: [13]; title: ; notranslate\" title=\"\">\n.\/configure --prefix=${PGHOME} \\\n            --exec-prefix=${PGHOME} \\\n            --bindir=${PGHOME}\/bin \\\n            --libdir=${PGHOME}\/lib \\\n            --sysconfdir=${PGHOME}\/etc \\\n            --includedir=${PGHOME}\/include \\\n            --datarootdir=${PGHOME}\/share \\\n            --datadir=${PGHOME}\/share \\\n            --with-pgport=5432 \\\n            --with-perl \\\n            --with-python \\\n            --with-openssl \\\n            --with-bsd-auth \\\n            --with-ldap \\\n            --with-libxml \\\n            --with-libxslt \\\n            --with-segsize=${SEGSIZE} \\\n            --with-blocksize=${BLOCKSIZE} \\\n            --with-llvm LLVM_CONFIG=&#039;\/usr\/bin\/llvm-config&#039; \\\n            --with-uuid=ossp \\\n            --with-lz4 \\\n            --with-zstd \\\n            --with-icu \\\n            --with-system-tzdata=\/usr\/share\/zoneinfo\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Getting this to configure properly, we need these packages:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nopenbsd-latest$ doas pkg_add icu4c lz4 zstd python3 libxml libxslt openldap-client p5-ossp-UUID\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Having that installed, configuration goes fine:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nopenbsd-latest$ PGHOME=\/u01\/app\/postgres\/product\/15\/db_0\/ \nopenbsd-latest$ SEGSIZE=2\nopenbsd-latest$ BLOCKSIZE=8\n.\/configure --prefix=${PGHOME} \\\n            --exec-prefix=${PGHOME} \\\n            --bindir=${PGHOME}\/bin \\\n            --libdir=${PGHOME}\/lib \\\n            --sysconfdir=${PGHOME}\/etc \\\n            --includedir=${PGHOME}\/include \\\n            --datarootdir=${PGHOME}\/share \\\n            --datadir=${PGHOME}\/share \\\n            --with-pgport=5432 \\\n            --with-perl \\\n            --with-python \\\n            --with-openssl \\\n            --with-bsd-auth \\\n            --with-ldap \\\n            --with-libxml \\\n            --with-libxslt \\\n            --with-segsize=${SEGSIZE} \\\n            --with-blocksize=${BLOCKSIZE} \\\n            --with-llvm LLVM_CONFIG=&#039;\/usr\/bin\/llvm-config&#039; \\\n            --with-uuid=ossp \\\n            --with-lz4 \\\n            --with-zstd \\\n            --with-icu \\\n            --with-system-tzdata=\/usr\/share\/zoneinfo\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ll not paste the whole output of this, but the end of the output should look like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nchecking build system type... x86_64-unknown-openbsd7.1\nchecking host system type... x86_64-unknown-openbsd7.1\nchecking which template to use... openbsd\n...\nconfig.status: linking src\/backend\/port\/sysv_sema.c to src\/backend\/port\/pg_sema.c\nconfig.status: linking src\/backend\/port\/sysv_shmem.c to src\/backend\/port\/pg_shmem.c\nconfig.status: linking src\/include\/port\/openbsd.h to src\/include\/pg_config_os.h\nconfig.status: linking src\/makefiles\/Makefile.openbsd to src\/Makefile.port\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Ready to compile:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\nopenbsd-latest$ make all\nYou must use GNU make to build PostgreSQL.\n*** Error 1 in \/home\/postgres\/postgresql-15rc2 (Makefile:47 &#039;all&#039;: @IFS=&#039;:&#039; ;  for dir in $PATH; do  for prog in gmake gnumake make; do  if ...)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">OK, this seems to be obvious, we need <a href=\"https:\/\/www.gnu.org\/software\/make\/\" target=\"_blank\" rel=\"noreferrer noopener\">GNU Make<\/a> for this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,4]; title: ; notranslate\" title=\"\">\nopenbsd-latest$ doas pkg_add gmake\nquirks-5.5 signed on 2022-10-08T12:25:54Z\ngmake-4.3: ok\nopenbsd-latest$ gmake all   \n...\ngmake&#x5B;1]: Entering directory &#039;\/home\/postgres\/postgresql-15rc2\/config&#039;\ngmake&#x5B;1]: Nothing to be done for &#039;all&#039;.\ngmake&#x5B;1]: Leaving directory &#039;\/home\/postgres\/postgresql-15rc2\/config&#039;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">&nbsp;Done, so install and add the extensions, but first create the directory structure. Here you have the choice, we&#8217;ll usually do it like this to make it easier for our service desk to work on both, Oracle and PostgreSQL:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nopenbsd-latest$ doas mkdir -p \/u01\/app\/postgres\/local\nopenbsd-latest$ doas mkdir \/u02\nopenbsd-latest$ doas mkdir \/u99\nopenbsd-latest$ doas chown -R postgres:postgres \/u01\/\nopenbsd-latest$ doas chown postgres:postgres \/u02\nopenbsd-latest$ doas chown postgres:postgres \/u99\nopenbsd-latest$ doas chmod 770 \/u01\/app\/postgres\nopenbsd-latest$ doas chmod 770 \/u02\nopenbsd-latest$ doas chmod 770 \/u99\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The last steps to do for bringing the PostgreSQL server and the extensions onto the system:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,7,8]; title: ; notranslate\" title=\"\">\nopenbsd-latest$ doas ln -s \/usr\/local\/bin\/llvm-lto \/usr\/bin\/llvm-lto  \nopenbsd-latest$ gmake install         \nUsing GNU make found at \/usr\/local\/bin\/gmake\n\/usr\/local\/bin\/gmake -C .\/src\/backend generated-headers\ngmake&#x5B;1]: Entering directory &#039;\/home\/postgres\/postgresql-15rc2\/src\/backend&#039;\n\/usr\/local\/bin\/gmake -C catalog distprep generated-header-symlinks\nopenbsd-latest$ cd contrib\/                                                                                                                        \nopenbsd-latest$ gmake install                                                                                                                      \ngmake -C ..\/src\/backend generated-headers\ngmake&#x5B;1]: Entering directory &#039;\/home\/postgres\/postgresql-15rc2\/src\/backend&#039;\ngmake -C catalog distprep generated-header-symlinks\ngmake&#x5B;2]: Entering directory &#039;\/home\/postgres\/postgresql-15rc2\/src\/backend\/catalog&#039;\n...\ncd &#039;\/u01\/app\/postgres\/product\/15\/db_0\/\/lib\/bitcode&#039; &amp;&amp; \/usr\/bin\/llvm-lto -thinlto -thinlto-action=thinlink -o ltree_plpython3.index.bc ltree_plpython3\/ltree_plpython.bc\ngmake&#x5B;1]: Leaving directory &#039;\/home\/postgres\/postgresql-15rc2\/contrib\/ltree_plpython&#039;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Done. Initializing the cluster is nothing special:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ \/u01\/app\/postgres\/product\/15\/db_0\/bin\/initdb -D \/u02\/pgdata\/15\/PG1\nThe files belonging to this database system will be owned by user &quot;postgres&quot;.\nThis user must also own the server process.\n\nThe database cluster will be initialized with locale &quot;C&quot;.\nThe default database encoding has accordingly been set to &quot;SQL_ASCII&quot;.\nThe default text search configuration will be set to &quot;english&quot;.\n\nData page checksums are disabled.\n\ncreating directory \/u02\/pgdata\/15\/PG1 ... ok\ncreating subdirectories ... ok\nselecting dynamic shared memory implementation ... posix\nselecting default max_connections ... 20\nselecting default shared_buffers ... 128MB\nselecting default time zone ... Europe\/Berlin\ncreating configuration files ... ok\nrunning bootstrap script ... ok\nperforming post-bootstrap initialization ... ok\nsyncing data to disk ... ok\n\ninitdb: warning: enabling &quot;trust&quot; authentication for local connections\ninitdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.\n\nSuccess. You can now start the database server using:\n\n    \/u01\/app\/postgres\/product\/15\/db_0\/bin\/pg_ctl -D \/u02\/pgdata\/15\/PG1 -l logfile start\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The last step is to create a service, so PostgreSQL will start automatically when the system comes up. How does that work on OpenBSD. We&#8217;ve already seen in the <a href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/\" target=\"_blank\" rel=\"noreferrer noopener\">last post<\/a> that OpenBSD uses <a href=\"https:\/\/man.openbsd.org\/rc\" target=\"_blank\" rel=\"noreferrer noopener\">rc<\/a> to manage system daemons. All we need to do is to create a script like this in \/etc\/rc.d (this is stolen from the PostgreSQL packages):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ cat \/etc\/rc.d\/postgres\n#!\/bin\/ksh\n\ndaemon=&quot;\/u01\/app\/postgres\/product\/15\/db_0\/bin\/pg_ctl&quot;\ndaemon_flags=&quot;-D \/u02\/pgdata\/15\/PG1\/ -w -l \/u02\/pgdata\/15\/PG1\/log\/postgresql.log&quot;\ndaemon_user=&quot;postgres&quot;\ndaemon_timeout=300\n\n. \/etc\/rc.d\/rc.subr\n\nrc_usercheck=NO\n\nrc_check() {\n        ${rcexec} &quot;${daemon} status ${daemon_flags}&quot;\n}\n\nrc_reload() {\n        ${rcexec} &quot;${daemon} reload ${daemon_flags}&quot;\n}\n\nrc_start() {\n        ${rcexec} &quot;${daemon} start ${daemon_flags}&quot;\n}\n\nrc_stop() {\n        ${rcexec} &quot;${daemon} stop ${daemon_flags} -m fast&quot; || \\\n                ${rcexec} &quot;${daemon} stop ${daemon_flags} -m immediate&quot;\n}\n\nrc_cmd $1\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Enable and start the service, and that&#8217;s it:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nopenbsd-latest# chmod 755 \/etc\/rc.d\/postgres                                                                                                                 \nopenbsd-latest# rcctl enable postgres \nopenbsd-latest# rcctl start postgres \nopenbsd-latest# \/u01\/app\/postgres\/product\/15\/db_0\/bin\/psql -U postgres postgres\npsql (15rc2)\nType &quot;help&quot; for help.\n\npostgres=# \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Conclusion: We anyway prefer to install PostgreSQL from source code, because in that case we are independent from the package manager, whatever it is. In the case of OpenBSD it seems to be even more important, because the packages provided by the OS do not reflect the latest PostgreSQL minor version. Doing it that way is quite simple, once you figured out the required dependencies and how the <a href=\"https:\/\/man.openbsd.org\/init.8\" target=\"_blank\" rel=\"noreferrer noopener\">init<\/a> systems works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the last post we&#8217;ve seen that it is quite easy to get started with PostgreSQL on OpenBSD when you install from the provided packages. The downside of this was, that not the latest version of PostgreSQL was provided, 14.2 instead of 14.5, which is the current version as of today. If you want to&hellip;&nbsp;<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133],"tags":[2718,2719],"class_list":["post-19621","post","type-post","status-publish","format-standard","category-database","tag-bsd","tag-openbsd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PostgreSQL from source on OpenBSD - dbi services Blog<\/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:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL from source on OpenBSD\" \/>\n<meta property=\"og:description\" content=\"In the last post we&#8217;ve seen that it is quite easy to get started with PostgreSQL on OpenBSD when you install from the provided packages. The downside of this was, that not the latest version of PostgreSQL was provided, 14.2 instead of 14.5, which is the current version as of today. If you want to&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-10T06:25:25+00:00\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\"},\"headline\":\"PostgreSQL from source on OpenBSD\",\"datePublished\":\"2022-10-10T06:25:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/\"},\"wordCount\":475,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"keywords\":[\"BSD\",\"OpenBSD\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/\",\"name\":\"PostgreSQL from source on OpenBSD - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2022-10-10T06:25:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-source-on-openbsd\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL from source on OpenBSD\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"caption\":\"Open source Team\"},\"description\":\"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PostgreSQL from source on OpenBSD - dbi services Blog","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:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL from source on OpenBSD","og_description":"In the last post we&#8217;ve seen that it is quite easy to get started with PostgreSQL on OpenBSD when you install from the provided packages. The downside of this was, that not the latest version of PostgreSQL was provided, 14.2 instead of 14.5, which is the current version as of today. If you want to&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2022-10-10T06:25:25+00:00","author":"Open source Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Open source Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a"},"headline":"PostgreSQL from source on OpenBSD","datePublished":"2022-10-10T06:25:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/"},"wordCount":475,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"keywords":["BSD","OpenBSD"],"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/","name":"PostgreSQL from source on OpenBSD - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2022-10-10T06:25:25+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-source-on-openbsd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL from source on OpenBSD"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","caption":"Open source Team"},"description":"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.","url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/19621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=19621"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/19621\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=19621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=19621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=19621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}