<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>code — Epic Worlds</title>
    <link>https://itwasntme223.writeas.com/tag:code</link>
    <description>The official blog of Jonathan Snyder, the muse&#39;s bitch. </description>
    <pubDate>Mon, 16 Nov 2026 10:15:24 +0000</pubDate>
    <image>
      <url>https://i.snap.as/Ma5Uxu3U.png</url>
      <title>code — Epic Worlds</title>
      <link>https://itwasntme223.writeas.com/tag:code</link>
    </image>
    <item>
      <title>Maria DB and the Mysterious Column Storage Engine</title>
      <link>https://itwasntme223.writeas.com/maria-db-and-the-mysterious-column-storage-engine-nnd0?pk_campaign=rss-feed</link>
      <description>Tags: #infosec #code Not much of a preamble for this one. My friend was struggling getting Postgresql to work with a column storage engin...</description>
      <content:encoded><![CDATA[<p>Tags: <a href="https://itwasntme223.writeas.com/tag:infosec" class="hashtag" rel="nofollow ugc"><span>#</span><span class="p-category">infosec</span></a> <a href="https://itwasntme223.writeas.com/tag:code" class="hashtag" rel="nofollow ugc"><span>#</span><span class="p-category">code</span></a></p>

<p>Not much of a preamble for this one. My friend was struggling getting Postgresql to work with a column storage engine because the directions were opaque and useless. I started helping her out but discovered that MariaDB is the same way. After a day or two of research, I wrote a bash script that does the install of everything and when I tested it on my own machine, it worked!</p>

<p><em>NOTE: This script is written and tested on an Ubuntu machine. You may have to tweak it for others.</em></p>

<pre><code>#!/usr/bin/env bash

set -e
exec 2&gt;error.log

log_error() {
    echo &#34;$(date &#39;+%Y-%m-%d %H:%M:%S&#39;) ERROR: $1&#34; | tee -a error.log
}

trap &#39;kill $SUDO_PID&#39; EXIT

echo &#34;This script will install MariaDB and the MariaDB extension Column Store.&#34;
echo &#34;Do you wish to proceed? (Y/N)&#34; 

read -r proceed_time

if [[ &#34;${proceed_time^^}&#34; != &#34;Y&#34; ]]; then
    echo &#34;Exiting script...&#34;
    exit 1
fi

echo &#34;Starting installation of MariaDB...&#34;

# Check sudo access
if ! sudo -v; then 
    log_error &#34;Sudo access denied. Exiting.&#34;
    exit 1
fi 

# Keep sudo alive in the background
( while true; do sudo -v; sleep 60; done ) &amp; 
SUDO_PID=$!

# Update package lists
if ! sudo apt update; then
    log_error &#34;Failed to update package lists.&#34;
    exit 1
fi

# Install MariaDB
if sudo apt install -y mariadb-server mariadb-client; then 
    if systemctl is-active --quiet mariadb; then
        echo &#34;MariaDB server installed and running.&#34;
    else
        log_error &#34;MariaDB server installation failed or not running.&#34;
        exit 1
    fi
else
    log_error &#34;Failed to install MariaDB.&#34;
    exit 1
fi

# Prepare to install ColumnStore
echo &#34;Preparing to install the MariaDB ColumnStore engine.&#34; 

mkdir -p columnstore
pushd columnstore || exit 1

# Download and set up the MariaDB repo
if ! wget -q --show-progress https://downloads.mariadb.com/MariaDB/mariadb_repo_setup; then
    log_error &#34;Failed to download mariadb_repo_setup.&#34;
    exit 1
fi

chmod +x mariadb_repo_setup

if ! sudo ./mariadb_repo_setup --mariadb-server-version=&#34;mariadb-10.6&#34;; then 
    log_error &#34;Failed to install Maria Repo.&#34;
    exit 1 
fi 

# Update package lists again
if ! sudo apt update; then
    log_error &#34;Failed to update package lists after adding MariaDB repo.&#34;
    exit 1
fi

# Install ColumnStore dependencies
if ! sudo apt install -y libjemalloc2 mariadb-backup libmariadb3 mariadb-plugin-columnstore; then 
    log_error &#34;Failed to install ColumnStore dependencies.&#34;
    exit 1
fi 

# Verify ColumnStore installation
if ! sudo mariadb -e &#34;SHOW PLUGINS&#34; | grep -q &#34;COLUMNSTORE&#34;; then
    log_error &#34;ColumnStore plugin installation failed.&#34;
    exit 1
fi

service mariadb restart

popd

echo &#34;Installation complete.&#34;
</code></pre>
]]></content:encoded>
      <guid>https://itwasntme223.writeas.com/maria-db-and-the-mysterious-column-storage-engine-nnd0</guid>
      <pubDate>Mon, 02 Jun 2025 16:24:28 +0000</pubDate>
    </item>
  </channel>
</rss>