{"id":10631,"date":"2023-10-13T10:38:42","date_gmt":"2023-10-13T01:38:42","guid":{"rendered":"https:\/\/www.prime-strategy.co.jp\/column\/archives\/column_10631"},"modified":"2026-02-22T21:03:47","modified_gmt":"2026-02-22T12:03:47","slug":"kusanagi-%ef%bc%99-%e3%81%a7-postgresql-%e3%82%92%e5%88%a9%e7%94%a8%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631","title":{"rendered":"Using PostgreSQL with KUSANAGI 9"},"content":{"rendered":"\n<p>KUSANAGI 9 now supports PostgreSQL versions 14 and 15, allowing users to upgrade PostgreSQL and run CMS platforms like Drupal\u2014not just WordPress\u2014on PostgreSQL. Using the kusanagi dbinit psql and kusanagi upgrade psql commands, you can not only switch the database in use but also upgrade or optimize its configuration.&nbsp;<\/p>\n\n\n\n<p>Keep in mind, however, that switching databases requires a backup, and data migration must be handled manually. Additionally, the kusanagi upgrade psql command supports upgrading PostgreSQL versions, but does not support downgrades.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Back_up_the_database\"><\/span>Back up the database.<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Both kusanagi dbinit psql and kusanagi upgrade psql perform significant changes to your database environment. While KUSANAGI is designed to ensure stability, there is no guarantee that issues won't arise.&nbsp;<\/p>\n\n\n\n<p>Before running either command, you should always back up your database. Here are two common ways to do that:&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Take_a_Snapshot\"><\/span><strong>Take a Snapshot<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Most cloud providers offer a snapshot feature for VM disks. Here's how to do it with major providers:\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">AWS<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to the AWS Console\u00a0<\/li>\n\n\n\n<li>Open the EC2 Dashboard\u00a0<\/li>\n\n\n\n<li>Select \u201cVolumes\u201d from the menu\u00a0<\/li>\n\n\n\n<li>Choose the target volume\u00a0<\/li>\n\n\n\n<li>Click \u201cCreate Snapshot\u201d from the \u201cActions\u201d menu\u00a0<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Azure<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to the Azure Console\u00a0<\/li>\n\n\n\n<li>Select the target Resource Group\u00a0<\/li>\n\n\n\n<li>Choose the target disk\u00a0<\/li>\n\n\n\n<li>Click \u201cCreate Snapshot\u201d from the top menu\u00a0<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">GCP<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to the GCP Console\u00a0<\/li>\n\n\n\n<li>Select the target project\u00a0<\/li>\n\n\n\n<li>Go to \u201cDisks\u201d from the menu\u00a0<\/li>\n\n\n\n<li>Choose the target disk\u00a0<\/li>\n\n\n\n<li>Click \u201cCreate Snapshot\u201d from the top menu\u00a0<\/li>\n<\/ul>\n\n\n\n<p>Snapshots are easy to create and restore. To recover your environment, simply create a disk from the snapshot and attach it to your VM.\u00a0<\/p>\n\n\n\n<p>Thus, the cloud vendor provides the ability to take snapshots of disks, and this feature can be used to easily take snapshots.<\/p>\n\n\n\n<p>If you want to recover, you can create a disk from the snapshot and attach the disk to the target VM to easily restore it to the state where the snapshot was taken.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Take_a_Database_Dump\"><\/span><strong>Take a Database Dump<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You can also export your database as a dump file.\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">MariaDB<\/h4>\n\n\n\n<p>Use mysqldump to export data:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysqldump -h localhost -u root -p (database_name) > (output_file_path) <\/code><\/pre>\n\n\n\n<p>To restore:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p (database_name) &lt; (output_file_path) <\/code><\/pre>\n\n\n\n<p>You'll be prompted to enter the root password when executing each command.\u00a0<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">PostgreSQL<\/h4>\n\n\n\n<p>Use pg_dump to export data:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pg_dump -h localhost -U postgres -d (database_name) > (output_file_path) <\/code><\/pre>\n\n\n\n<p>To restore:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>psql -h localhost -U postgres -d (database_name) -f (output_file_path) <\/code><\/pre>\n\n\n\n<p>Always ensure a backup is taken before changing database settings or versions.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Switching_from_MariaDB_to_PostgreSQL\"><\/span><strong>Switching from MariaDB to PostgreSQL<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If your current setup uses MariaDB and you want to switch to PostgreSQL, you can use the following command:\u00a0<\/p>\n\n\n\n<p>kusanagi dbinit psql\u00a0<\/p>\n\n\n\n<p><strong>Important Note:<\/strong>&nbsp;<br>This command switches the database engine but does <strong>not<\/strong> migrate your data. If you already have data in MariaDB, you\u2019ll need to manually migrate it to PostgreSQL. The same applies when switching back using kusanagi dbinit mariadb.&nbsp;<\/p>\n\n\n\n<p>Let\u2019s say your current environment was initialized with MariaDB:&nbsp;<\/p>\n\n\n\n<p>As you can see, MariaDB 10.5 is installed and PostgreSQL is not. <br>Now we will switch the database to PostgreSQL using <code>kusanagi dbinit psql<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># kusanagi status \n\nKUSANAGI Version 9.4.2-1.el8 \n\n(Cloud name) \n\n \n\n\uff1a \n\n(omission) \n\n\uff1a \n\n*** (active) mariadb : mariadb10.5 *** \n\n* mariadb.service - MariaDB 10.5.22 database server \n\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/mariadb.service; enabled; vendor preset: disabled) \n\n   Active: active (running) since Thu 2023-10-12 14:24:59 JST; 1min 3s ago \n\n \n\n*** (inactive) psql :  *** \n\n \n\n \n\n*** (inactive) pgpool-II :  *** \n\n \n\n\uff1a \n\n(omission) \n\n\uff1a \n\nstatus completed. \n\n# <\/code><\/pre>\n\n\n\n<p>This confirms that MariaDB is active and PostgreSQL is not yet installed.\u00a0<br>Now let\u2019s switch to PostgreSQL 13 using the following command:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># kusanagi dbinit psql --use psql13 --dbrootpass (DB admin user password) \n\nLast metadata expiration check: 0:09:31 ago on Thu Oct 12 14:23:56 2023. \n\npgdg-redhat-repo-latest.noarch.rpm               12 kB\/s |  13 kB     00:01 \n\nDependencies resolved. \n\n================================================================================ \n\n Package                Architecture Version           Repository          Size \n\n================================================================================ \n\nInstalling: \n\n pgdg-redhat-repo       noarch       42.0-35PGDG       @commandline        13 k \n\n\uff1a \n\n\uff1a \n\ndbinit psql completed. \n\ndbinit completed. \n\n# <\/code><\/pre>\n\n\n\n<p>If you see dbinit psql completed. and dbinit completed., the database switch was successful.&nbsp;<\/p>\n\n\n\n<p>Next, run kusanagi status again to verify the environment.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># kusanagi status \n\nKUSANAGI Version 9.4.2-1.el8 \n\n(Cloud name) \n\n \n\n\uff1a \n\n(omission) \n\n\uff1a \n\n*** (inactive) mariadb : mariadb10.5 *** \n\n* mariadb.service - MariaDB 10.5.22 database server \n\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/.\/mariadb.service; disabled; vendor preset: disabled) \n\n   Active: inactive (dead) \n\n \n\n*** (active) psql : psql13 *** \n\n* postgresql-13.service - PostgreSQL 13 database server \n\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/postgresql-13.service; enabled; vendor preset: disabled) \n\n   Active: active (running) since Thu 2023-10-12 14:34:23 JST; 1min 27s ago \n\n \n\n*** (active) pgpool-II : pgpool44 *** \n\n* pgpool.service - Pgpool-II \n\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/pgpool.service; enabled; vendor preset: disabled) \n\n   Active: active (running) since Thu 2023-10-12 14:34:40 JST; 1min 11s ago \n\n \n\n\uff1a \n\n(omission) \n\n\uff1a \n\nstatus completed. \n\n# <\/code><\/pre>\n\n\n\n<p>PostgreSQL is now active, and MariaDB has been deactivated.\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Provisioning_a_Drupal_Site_on_PostgreSQL\"><\/span><strong>Provisioning a Drupal Site on PostgreSQL<\/strong>\u00a0<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Let\u2019s provision a Drupal environment using PostgreSQL:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># kusanagi provision --drupal --fqdn (FQDN) --noemail --dbname drupal_test --dbuser drupal_user --dbpass (DB User password) drupal_test \n\nTarget directory is \/home\/kusanagi\/drupal_test. \n\nCREATE ROLE \n\nprovision postgresql completed. \n\nprovision db completed. \n\nLast metadata expiration check: 0:18:48 ago on Thu Oct 12 14:40:28 2023. \n\n\uff1a \n\n(omission) \n\n\uff1a \n\nProvisioning of drupal_test completed. Access (FQDN) and install drupal. \n\nprovision completed. \n\n# \n\n <\/code><\/pre>\n\n\n\n<p>Visit the specified FQDN in your browser, and you\u2019ll see that Drupal runs successfully on PostgreSQL.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"532\" src=\"https:\/\/www.prime-strategy.co.jp\/column\/wp-content\/uploads\/2023\/10\/96a5f9ac934601d7c65818927f03bbe6-1024x532.png\" alt=\"\" class=\"wp-image-7505\" srcset=\"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/96a5f9ac934601d7c65818927f03bbe6-1024x532.png 1024w, https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/96a5f9ac934601d7c65818927f03bbe6-300x156.png 300w, https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/96a5f9ac934601d7c65818927f03bbe6-768x399.png 768w, https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/96a5f9ac934601d7c65818927f03bbe6.png 1126w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As you can see, Drupal is running properly on PostgreSQL.&nbsp;<\/p>\n\n\n\n<p>For the switch, we used the following command:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kusanagi dbinit psql \u2013use psql13 \u2013dbrootpass (your DB admin password) <\/code><\/pre>\n\n\n\n<p>Here, --use psql13 specifies the version of PostgreSQL to install\u2014in this case, PostgreSQL 13.&nbsp;<\/p>\n\n\n\n<p>For other supported versions, refer to the <a href=\"https:\/\/kusanagi.tokyo\/en\/document\/commands\/dbinit-psql\/\" target=\"_blank\" rel=\"noreferrer noopener\">KUSANAGI 9 command manual<\/a>.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Optimizing_PostgreSQL_Configuration\"><\/span><strong>Optimizing PostgreSQL Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In addition to switching the database, kusanagi dbinit psql can also optimize PostgreSQL settings.&nbsp;<\/p>\n\n\n\n<p>If PostgreSQL is already in use, simply running kusanagi dbinit psql without any options will perform the optimization.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \n\n# kusanagi dbinit psql \n\ndbinit psql completed. \n\ndbinit completed. \n\n# <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Upgrading_PostgreSQL_Version\"><\/span><strong>Upgrading PostgreSQL Version<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now, let\u2019s take a look at how to upgrade to a newer version of PostgreSQL.&nbsp;<\/p>\n\n\n\n<p>In the earlier step where we switched from MariaDB to PostgreSQL, we used the following command with the --use psql13 option:&nbsp;<\/p>\n\n\n\n<p>kusanagi dbinit psql --use psql13&nbsp;<\/p>\n\n\n\n<p>As mentioned, this installs PostgreSQL 13.&nbsp;<\/p>\n\n\n\n<p>Let\u2019s now upgrade PostgreSQL 13 to PostgreSQL 14 using the kusanagi upgrade psql command:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># kusanagi upgrade psql --use psql14 \n\nLast metadata expiration check: 0:44:35 ago on Thu Oct 12 14:40:28 2023. \n\nDependencies resolved. \n\nNothing to do. \n\nComplete! \n\n... \n\nupgrade psql completed. \n\nupgrade completed. \n\n# <\/code><\/pre>\n\n\n\n<p>If you see upgrade psql completed. and upgrade completed., the upgrade was successful.&nbsp;<\/p>\n\n\n\n<p>Now let\u2019s check the environment using kusanagi status:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \n\n# kusanagi status \n\nKUSANAGI Version 9.4.2-1.el8 \n\n(Cloud name) \n\n \n\n... \n\n \n\n*** (inactive) mariadb : mariadb10.5 *** \n\n* mariadb.service - MariaDB 10.5.22 database server \n\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/.\/mariadb.service; disabled; vendor preset: disabled) \n\n   Active: inactive (dead) \n\n \n\n*** (active) psql : psql14 *** \n\n* postgresql-14.service - PostgreSQL 14 database server \n\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/postgresql-14.service; enabled; vendor preset: disabled) \n\n   Active: active (running) since Thu 2023-10-12 15:25:52 JST; 2min 42s ago \n\n \n\n*** (active) pgpool-II : pgpool44 *** \n\n* pgpool.service - Pgpool-II \n\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/pgpool.service; enabled; vendor preset: disabled) \n\n   Active: active (running) since Thu 2023-10-12 15:26:15 JST; 2min 19s ago \n\n \n\n... \n\nstatus completed. \n\n# <\/code><\/pre>\n\n\n\n<p>As shown above, the database has been successfully upgraded from psql13 to psql14.&nbsp;<\/p>\n\n\n\n<p>This demonstrates how easily you can upgrade PostgreSQL using KUSANAGI.&nbsp;<\/p>\n\n\n\n<p>\u26a0\ufe0f Note: The kusanagi upgrade psql command supports upgrades only\u2014it does not allow downgrading.&nbsp;<\/p>\n\n\n\n<p>Please refer to the KUSANAGI 9 manual linked below for a list of supported PostgreSQL versions.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Using_PostgreSQL_from_Initial_Setup\"><\/span><strong>Using PostgreSQL from Initial Setup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Although this is outside the scope of dbinit or upgrade, if you already know from the beginning that you want to use PostgreSQL, you can specify it during the initial KUSANAGI setup using:\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kusanagi init --passwd (kusanagi_user_password) --nophrase --dbrootpass (db_admin_password) --psql13 <\/code><\/pre>\n\n\n\n<p>For more on kusanagi init, see our earlier tech column:&nbsp;<br><a href=\"https:\/\/www.prime-strategy.co.jp\/column\/archives\/column_5722\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How to initialize KUSANAGI easily with kusanagi init<\/strong><\/a>&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong>\u00a0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>With the kusanagi dbinit psql and kusanagi upgrade psql commands, KUSANAGI 9 allows you to:\u00a0<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Switch from MariaDB to PostgreSQL\u00a0<\/li>\n\n\n\n<li>Optimize PostgreSQL settings\u00a0<\/li>\n\n\n\n<li>Upgrade to newer PostgreSQL versions\u00a0<\/li>\n<\/ul>\n\n\n\n<p>KUSANAGI now supports PostgreSQL alongside MariaDB, making it suitable for CMS platforms like Drupal as well as WordPress. Give it a try and make full use of this flexibility in your projects.\u00a0<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/kusanagi.tokyo\/en\/document\/commands\/dbinit-psql\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/kusanagi.tokyo\/en\/document\/commands\/dbinit-psql\/ <\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/kusanagi.tokyo\/en\/document\/commands\/upgrade-psql\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/kusanagi.tokyo\/en\/document\/commands\/upgrade-psql\/<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>KUSANAGI 9 now supports PostgreSQL versions 14 and 15, allowing users to upgrade PostgreSQL and run CMS platforms like Drupal\u2014not just WordPress\u2014on PostgreSQL. Using the kusanagi dbinit psql and kusanagi upgrade psql commands, you can not only switch the database in use but also upgrade or optimize its configuration.&nbsp; Keep in mind, however, that switching databases requires a backup, and data migration must be handled manually. Additionally, the kusanagi upgrade ... <a title=\"Using PostgreSQL with KUSANAGI 9\" class=\"read-more\" href=\"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631\" aria-label=\"Read more about Using PostgreSQL with KUSANAGI 9\">Read more<\/a><\/p>\n","protected":false},"author":29,"featured_media":10686,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[134],"tags":[120],"series":[86],"journey":[123],"product":[121],"class_list":["post-10631","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database","tag-technical-guides","series-kusanagi-command-en","journey-build","product-kusanagi","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using PostgreSQL with KUSANAGI 9 - KUSANAGI Tech Column<\/title>\n<meta name=\"description\" content=\"KUSANAGI 9 now supports PostgreSQL 14 and 15, allowing PostgreSQL upgrades. This allows PostgreSQL to be used not only with WordPress, but also with Drupal and other CMS. In addition, KUSANAGI can now use the kusanagi dbinit psql \/ kusanagi upgrade psql commands to not only increase the database version, but also switch and optimize the database used. However, changing databases requires a backup of your data, and you must perform the data migration yourself. Also, the kusanagi upgrade psql command can be used to raise the PostgreSQL version, but not lower it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using PostgreSQL with KUSANAGI 9 - KUSANAGI Tech Column\" \/>\n<meta property=\"og:description\" content=\"KUSANAGI 9 now supports PostgreSQL 14 and 15, allowing PostgreSQL upgrades. This allows PostgreSQL to be used not only with WordPress, but also with Drupal and other CMS. In addition, KUSANAGI can now use the kusanagi dbinit psql \/ kusanagi upgrade psql commands to not only increase the database version, but also switch and optimize the database used. However, changing databases requires a backup of your data, and you must perform the data migration yourself. Also, the kusanagi upgrade psql command can be used to raise the PostgreSQL version, but not lower it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631\" \/>\n<meta property=\"og:site_name\" content=\"KUSANAGI Tech Column\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-13T01:38:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-22T12:03:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/Using-PostgreSQL-with-KUSANAGI-9_.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"520\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"\u7247\u5009\u6d0b\u4e00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@kusanagi_saya\" \/>\n<meta name=\"twitter:site\" content=\"@kusanagi_saya\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631\"},\"author\":{\"name\":\"\u7247\u5009\u6d0b\u4e00\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#\\\/schema\\\/person\\\/05670b4c15855a295cde0a735e697f50\"},\"headline\":\"Using PostgreSQL with KUSANAGI 9\",\"datePublished\":\"2023-10-13T01:38:42+00:00\",\"dateModified\":\"2026-02-22T12:03:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631\"},\"wordCount\":927,\"publisher\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/Using-PostgreSQL-with-KUSANAGI-9_.png\",\"keywords\":[\"Technical Guides\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631\",\"url\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631\",\"name\":\"Using PostgreSQL with KUSANAGI 9 - KUSANAGI Tech Column\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/Using-PostgreSQL-with-KUSANAGI-9_.png\",\"datePublished\":\"2023-10-13T01:38:42+00:00\",\"dateModified\":\"2026-02-22T12:03:47+00:00\",\"description\":\"KUSANAGI 9 now supports PostgreSQL 14 and 15, allowing PostgreSQL upgrades. This allows PostgreSQL to be used not only with WordPress, but also with Drupal and other CMS. In addition, KUSANAGI can now use the kusanagi dbinit psql \\\/ kusanagi upgrade psql commands to not only increase the database version, but also switch and optimize the database used. However, changing databases requires a backup of your data, and you must perform the data migration yourself. Also, the kusanagi upgrade psql command can be used to raise the PostgreSQL version, but not lower it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631#primaryimage\",\"url\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/Using-PostgreSQL-with-KUSANAGI-9_.png\",\"contentUrl\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/Using-PostgreSQL-with-KUSANAGI-9_.png\",\"width\":1024,\"height\":520,\"caption\":\"Using PostgreSQL with KUSANAGI 9_\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_10631#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using PostgreSQL with KUSANAGI 9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#website\",\"url\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\",\"name\":\"KUSANAGI Tech Column\",\"description\":\"\u901f\u3055\u306e\u7406\u7531\u3092\u77e5\u308b\u3002\u5b89\u5168\u306e\u4ed5\u7d44\u307f\u3092\u77e5\u308b\u3002WordPress\u904b\u7528\u306e\u300c\u306a\u305c\uff1f\u300d\u3092\u89e3\u304f\u6280\u8853\u30b3\u30e9\u30e0\",\"publisher\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#organization\",\"name\":\"KUSANAGI Tech Column\",\"url\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/logo-tc.png\",\"contentUrl\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/logo-tc.png\",\"width\":716,\"height\":57,\"caption\":\"KUSANAGI Tech Column\"},\"image\":{\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/kusanagi_saya\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en#\\\/schema\\\/person\\\/05670b4c15855a295cde0a735e697f50\",\"name\":\"\u7247\u5009\u6d0b\u4e00\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d8bc2897da028ad8c5fd71cbe75a5b61c784b411557911ea1a238e9d8acf3084?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d8bc2897da028ad8c5fd71cbe75a5b61c784b411557911ea1a238e9d8acf3084?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d8bc2897da028ad8c5fd71cbe75a5b61c784b411557911ea1a238e9d8acf3084?s=96&d=mm&r=g\",\"caption\":\"\u7247\u5009\u6d0b\u4e00\"},\"description\":\"2021\u5e74\u3088\u308a KUSANAGI \u306e\u958b\u767a\u306b\u5f93\u4e8b\u3057\u3066\u3044\u307e\u3059\u3002\u524d\u8077\u3067\u306f SIer \u306e\u3082\u3068\u3067\u69d8\u3005\u306a\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306b\u643a\u308f\u3063\u3066\u304d\u307e\u3057\u305f\u3002\",\"url\":\"https:\\\/\\\/kusanagi.tokyo\\\/column\\\/en\\\/archives\\\/column_author\\\/katakura-yoichi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using PostgreSQL with KUSANAGI 9 - KUSANAGI Tech Column","description":"KUSANAGI 9 now supports PostgreSQL 14 and 15, allowing PostgreSQL upgrades. This allows PostgreSQL to be used not only with WordPress, but also with Drupal and other CMS. In addition, KUSANAGI can now use the kusanagi dbinit psql \/ kusanagi upgrade psql commands to not only increase the database version, but also switch and optimize the database used. However, changing databases requires a backup of your data, and you must perform the data migration yourself. Also, the kusanagi upgrade psql command can be used to raise the PostgreSQL version, but not lower it.","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:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631","og_locale":"en_US","og_type":"article","og_title":"Using PostgreSQL with KUSANAGI 9 - KUSANAGI Tech Column","og_description":"KUSANAGI 9 now supports PostgreSQL 14 and 15, allowing PostgreSQL upgrades. This allows PostgreSQL to be used not only with WordPress, but also with Drupal and other CMS. In addition, KUSANAGI can now use the kusanagi dbinit psql \/ kusanagi upgrade psql commands to not only increase the database version, but also switch and optimize the database used. However, changing databases requires a backup of your data, and you must perform the data migration yourself. Also, the kusanagi upgrade psql command can be used to raise the PostgreSQL version, but not lower it.","og_url":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631","og_site_name":"KUSANAGI Tech Column","article_published_time":"2023-10-13T01:38:42+00:00","article_modified_time":"2026-02-22T12:03:47+00:00","og_image":[{"width":1024,"height":520,"url":"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/Using-PostgreSQL-with-KUSANAGI-9_.png","type":"image\/png"}],"author":"\u7247\u5009\u6d0b\u4e00","twitter_card":"summary_large_image","twitter_creator":"@kusanagi_saya","twitter_site":"@kusanagi_saya","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631#article","isPartOf":{"@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631"},"author":{"name":"\u7247\u5009\u6d0b\u4e00","@id":"https:\/\/kusanagi.tokyo\/column\/en#\/schema\/person\/05670b4c15855a295cde0a735e697f50"},"headline":"Using PostgreSQL with KUSANAGI 9","datePublished":"2023-10-13T01:38:42+00:00","dateModified":"2026-02-22T12:03:47+00:00","mainEntityOfPage":{"@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631"},"wordCount":927,"publisher":{"@id":"https:\/\/kusanagi.tokyo\/column\/en#organization"},"image":{"@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631#primaryimage"},"thumbnailUrl":"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/Using-PostgreSQL-with-KUSANAGI-9_.png","keywords":["Technical Guides"],"articleSection":["Database"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631","url":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631","name":"Using PostgreSQL with KUSANAGI 9 - KUSANAGI Tech Column","isPartOf":{"@id":"https:\/\/kusanagi.tokyo\/column\/en#website"},"primaryImageOfPage":{"@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631#primaryimage"},"image":{"@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631#primaryimage"},"thumbnailUrl":"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/Using-PostgreSQL-with-KUSANAGI-9_.png","datePublished":"2023-10-13T01:38:42+00:00","dateModified":"2026-02-22T12:03:47+00:00","description":"KUSANAGI 9 now supports PostgreSQL 14 and 15, allowing PostgreSQL upgrades. This allows PostgreSQL to be used not only with WordPress, but also with Drupal and other CMS. In addition, KUSANAGI can now use the kusanagi dbinit psql \/ kusanagi upgrade psql commands to not only increase the database version, but also switch and optimize the database used. However, changing databases requires a backup of your data, and you must perform the data migration yourself. Also, the kusanagi upgrade psql command can be used to raise the PostgreSQL version, but not lower it.","breadcrumb":{"@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631#primaryimage","url":"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/Using-PostgreSQL-with-KUSANAGI-9_.png","contentUrl":"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2023\/10\/Using-PostgreSQL-with-KUSANAGI-9_.png","width":1024,"height":520,"caption":"Using PostgreSQL with KUSANAGI 9_"},{"@type":"BreadcrumbList","@id":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_10631#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/kusanagi.tokyo\/column\/en"},{"@type":"ListItem","position":2,"name":"Using PostgreSQL with KUSANAGI 9"}]},{"@type":"WebSite","@id":"https:\/\/kusanagi.tokyo\/column\/en#website","url":"https:\/\/kusanagi.tokyo\/column\/en","name":"KUSANAGI Tech Column","description":"\u901f\u3055\u306e\u7406\u7531\u3092\u77e5\u308b\u3002\u5b89\u5168\u306e\u4ed5\u7d44\u307f\u3092\u77e5\u308b\u3002WordPress\u904b\u7528\u306e\u300c\u306a\u305c\uff1f\u300d\u3092\u89e3\u304f\u6280\u8853\u30b3\u30e9\u30e0","publisher":{"@id":"https:\/\/kusanagi.tokyo\/column\/en#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kusanagi.tokyo\/column\/en?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kusanagi.tokyo\/column\/en#organization","name":"KUSANAGI Tech Column","url":"https:\/\/kusanagi.tokyo\/column\/en","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kusanagi.tokyo\/column\/en#\/schema\/logo\/image\/","url":"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2024\/07\/logo-tc.png","contentUrl":"https:\/\/kusanagi.tokyo\/column\/wp-content\/uploads\/2024\/07\/logo-tc.png","width":716,"height":57,"caption":"KUSANAGI Tech Column"},"image":{"@id":"https:\/\/kusanagi.tokyo\/column\/en#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/kusanagi_saya"]},{"@type":"Person","@id":"https:\/\/kusanagi.tokyo\/column\/en#\/schema\/person\/05670b4c15855a295cde0a735e697f50","name":"\u7247\u5009\u6d0b\u4e00","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d8bc2897da028ad8c5fd71cbe75a5b61c784b411557911ea1a238e9d8acf3084?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d8bc2897da028ad8c5fd71cbe75a5b61c784b411557911ea1a238e9d8acf3084?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8bc2897da028ad8c5fd71cbe75a5b61c784b411557911ea1a238e9d8acf3084?s=96&d=mm&r=g","caption":"\u7247\u5009\u6d0b\u4e00"},"description":"2021\u5e74\u3088\u308a KUSANAGI \u306e\u958b\u767a\u306b\u5f93\u4e8b\u3057\u3066\u3044\u307e\u3059\u3002\u524d\u8077\u3067\u306f SIer \u306e\u3082\u3068\u3067\u69d8\u3005\u306a\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306b\u643a\u308f\u3063\u3066\u304d\u307e\u3057\u305f\u3002","url":"https:\/\/kusanagi.tokyo\/column\/en\/archives\/column_author\/katakura-yoichi"}]}},"_links":{"self":[{"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/posts\/10631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/comments?post=10631"}],"version-history":[{"count":8,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/posts\/10631\/revisions"}],"predecessor-version":[{"id":10701,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/posts\/10631\/revisions\/10701"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/media\/10686"}],"wp:attachment":[{"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/media?parent=10631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/categories?post=10631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/tags?post=10631"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/series?post=10631"},{"taxonomy":"journey","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/journey?post=10631"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/kusanagi.tokyo\/column\/en\/wp-json\/wp\/v2\/product?post=10631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}