{"id":19614,"date":"2022-10-09T09:44:08","date_gmt":"2022-10-09T07:44:08","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=19614"},"modified":"2022-10-09T09:44:08","modified_gmt":"2022-10-09T07:44:08","slug":"postgresql-from-packages-on-openbsd","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/","title":{"rendered":"PostgreSQL from packages on OpenBSD"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Almost all of our customers run PostgreSQL on one of the distributions of Linux, either installed from packages or from source code. But there is not only Linux, there a various flavors of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Berkeley_Software_Distribution\" target=\"_blank\" rel=\"noreferrer noopener\">BSD<\/a> you can also run PostgreSQL on. So, if you want to have something more UNIX like, <a href=\"https:\/\/www.openbsd.org\" target=\"_blank\" rel=\"noreferrer noopener\">OpenBSD<\/a> can be an option. This flavor of BSD is fully open source, like <a href=\"https:\/\/www.freebsd.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">FreeBSD<\/a> or <a href=\"https:\/\/netbsd.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">NetBSD<\/a>, and the projects main focus is on security, correctness and cryptography. In fact, <a href=\"https:\/\/en.wikipedia.org\/wiki\/OpenSSH\" target=\"_blank\" rel=\"noreferrer noopener\">OpenSSH<\/a> is coming from OpenBSD. So why not use it for running  PostgreSQL?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ll not describe the installation of OpenBSD as it is a really simple text based process. You can mainly go with the default options and after a few minutes the OS is up and running. I&#8217;ve done it using <a href=\"https:\/\/en.wikipedia.org\/wiki\/Kernel-based_Virtual_Machine\" target=\"_blank\" rel=\"noreferrer noopener\">KVM<\/a> and if you also do it virtualized, make sure that you enable the OpenSSH daemon during the installation so you can connect remotely. Working in the the KVM console is not much fun.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As always on a fresh installation, one of the first steps you should do is to install the latest patches. On OpenBSD this is done with <a href=\"https:\/\/man.openbsd.org\/syspatch\" target=\"_blank\" rel=\"noreferrer noopener\">syspatch<\/a>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,6]; title: ; notranslate\" title=\"\">\nopenbsd-latest$ syspatch\nGet\/Verify syspatch71-001_wifi.tgz 100% |***********************************************************************************|  4423 KB    00:02    \nInstalling patch 001_wifi\nsyspatch: updated itself, run it again to install missing patches\nRelinking to create unique kernel... done; reboot to load the new kernel\nopenbsd-latest$ syspatch\nGet\/Verify syspatch71-002_ipsec.tgz 100% |**********************************************************************************| 93708       00:00    \nInstalling patch 002_ipsec\nGet\/Verify syspatch71-003_kqueue.tgz 100% |*********************************************************************************|   126 KB    00:00    \nInstalling patch 003_kqueue\nGet\/Verify syspatch71-004_asn1.tgz 100% |***********************************************************************************| 15815 KB    00:04    \nInstalling patch 004_asn1\nGet\/Verify syspatch71-005_pppoe.tgz 100% |**********************************************************************************| 61252       00:00    \nInstalling patch 005_pppoe\nGet\/Verify syspatch71-006_xserver... 100% |*********************************************************************************|  4386 KB    00:02    \nInstalling patch 006_xserver\nGet\/Verify syspatch71-007_cron.tgz 100% |***********************************************************************************| 21179       00:00    \nInstalling patch 007_cron\nGet\/Verify syspatch71-008_bgpd.tgz 100% |***********************************************************************************|   199 KB    00:00    \nInstalling patch 008_bgpd\nGet\/Verify syspatch71-009_zlib.tgz 100% |***********************************************************************************|   491 KB    00:00    \nInstalling patch 009_zlib\nGet\/Verify syspatch71-010_expat.tgz 100% |**********************************************************************************|   649 KB    00:00    \nInstalling patch 010_expat\nGet\/Verify syspatch71-011_smtpd.tgz 100% |**********************************************************************************|   223 KB    00:00    \nInstalling patch 011_smtpd\nRelinking to create unique kernel... done; reboot to load the new kernel\nErrata can be reviewed under \/var\/syspatch\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Here I&#8217;ve done it twice because the first execution updated syspatch itself and the second one applied the patches. I&#8217;ll skip the reboot mentioned at the end of the output, as it is not important for the scope of this post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, let&#8217;s check if OpenBSD comes with pre-packed version of PostgreSQL. By default, packages (or ports) are fetched from here:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ cat \/etc\/installurl\nhttps:\/\/cdn.openbsd.org\/pub\/OpenBSD\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Searching for PostgreSQL packages like this does not give any result:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nopenbsd-latest$ pkg_info PostgreSQL\nopenbsd-latest$ pkg_info postgresql  \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">A more convenient way to search for packages is to use pkglocate, but this is not installed by default:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ which pkglocate\nwhich: pkglocate: Command not found.\nopenbsd-latest$ pkg_add pkglocatedb  \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Once it is there you get impressive number of results:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest# pkglocate postgres | wc -l \n    7205\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Stripping that down a bit gives a good overview on what is available:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ pkglocate postgresql | awk -F &#039;:&#039; &#039;{print $1}&#039; | uniq | sort\nakonadi-21.12.2\nansible-5.5.0\narchitect-1.0.6p9\naugeas-1.12.0p1\nautoconf-archive-2021.02.19\nbacula-pgsql-11.0.6\nborgmatic-1.5.23\ncitus-10.2.3\ncollectd-5.8.1p0\ncollectd-pgsql-5.8.1p0\ndokuwiki-2020.07.29p0\ndovecot-postgresql-2.3.18v0\nexim-4.95p1-mysql-postgresql-ldap\nexim-4.95p1-postgresql\nfilebeat-7.10.2p0\nfreebasic-1.05.0p1\nfreeradius-pgsql-3.0.25\ngerbil-0.16p0\ngoogle-cloud-sdk-379.0.0\ngrafana-7.5.11\nkamailio-postgresql-5.4.5\nkdb-3.2.0p2\nkea-2.0.2-postgresql\nkexi-3.2.0p4\nkibana-7.10.0\nlibrenms-22.3.0p0v0\nlibreoffice-7.3.2.2v0\nlogstash-7.10.0v0\nlua52dbi-pgsql-0.6p1\nlua53dbi-pgsql-0.6p1\nluadbi-pgsql-0.6p1\nmariadb-tests-10.6.7p0v1\nmetricbeat-7.10.2p0\nmoka-icon-theme-5.4.0p1\nnedit-5.7p1v0\nnetbeans-12.6\nopenfire-4.2.3p1\northanc-plugin-postgresql-2.0p2\nossec-hids-3.0.0p2\np5-CGI-Session-4.48p0\npaper-icon-theme-1.5.0p1\nperdition-pgsql-2.2p3\npg_sqlite_fdw-2.1.1\npg_statsinfo-13.0\npgfouine-1.2p11\npgpool-II-3.7.18p0\npgrouting-3.3.0\npgtap-1.1.0\npmacct-1.7.7-postgresql\npointcloud-1.2.1p0\npostgis-3.2.1p0\npostgresql-client-14.2\npostgresql-contrib-14.2\npostgresql-docs-14.2\npostgresql-odbc-13.02.0000\npostgresql-pg_upgrade-14.2\npostgresql-pllua-2.0.10\npostgresql-plpython-14.2\npostgresql-plr-8.4.1\npostgresql-previous-13.5p0\npostgresql-server-14.2p1\npostgresql_autodoc-1.40p1\npure-ftpd-1.0.49p2-postgresql\npure-ftpd-1.0.49p2-postgresql-virtual_chroot\npy3-alembic-1.7.7\npy3-jedi-0.18.1\npy3-peewee-3.14.8\npy3-sqlalchemy-1.4.31p0\npygeoapi-0.12.0\nqt5-postgresql-5.15.2\nqt6-postgresql-6.0.4p4\nredland-1.0.17p9\nredland-pgsql-1.0.17p9\nrepmgr-5.2.1\nresiprocate-repro-1.12.0p3\nrstudio-1.3.959p5\nruby27-pg-1.3.4\nruby27-sequel-5.54.0\nruby30-pg-1.3.4\nruby30-pygments.rb-0.6.3p1v0\nruby30-sequel-5.54.0\nruby31-pg-1.3.4\nruby31-sequel-5.54.0\nsogo-5.5.1\nsqlmap-1.5.7p0\ntimescaledb-2.6.0\ntraccar-4.15p0\ntrytond-5.0.46p0\ntrytond-5.2.20p1\nunifi-5.14.23p12\nunifi-6.0.45p10\nunifi-7.0.25\nxemacs-21.4.22p32\nxemacs-21.4.22p32-mule\nxxdiff-4.0.1.20170623\nzabbix-proxy-6.0.3-mysql\nzabbix-proxy-6.0.3-pgsql\nzabbix-proxy-6.0.3-sqlite3\nzabbix-server-6.0.3-mysql\nzabbix-server-6.0.3-pgsql\nzsh-5.8.1\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">and You&#8217;ll see the usual suspects like the server and contrib packages, but also <a href=\"https:\/\/github.com\/citusdata\/citus\" target=\"_blank\" rel=\"noreferrer noopener\">Citus<\/a><a href=\"https:\/\/github.com\/timescale\/timescaledb\" target=\"_blank\" rel=\"noreferrer noopener\">, Timescale<\/a>, many other packages you might want to install. The PostgreSQL version seems to be 14.2, which is not the latest one, but there is nothing below PostgreSQL 14, which is good as this is the current major version as of today. Let&#8217;s install the server package and check how it looks like on the system afterwards:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ pkg_add postgresql-server-14.2p1\nquirks-5.5 signed on 2022-10-06T09:54:45Z\npostgresql-server-14.2p1:xz-5.2.5p1: ok\npostgresql-server-14.2p1:libiconv-1.16p0: ok\npostgresql-server-14.2p1:libxml-2.9.13p1: ok\npostgresql-server-14.2p1:postgresql-client-14.2: ok\nuseradd: Warning: home directory `\/var\/postgresql&#039; doesn&#039;t exist, and -m was not specified\npostgresql-server-14.2p1: ok\nRunning tags: ok\nThe following new rcscripts were installed: \/etc\/rc.d\/postgresql\nSee rcctl(8) for details.\nNew and changed readme(s):\n        \/usr\/local\/share\/doc\/pkg-readmes\/postgresql-server\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">This also gave us the client package, which makes sense as we want to use psql. The readme, which is mentioned at the end contains all the instructions to get started with PostgreSQL on OpenBSD. There is even a tuning section inside, and also the procedure how to upgrade to a new major version. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For getting PostgreSQL up and running, this is the procedure (notice the &#8220;_&#8221; at the beginning of the username):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,2,4,5]; title: ; notranslate\" title=\"\">\nopenbsd-latest$ su - _postgresql\nopenbsd-latest$ id\nuid=503(_postgresql) gid=503(_postgresql) groups=503(_postgresql)\nopenbsd-latest$ mkdir \/var\/postgresql\/data\nopenbsd-latest$ initdb -D \/var\/postgresql\/data -U postgres -A scram-sha-256 -E UTF8 -W\nThe files belonging to this database system will be owned by user &quot;_postgresql&quot;.\nThis user must also own the server process.\n\nThe database cluster will be initialized with locale &quot;C&quot;.\nThe default text search configuration will be set to &quot;english&quot;.\n\nData page checksums are disabled.\n\nEnter new superuser password: \nEnter it again: \n\nfixing permissions on existing directory \/var\/postgresql\/data ... 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\nSuccess. You can now start the database server using:\n\n    pg_ctl -D \/var\/postgresql\/data -l logfile start\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Back to the initial output of the package installation: The output also mentioned that new rcscripts script were created:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ ls -l \/etc\/rc.d\/postgresql\n-rwxr-xr-x  1 root  bin  522 Apr  8  2022 \/etc\/rc.d\/postgresql\nopenbsd-latest$ cat \/etc\/rc.d\/postgresql\n#!\/bin\/ksh\n\ndaemon=&quot;\/usr\/local\/bin\/pg_ctl&quot;\ndaemon_flags=&quot;-D \/var\/postgresql\/data -w -l \/var\/postgresql\/logfile&quot;\ndaemon_user=&quot;_postgresql&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<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Enabling and starting the service is just a matter of:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nopenbsd-latest$ rcctl enable postgresql                                                                                                            \nopenbsd-latest$ rcctl start postgresql  \npostgresql(ok)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">From now on it is the usual PostgreSQL stuff:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nopenbsd-latest# su - _postgresql \nopenbsd-latest$ psql -U postgres\nPassword for user postgres: \npsql (14.2)\nType &quot;help&quot; for help.\n\npostgres=# \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Conclusion: Getting started with PostgreSQL on OpenBSD is quite easy. The minor version is not the latest one and I don&#8217;t know how fast the packages are updated usually. Given that the current minor version for 14 is 14.5, it seems the updates are not too frequently. If you want to avoid that, then you need to go for the installation from source code. This is the topic for the next post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Almost all of our customers run PostgreSQL on one of the distributions of Linux, either installed from packages or from source code. But there is not only Linux, there a various flavors of BSD you can also run PostgreSQL on. So, if you want to have something more UNIX like, OpenBSD can be an option.&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-19614","post","type-post","status-publish","format-standard","hentry","category-database","tag-bsd","tag-openbsd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PostgreSQL from packages 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-packages-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 packages on OpenBSD\" \/>\n<meta property=\"og:description\" content=\"Almost all of our customers run PostgreSQL on one of the distributions of Linux, either installed from packages or from source code. But there is not only Linux, there a various flavors of BSD you can also run PostgreSQL on. So, if you want to have something more UNIX like, OpenBSD can be an option.&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-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-09T07:44:08+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-packages-on-openbsd\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-packages-on-openbsd\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\"},\"headline\":\"PostgreSQL from packages on OpenBSD\",\"datePublished\":\"2022-10-09T07:44:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-packages-on-openbsd\\\/\"},\"wordCount\":570,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"keywords\":[\"BSD\",\"OpenBSD\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-packages-on-openbsd\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-packages-on-openbsd\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-packages-on-openbsd\\\/\",\"name\":\"PostgreSQL from packages on OpenBSD - dbi services | Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2022-10-09T07:44:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-packages-on-openbsd\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-packages-on-openbsd\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-from-packages-on-openbsd\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL from packages 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\\\/blog\\\/#organization\"},\"alternateName\":\"dbi Blog\",\"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\\\/blog\\\/#organization\",\"name\":\"dbi services\",\"alternateName\":\"dbi\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"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 specialised 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 packages 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-packages-on-openbsd\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL from packages on OpenBSD","og_description":"Almost all of our customers run PostgreSQL on one of the distributions of Linux, either installed from packages or from source code. But there is not only Linux, there a various flavors of BSD you can also run PostgreSQL on. So, if you want to have something more UNIX like, OpenBSD can be an option.&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/","og_site_name":"dbi services | Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2022-10-09T07:44:08+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-packages-on-openbsd\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a"},"headline":"PostgreSQL from packages on OpenBSD","datePublished":"2022-10-09T07:44:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/"},"wordCount":570,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"keywords":["BSD","OpenBSD"],"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/","name":"PostgreSQL from packages on OpenBSD - dbi services | Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2022-10-09T07:44:08+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-from-packages-on-openbsd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL from packages 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\/blog\/#organization"},"alternateName":"dbi Blog","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\/blog\/#organization","name":"dbi services","alternateName":"dbi","url":"https:\/\/www.dbi-services.com\/blog\/","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 specialised 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\/19614","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=19614"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/19614\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=19614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=19614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=19614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}