<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Database on BonesMoses.org</title>
    <link>https://bonesmoses.org/categories/database/</link>
    <description>Recent content in Database on BonesMoses.org</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 20 Dec 2024 12:26:38 -0600</lastBuildDate><atom:link href="https://bonesmoses.org/categories/database/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>PG Phriday: Kubernetes Killed the High Availability Star</title>
      <link>https://bonesmoses.org/2024/pg-phriday-kubernetes-killed-the-high-availability-star/</link>
      <pubDate>Fri, 20 Dec 2024 12:26:38 -0600</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-kubernetes-killed-the-high-availability-star/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://postgresconf.org/conferences/SEA2024&#34;&gt;Postgres Conference Seattle 2024&lt;/a&gt; partnered up with &lt;a href=&#34;https://passdatacommunitysummit.com&#34;&gt;PASS&lt;/a&gt; this year to present a united database front. They accepted my &amp;ldquo;&lt;a href=&#34;https://postgresconf.org/conferences/SEA2024/program/proposals/kubernetes-killed-the-high-availability-star-how-to-stop-worrying-and-embrace-postgres-in-the-cloud&#34;&gt;Kubernetes Killed the High Availability Star&lt;/a&gt;&amp;rdquo; talk, which I graciously gave on the last day of the conference. The next talk in that room wasn&amp;rsquo;t for another hour, so I had plenty of time to talk shop with attendees, about the future of Postgres, high availability, and Kubernetes in general.&lt;/p&gt;
&lt;p&gt;If you weren&amp;rsquo;t there and missed out on the fun, this is your chance to catch up and enjoy a few of my notorious bad puns along the way. Let me tell you why the concept of Postgres HA is dead.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>PG Phriday: My Postgres is Rusty</title>
      <link>https://bonesmoses.org/2024/pg-phriday-my-postgres-is-rusty/</link>
      <pubDate>Fri, 09 Aug 2024 12:00:00 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-my-postgres-is-rusty/</guid>
      <description>&lt;p&gt;Postgres and Rust go together like peanut butter and chocolate, or ice-cream and root beer, or Batman and Robin, or mice and cheese, or sand on a beach, or crabs and elephants! Err, maybe scratch that last one.&lt;/p&gt;
&lt;figure class=&#34;aligncenter&#34;&gt;&lt;img src=&#34;https://bonesmoses.org/img/2024/postgrust-logo.png&#34;
         alt=&#34;Hmmmmm&amp;amp;hellip;&#34;/&gt;&lt;figcaption&gt;
            &lt;p&gt;Hmmmmm&amp;hellip;&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Well regardless, there&amp;rsquo;s a whole lot of Rust going on in the Postgres world these days, especially thanks to contributions from the &lt;a href=&#34;https://github.com/pgcentralfoundation/pgrx&#34;&gt;PGRX project&lt;/a&gt;. As a relative novice to Rust, I figured it was time to see what all the fuss was about and tentatively dip a foot into those turbulent and unforgiving waters.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>PG Phriday: Taking Postgres for GRANTed</title>
      <link>https://bonesmoses.org/2024/pg-phriday-taking-postgres-for-granted/</link>
      <pubDate>Fri, 31 May 2024 12:00:00 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-taking-postgres-for-granted/</guid>
      <description>Not every database-backed application needs to be locked down like Fort Knox. Sometimes there are even roles that leverage blanket access to large swathes of available data, if not every table, simply for auditing or monitoring purposes. Normally this would require quite a bit of preparation or ongoing privilege management, but Postgres came up with a unique solution starting with version 14: predefined roles.
This topic comes up relatively frequently in Postgres chats like Discord, Slack, and IRC.</description>
    </item>
    
    <item>
      <title>PG Phriday: On the Move</title>
      <link>https://bonesmoses.org/2024/pg-phriday-on-the-move/</link>
      <pubDate>Fri, 10 May 2024 20:13:36 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-on-the-move/</guid>
      <description>&lt;p&gt;Sometimes when we have an existing database and schema full of tables, there comes a time when we need to perform a migration. Maybe it&amp;rsquo;s because we want to move to or from a cloud service. Perhaps we have a small database and want to do a quick version upgrade via dump / restore. Whatever the reason, we may decide to clean up some technical debt while we&amp;rsquo;re making the transition.&lt;/p&gt;
&lt;p&gt;Many Postgres experts recommend against creating objects in the &lt;code&gt;public&lt;/code&gt; schema. This is the default schema that exists in nearly all Postgres databases, and there are often implicit grants that could make our objects available in unexpected scenarios. It&amp;rsquo;s also a cluttered namespace if all tables, views, functions, etc., are created there by default. Using it is sloppy and makes future data or operation segregation much more difficult.&lt;/p&gt;
&lt;p&gt;So how can we move a bunch of existing stuff &lt;em&gt;out&lt;/em&gt; of the &lt;code&gt;public&lt;/code&gt; schema safely?&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>PG Phriday: Papa&#39;s Got a Brand New RAG</title>
      <link>https://bonesmoses.org/2024/pg-phriday-brand-new-rag/</link>
      <pubDate>Fri, 26 Apr 2024 12:00:00 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-brand-new-rag/</guid>
      <description>Remember this guy?
Robo-Postgres returns!
AI is all anyone talks about these days, isn&amp;rsquo;t it? Even when it comes to databases like Postgres, devs are finding new and innovative ways to leverage LLMs in everyday use cases. Can you really blame them though? This is an exciting new technology that will transform how we work and potentially society as a whole once it finally matures. We even covered building a crude RAG app a few short weeks ago.</description>
    </item>
    
    <item>
      <title>PG Phriday: Under Observation</title>
      <link>https://bonesmoses.org/2024/pg-phriday-under-observation/</link>
      <pubDate>Fri, 12 Apr 2024 16:30:04 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-under-observation/</guid>
      <description>&lt;p&gt;Have you ever wanted to use a non-superuser role in a Postgres database to perform actions that are normally restricted? Even something as simple as reading from the &lt;code&gt;pg_stat_activity&lt;/code&gt; view requires special permissions to view the &lt;code&gt;query&lt;/code&gt; column because it could contain sensitive information.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>PG Phriday: Wanton Animal Cruelty</title>
      <link>https://bonesmoses.org/2024/pg-phriday-wanton-animal-cruelty/</link>
      <pubDate>Thu, 04 Apr 2024 19:11:54 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-wanton-animal-cruelty/</guid>
      <description>The last few PG Phriday articles have been somewhat dense content, so how about something a bit more irreverent? Rather than wax on about AI, HA architectures, or conceptual advancements to Postgres clusters, why not write a game instead? To keep things simple, let&amp;rsquo;s just build a no-frills Tamagotchi virtual pet for bored database professionals.
There&amp;rsquo;s a lot of SQL in this article, so check out the git page for this blog if you want to follow along.</description>
    </item>
    
    <item>
      <title>PG Phriday: A Dirty Postgres RAG</title>
      <link>https://bonesmoses.org/2024/pg-phriday-dirty-postgres-rag/</link>
      <pubDate>Fri, 29 Mar 2024 14:34:28 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-dirty-postgres-rag/</guid>
      <description>Has it really come to this?
AI is everywhere these days
Postgres and AI go together like elephants and chocolate. At first glance, it seems like a silly combination. Postgres is an RDBMS for storing data with ACID compliance, functions, views, and maybe some extensions or foreign data wrappers. Where is room for AI in that? It may be trendy to take something, rub some AI on it, and then declare it a breakthrough technology, but that isn&amp;rsquo;t necessarily reality.</description>
    </item>
    
    <item>
      <title>PG Phriday: Why Postgres is the Best Database Engine</title>
      <link>https://bonesmoses.org/2024/pg-phriday-why-postgres-is-the-best-database-engine/</link>
      <pubDate>Fri, 22 Mar 2024 15:57:43 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-why-postgres-is-the-best-database-engine/</guid>
      <description>Last Phriday we explored just where Postgres could end up in the future. One possible question which may have occurred to a reader was probably something along the lines of &amp;ldquo;That doesn&amp;rsquo;t even really sound like Postgres anymore. Why not just write another database?&amp;rdquo;
Let&amp;rsquo;s just be outright about it: Postgres is the best RDBMS engine currently available. It&amp;rsquo;s certainly bold to claim that any database engine is &amp;ldquo;the best&amp;rdquo;, and as the saying goes, &amp;ldquo;Extraordinary claims require extraordinary evidence.</description>
    </item>
    
    <item>
      <title>PG Phriday: Redefining Postgres High Availability</title>
      <link>https://bonesmoses.org/2024/pg-phriday-redefining-postgres-high-availability/</link>
      <pubDate>Fri, 15 Mar 2024 01:27:19 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-redefining-postgres-high-availability/</guid>
      <description>What is High Availability to Postgres? I&amp;rsquo;ve staked my career on the answer to that question since I first presented an HA stack to Postgres Open in 2012, and I still don&amp;rsquo;t feel like there&amp;rsquo;s an acceptable answer. No matter how the HA techniques have advanced since then, there&amp;rsquo;s always been a nagging suspicion in my mind that something is missing.
But I&amp;rsquo;m here to say that a bit of research has uncovered an approach that many different Postgres cloud vendors appear to be converging upon.</description>
    </item>
    
    <item>
      <title>PG Phriday: Getting It Sorted</title>
      <link>https://bonesmoses.org/2024/pg-phriday-getting-it-sorted/</link>
      <pubDate>Fri, 08 Mar 2024 20:36:40 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2024/pg-phriday-getting-it-sorted/</guid>
      <description>&lt;p&gt;When it comes to reordering the items in a list, databases have long had a kind of Faustian Bargain to accomplish the task. Nobody really liked any of the more common solutions, least of all the poor database tasked with serving up the inevitable resulting hack.&lt;/p&gt;
&lt;p&gt;Postgres is no different in this regard. Consider a &lt;code&gt;list_item&lt;/code&gt; table like this, demonstrating five items in a to-do list:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>PG Phriday: Community Edition</title>
      <link>https://bonesmoses.org/2017/pg-phriday-community-edition/</link>
      <pubDate>Fri, 28 Apr 2017 11:50:16 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-community-edition/</guid>
      <description>Postgres is one of those database engines that carves out a niche and garners adherents with various levels of religious zeal. The community, while relatively small when compared to that of something like MongoDB, is helpful almost to a fault. Members from the freshest minted newb to the most battle tested veteran will often trip over themselves to answer questions found in the various dedicated forums, mailing lists, and chat rooms.</description>
    </item>
    
    <item>
      <title>PG Phriday: Who Died and Made You Boss?! (The Investigatining!)</title>
      <link>https://bonesmoses.org/2017/pg-phriday-who-died-and-made-you-boss-the-investigatining/</link>
      <pubDate>Fri, 21 Apr 2017 11:22:43 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-who-died-and-made-you-boss-the-investigatining/</guid>
      <description>The Postgres system catalog is a voluminous tome of intriguing metadata both obvious and stupendously esoteric. When inheriting a Postgres database infrastructure from another DBA, sometimes it falls upon us to dig into the writhing confines to derive a working knowledge of its lurking denizens. The trick is to do this before they burst forth and douse us with the database&amp;rsquo;s sticky innards and it experiences a horrible untimely demise.</description>
    </item>
    
    <item>
      <title>PG Phriday: Design Pattern Workshop</title>
      <link>https://bonesmoses.org/2017/pg-phriday-design-pattern-workshop/</link>
      <pubDate>Fri, 31 Mar 2017 12:20:46 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-design-pattern-workshop/</guid>
      <description>Recently on the pgsql-performance mailing list, a question popped up regarding Postgres RAM usage. In this instance Pietro wondered why Postgres wasn&amp;rsquo;t using more RAM, and why his process was taking so long. There were a few insightful replies, and they&amp;rsquo;re each interesting for reasons that aren&amp;rsquo;t immediately obvious. Let&amp;rsquo;s see what is really going on here, and perhaps answer a question while we&amp;rsquo;re at it.
Pietro presents several postgresql.conf settings, but here are the ones that matter:</description>
    </item>
    
    <item>
      <title>PG Phriday: CONFLICT of Interests</title>
      <link>https://bonesmoses.org/2017/pg-phriday-conflict-of-interests/</link>
      <pubDate>Fri, 24 Mar 2017 12:20:10 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-conflict-of-interests/</guid>
      <description>MySQL has had a REPLACE INTO syntax to perform &amp;ldquo;UPSERT&amp;rdquo; logic since practically the very beginning. For the longest time, users who wanted to switch to Postgres, but for whatever reason relied on this functionality, were essentially trapped. Postgres 9.5 changed all that, but why did it take so long? As with much of Postgres history, it&amp;rsquo;s a long story.
To really understand where Postgres started, we need to look at the &amp;ldquo;old&amp;rdquo; way of handling a row merge.</description>
    </item>
    
    <item>
      <title>PG Phriday: RESTing in the Corn</title>
      <link>https://bonesmoses.org/2017/pg-phriday-resting-in-the-corn/</link>
      <pubDate>Fri, 17 Mar 2017 11:33:24 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-resting-in-the-corn/</guid>
      <description>Last week we explored using Postgres as a central communication nexus between several data sources. At the time, I made a fairly hand-wavy allusion to REST interfaces. Since I hadn&amp;rsquo;t really explored further, I had assumed PLV8 could use core node.js or other similar libraries to invoke HTTP APIs. Of course as a trusted language, PLV8 isn&amp;rsquo;t allowed to do that. It&amp;rsquo;s more of a language for easily manipulating JSON and JSONB objects within Postgres.</description>
    </item>
    
    <item>
      <title>PG Phriday: Stuck in the Middle with Postgres</title>
      <link>https://bonesmoses.org/2017/pg-phriday-stuck-in-the-middle-with-postgres/</link>
      <pubDate>Fri, 10 Mar 2017 12:18:41 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-stuck-in-the-middle-with-postgres/</guid>
      <description>Earlier this year, I implied Postgres was some kind of super middleware for dragging data out of every external resource it could locate. But that example only used the Postgres foreign data wrapper to contact another Postgres server. Why be so unimaginative? The future is as unlimited as it is terrifying.
Meet the new Postgres mascot
Let&amp;rsquo;s start with a few prerequisites. We want to see the combined functionality of a few different Postgres capabilities, so let&amp;rsquo;s try and combine data from MySQL, Postgres, and Javascript using V8.</description>
    </item>
    
    <item>
      <title>PG Phriday: Through the Window</title>
      <link>https://bonesmoses.org/2017/pg-phriday-through-the-window/</link>
      <pubDate>Fri, 03 Mar 2017 13:40:27 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-through-the-window/</guid>
      <description>Now that we know how Postgres window functions work, why not play with them a bit to get a better understanding of their capabilities? So long as we understand window functions are applied after data gathering and aggregation steps, much of their mystery and complexity is defanged. Let&amp;rsquo;s start actually using them for stuff!
Captain Murphy is tired of your nonsense
(Note: I&amp;rsquo;m a bit under the weather today, so this Phriday will probably be a bit truncated and potentially incoherent thanks to the drugs.</description>
    </item>
    
    <item>
      <title>PG Phriday: In the Window</title>
      <link>https://bonesmoses.org/2017/pg-phriday-in-the-window/</link>
      <pubDate>Fri, 24 Feb 2017 13:32:35 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-in-the-window/</guid>
      <description>I&amp;rsquo;ll be the first to admit that I found Postgres window functions fantastically confusing when I first encountered them. They&amp;rsquo;re a powerful and versatile tool for building reports and summaries, but that functionality hides behind a fairly steep learning curve. One of the ways to combat their inherent complexity is to fully explore how they work, instead of just trying to wrap our heads around the expected results.
Window doggies have gotten decidedly smug</description>
    </item>
    
    <item>
      <title>PG Phriday: Getting Assertive</title>
      <link>https://bonesmoses.org/2017/pg-phriday-getting-assertive/</link>
      <pubDate>Fri, 17 Feb 2017 12:57:08 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-getting-assertive/</guid>
      <description>There are a lot of languages available for authoring Postgres functions, but there&amp;rsquo;s nothing quite like the the classic PL/pgSQL. It&amp;rsquo;s SQL! It&amp;rsquo;s not SQL! It&amp;rsquo;s a kind of horrifying mutant crossbreed suitable only for terrifying small children and generating complex reports from a cavalcade of dubious sources! And deep within its twisted entrails is an often overlooked feature usually only available in far more mature entities.
That&amp;rsquo;s right, it&amp;rsquo;s obvious we&amp;rsquo;re referring to the ASSERT statement.</description>
    </item>
    
    <item>
      <title>PG Phriday: Down in the Dumps</title>
      <link>https://bonesmoses.org/2017/pg-phriday-down-in-the-dumps/</link>
      <pubDate>Fri, 10 Feb 2017 14:14:28 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-down-in-the-dumps/</guid>
      <description>These days with multiple Postgres database environments a commonality, it&amp;rsquo;s not unheard of to copy data from one to another. Perhaps a production extract is necessary to properly vet data in a staging environment. Maybe the development environment needs to update its data to reflect an especially pernicious and intractable edge case someone observed. In any of these scenarios, we are likely to extract data from multiple tables to import it elsewhere.</description>
    </item>
    
    <item>
      <title>PG Phriday: Getting Back Up</title>
      <link>https://bonesmoses.org/2017/pg-phriday-getting-back-up/</link>
      <pubDate>Fri, 03 Feb 2017 12:16:10 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-getting-back-up/</guid>
      <description>In light of recent events where GitLab suffered a massive database loss, this is a great opportunity to examine what happened from a Postgres perspective. Since Simon Riggs over at 2ndQuadrant has already chimed in on improvements Gitlib might consider in their procedures, maybe we should walk the conversation back slightly.
This isn&amp;rsquo;t the first time Postgres backup tooling has been misused or misunderstood. The topic of backups hits forums and mailing lists rather frequently.</description>
    </item>
    
    <item>
      <title>PG Phriday: Alien Incursion</title>
      <link>https://bonesmoses.org/2017/pg-phriday-alien-incursion/</link>
      <pubDate>Fri, 27 Jan 2017 12:17:13 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-alien-incursion/</guid>
      <description>Foreign tables have been a headline feature of Postgres ever since the release of version 9.2. Combined with extensions, they&amp;rsquo;re the secret sauce that allows Postgres to pull data from other database engines, flat files, REST interfaces, and possibly every gas station, residence, warehouse, farmhouse, hen house, outhouse, and doghouse in the area.
But that kind of power comes at a significant cost. Since the remote data comes from what is essentially a black box, there are a lot of performance optimizations Postgres can&amp;rsquo;t apply.</description>
    </item>
    
    <item>
      <title>PG Phriday: Everything in Common</title>
      <link>https://bonesmoses.org/2017/pg-phriday-everything-in-common/</link>
      <pubDate>Fri, 20 Jan 2017 14:06:32 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-everything-in-common/</guid>
      <description>Not a lot of people remember what Postgres was like before version 8.4. In many ways, this was the first &amp;ldquo;modern&amp;rdquo; release of the database engine. CTEs, Window Functions, column level permissions, in-place upgrade compatible with subsequent versions, collation support, continuous query statistic collection; it was just a smorgasbord of functionality.
Of these, CTEs or Common Table Expressions, probably enjoy the most user-level exposure; for good reason. Before this, there was no way to perform a recursive query in Postgres, which really hurts in certain situations.</description>
    </item>
    
    <item>
      <title>PG Phriday: Why Postgres</title>
      <link>https://bonesmoses.org/2017/pg-phriday-why-postgres/</link>
      <pubDate>Fri, 13 Jan 2017 14:59:00 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2017/pg-phriday-why-postgres/</guid>
      <description>There are a smorgasbord of database engines out there. From an outside perspective, Postgres is just another on a steadily growing pile of structured data storage mechanisms. Similarly to programming languages like Rust and Go, it&amp;rsquo;s the new and shiny database systems like MongoDB that tend to garner the most attention. On the other hand, more established engines like Oracle or MySQL have a vastly larger lead that seems insurmountable. In either case, enthusiasm and support is likely to be better represented in exciting or established installations.</description>
    </item>
    
    <item>
      <title>PG Phriday: Who Died and Made You Boss?!</title>
      <link>https://bonesmoses.org/2016/pg-phriday-who-died-and-made-you-boss/</link>
      <pubDate>Fri, 16 Dec 2016 11:18:02 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-who-died-and-made-you-boss/</guid>
      <description>Postgres is great, but it can&amp;rsquo;t run itself in all cases. Things come up. Queries go awry. Hardware fails, and users leave transactions open for interminable lengths of time. What happens if one of these things occur while the DBA themselves has a hardware fault? While they&amp;rsquo;re down for maintenance, someone still has to keep an eye on things. For the last PG Phriday of the year completely unrelated to my upcoming surgery, let&amp;rsquo;s talk about what happens when your DBA becomes inoperative due to medical complications.</description>
    </item>
    
    <item>
      <title>PG Phriday: Planner Pitfalls</title>
      <link>https://bonesmoses.org/2016/pg-phriday-planner-pitfalls/</link>
      <pubDate>Fri, 09 Dec 2016 12:07:14 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-planner-pitfalls/</guid>
      <description>Recently a coworker asked me this question:
Should I expect variance between minutes and hours for the same query?
And I was forced to give him this answer:
Potentially, but not commonly. Query planning is an inexact science, and regardless of the query being the &amp;ldquo;same query,&amp;rdquo; the data is not the &amp;ldquo;same data.&amp;rdquo; This isn&amp;rsquo;t generally the case, but on occasion, changes in data can affect the query execution path.</description>
    </item>
    
    <item>
      <title>PG Phriday: Ambling Architecture</title>
      <link>https://bonesmoses.org/2016/pg-phriday-ambling-architecture/</link>
      <pubDate>Fri, 02 Dec 2016 14:26:35 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-ambling-architecture/</guid>
      <description>It&amp;rsquo;s about the time for year-end performance reviews. While I&amp;rsquo;m always afraid I&amp;rsquo;ll narrowly avoid being fired for gross incompetence, that&amp;rsquo;s not usually how it goes. But that meeting did remind me about a bit of restructuring I plan to impose for 2017 that should vastly improve database availability across our organization. Many of the techniques to accomplish that&amp;mdash;while Postgres tools in our case&amp;mdash;are not Postgres-specific concepts.
Much of database fabric design comes down to compromise.</description>
    </item>
    
    <item>
      <title>PG Phriday: Extended Elections</title>
      <link>https://bonesmoses.org/2016/pg-phriday-extended-elections/</link>
      <pubDate>Fri, 25 Nov 2016 11:33:27 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-extended-elections/</guid>
      <description>One of the best features Postgres boasts is the ability to adapt. Any schmo off the street can write an extension and bolt it onto Postgres with nary a second glance. As proof, I&amp;rsquo;m going to whip one up really quick. That should be enough to convince anyone that it takes no skill at all to add functionality to Postgres.
Just so our extension actually does something, let&amp;rsquo;s start off with the instant-runoff code we wrote a few weeks ago.</description>
    </item>
    
    <item>
      <title>PG Phriday: Primal Planner Prep</title>
      <link>https://bonesmoses.org/2016/pg-phriday-primal-planner-prep/</link>
      <pubDate>Fri, 18 Nov 2016 14:22:16 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-primal-planner-prep/</guid>
      <description>The Postgres query planner is house of cards built upon the ever-shifting sand of our data. It has the utterly impossible mission of converting our ridiculous and inane requests into a logical series of fetch, filter, sort, join, and other instructions. Then the resulting steps must be ruthlessly efficient or the execution phase could very well saturate every hardware resource available; Set Theory isn&amp;rsquo;t very forgiving.
Forewarned is forearmed is very apt when applied to database query planners.</description>
    </item>
    
    <item>
      <title>PG Phriday: Instant Runoff Through SQL</title>
      <link>https://bonesmoses.org/2016/pg-phriday-instant-runoff-through-sql/</link>
      <pubDate>Fri, 11 Nov 2016 14:47:41 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-instant-runoff-through-sql/</guid>
      <description>The United States held an election recently, and there has been some &amp;hellip; mild controversy regarding the results. Many raised issues about this before the election itself, but what if we had used instant-runoff voting instead? More importantly, can we implement it with Postgres?
Well, the answer to the last question is a strong affirmative. So long as we don&amp;rsquo;t break the results down into voting districts, and make wild unsupported assumptions regarding rankings, that is.</description>
    </item>
    
    <item>
      <title>PG Phriday: MySQL Mingle</title>
      <link>https://bonesmoses.org/2016/pg-phriday-mysql-mingle/</link>
      <pubDate>Fri, 28 Oct 2016 14:05:13 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-mysql-mingle/</guid>
      <description>Through the wonderful magic of corporate agreements, I&amp;rsquo;ve been pulled back into (hopefully temporarily) managing a small army of MySQL servers. No! Why can&amp;rsquo;t this just be a terrible nightmare?! Does anyone deserve such debasement?
Side effects of using MySQL may include&amp;hellip;
Hyperbole? Maybe a little. If MySQL was really that terrible, it wouldn&amp;rsquo;t be in such widespread use. However, as a Postgres DBA for so many years, I&amp;rsquo;ve come to appreciate what really sets it apart from engines and development approaches like those showcased in MySQL.</description>
    </item>
    
    <item>
      <title>PG Phriday: Broken Parts</title>
      <link>https://bonesmoses.org/2016/pg-phriday-broken-parts/</link>
      <pubDate>Fri, 21 Oct 2016 11:48:49 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-broken-parts/</guid>
      <description>Partitioning tables in Postgres can be an extremely risky endeavor. Unfortunately on many larger systems, it&amp;rsquo;s also essentially a requirement; the maximum size of a Postgres table is 32TB. This isn&amp;rsquo;t just because converting an existing table to a series of partitions is expensive or time consuming. We must consider how the query planner will react to the partitioned version of a table. There&amp;rsquo;s also the very real risk we will (or already have) implement flaws in the trigger or constraint logic.</description>
    </item>
    
    <item>
      <title>PG Phriday: Perfectly Logical</title>
      <link>https://bonesmoses.org/2016/pg-phriday-perfectly-logical/</link>
      <pubDate>Fri, 14 Oct 2016 13:29:06 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-perfectly-logical/</guid>
      <description>One of the things Postgres has been &amp;ldquo;missing&amp;rdquo; for a while is logical replication based on activity replay. Until fairly recently, in order to replicate single tables from one database to another, we had to encumber the table with performance-robbing triggers coupled to a third party daemon to manage transport. Those days might finally be behind us thanks to pglogical.
But is it easy to use? Let&amp;rsquo;s give it a try on our trusty sensor_log table.</description>
    </item>
    
    <item>
      <title>PG Phriday: Pesky Partition Plans</title>
      <link>https://bonesmoses.org/2016/pg-phriday-pesky-partition-plans/</link>
      <pubDate>Fri, 07 Oct 2016 14:05:51 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-pesky-partition-plans/</guid>
      <description>For all of those warehouse queries that never seem to complete before the heat death of the universe, there&amp;rsquo;s often a faster version. Sometimes this is due to a fundamental misunderstanding of how queries work, or how Postgres specifically functions. The trick is knowing when to back away slowly from an ugly but efficient query, and when to inject a flurry of predicates to fully illustrate the original intent of the query so the planner makes better decisions.</description>
    </item>
    
    <item>
      <title>PG Phriday: Postgres 9.6 Pluses</title>
      <link>https://bonesmoses.org/2016/pg-phriday-postgres-9.6-pluses/</link>
      <pubDate>Fri, 30 Sep 2016 15:00:55 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-postgres-9.6-pluses/</guid>
      <description>Timing can often be extremely fortuitous. Yesterday marked the official release of Postgres 9.6!
Yaaaaayy&amp;hellip;
I&amp;rsquo;ve covered 9.6 previously, but that was a beta and clearly doesn&amp;rsquo;t count. Besides, while the beta was undoubtedly high quality, the frequency of patch turnover is enough to produce a significantly different final release. So let&amp;rsquo;s skim through the release notes a bit for stuff that really stands out or seems different from last time.</description>
    </item>
    
    <item>
      <title>PG Phriday: Bodacious Benchmarks</title>
      <link>https://bonesmoses.org/2016/pg-phriday-bodacious-benchmarks/</link>
      <pubDate>Fri, 23 Sep 2016 14:56:45 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-bodacious-benchmarks/</guid>
      <description>When it comes to putting Postgres through its paces, we often turn to benchmarks to absolutely bury it under a torrent of oppressive activity. It&amp;rsquo;s a great way to obtain maximum performance metrics and also observe how Postgres reacts and breaks down under such pressure. But these kinds of tests aren&amp;rsquo;t really practical, are they? After all, many such simulated workloads are nothing but bragging rights measured against previous Postgres releases, or for hardware comparisons.</description>
    </item>
    
    <item>
      <title>PG Phriday: Working Together</title>
      <link>https://bonesmoses.org/2016/pg-phriday-working-together/</link>
      <pubDate>Fri, 16 Sep 2016 16:00:49 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-working-together/</guid>
      <description>There seem to be quite a few popular Postgres conferences peppering the globe these days. This year, Simon Riggs of 2ndQuadrant gave the sponsored keynote at Postgres Open. I&amp;rsquo;m not entirely sure it was intentional since it wasn&amp;rsquo;t the title of his presentation, but he uttered the words &amp;ldquo;working together to make Postgres better for everyone&amp;rdquo; at one point. The phrase &amp;ldquo;Working Together&amp;rdquo; really stood out, because that&amp;rsquo;s a significant part of what makes Postgres so great.</description>
    </item>
    
    <item>
      <title>PG Phriday: Irrelevant Inclinations</title>
      <link>https://bonesmoses.org/2016/pg-phriday-irrelevant-inclinations/</link>
      <pubDate>Fri, 09 Sep 2016 11:32:15 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-irrelevant-inclinations/</guid>
      <description>Say hi to Princess Kittybutt. She&amp;rsquo;ll be our mascot (and subject) for today. We&amp;rsquo;ll get to her in a minute.
When the only tool you have is a hammer, everything becomes a nail, right? With Postgres becoming more of an environment than simply a database engine, this colloquialism is starting to resemble reality. Of course, that&amp;rsquo;s not necessarily a bad thing! As Postgres accumulates copious and varied extensions, its role as an adaptive middleware solidifies.</description>
    </item>
    
    <item>
      <title>PG Phriday: Cult of Functionality</title>
      <link>https://bonesmoses.org/2016/pg-phriday-cult-of-functionality/</link>
      <pubDate>Fri, 02 Sep 2016 14:00:25 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-cult-of-functionality/</guid>
      <description>It&amp;rsquo;s no surprise Postgres does more than merely store data; you can&amp;rsquo;t do everything with SQL. Often, it&amp;rsquo;s often more beneficial to process data locally without transmitting it to a client interface. Local manipulation can save hours in network traffic alone, let alone client-side allocation and per-row processing. Databases like Postgres are specifically for bulk data operations, so why not take advantage?
But doing that requires functions&amp;mdash;anonymous or otherwise&amp;mdash;and a Turing-complete language to write them with.</description>
    </item>
    
    <item>
      <title>PG Phriday: Forensic Fundamentals</title>
      <link>https://bonesmoses.org/2016/pg-phriday-forensic-fundamentals/</link>
      <pubDate>Fri, 19 Aug 2016 13:42:45 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-forensic-fundamentals/</guid>
      <description>All database engines, even Postgres, occasionally present a seemingly intractable problem that will drive everyone insane while attempting to isolate it. All it takes is the perfect storm of situational circumstances, and even a perfectly running stack of software will grind to a screeching halt. It&amp;rsquo;s situations like this that we must turn to various Postgres forensic tools to track down the issue before management starts firing people in frustration.</description>
    </item>
    
    <item>
      <title>PG Phriday: Inevitable Interdiction</title>
      <link>https://bonesmoses.org/2016/pg-phriday-inevitable-interdiction/</link>
      <pubDate>Fri, 12 Aug 2016 11:48:24 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-inevitable-interdiction/</guid>
      <description>&amp;ldquo;Hey! That row shouldn&amp;rsquo;t be in that table! How the heck did that get there!? Alright, who wrote the application client filters, because you&amp;rsquo;re fired!&amp;rdquo;
Good application developers know never to trust client input, but not all realize that a single app is rarely the only vector into a database. Databases don&amp;rsquo;t just preserve data with various levels of paranoia, they&amp;rsquo;re also the central nexus of a constellation of apps, scripts, APIs, GUIs, BMIs, HMOs, and STDs.</description>
    </item>
    
    <item>
      <title>PG Phriday: Elephantary, My Dear</title>
      <link>https://bonesmoses.org/2016/pg-phriday-elephantary-my-dear/</link>
      <pubDate>Fri, 05 Aug 2016 12:38:19 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-elephantary-my-dear/</guid>
      <description>Occasionally with a lot of similar-sounding terminology, there&amp;rsquo;s ample room for misunderstandings. This is especially relevant with overloaded terms like &amp;lsquo;index&amp;rsquo;, which can be anything from a data lookup to a term used in mutual funds. This is further complicated if a developer&amp;rsquo;s first experience with databases is with another variant with sufficiently divergent syntax, methodology, or assumptions. To prevent future code refactors born of misunderstandings, let&amp;rsquo;s build a basic Postgres glossary to act as an executive summary for app devs.</description>
    </item>
    
    <item>
      <title>PG Phriday: Constipated Connections</title>
      <link>https://bonesmoses.org/2016/pg-phriday-constipated-connections/</link>
      <pubDate>Fri, 29 Jul 2016 11:53:49 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-constipated-connections/</guid>
      <description>We&amp;rsquo;ve all had it happen. One day, we run a query or function and we wait for the result. And we wait. And we wait. Eventually, we realize something is wrong and find a DBA and yell at them.
&amp;ldquo;Hey Postgres dude!&amp;rdquo; we scream. &amp;ldquo;The database is slow!&amp;rdquo;
Or maybe we can&amp;rsquo;t even get a connection. Postgres just keeps saying something about too many clients. This application isn&amp;rsquo;t launching and there are ten managers breathing down our neck and we panic.</description>
    </item>
    
    <item>
      <title>PG Phriday: The Audacity of NoSQL</title>
      <link>https://bonesmoses.org/2016/pg-phriday-the-audacity-of-nosql/</link>
      <pubDate>Fri, 22 Jul 2016 12:55:44 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-the-audacity-of-nosql/</guid>
      <description>The pure, unadulterated, presumptuous impudence of NoSQL. Engines like MongoDB recklessly discard concepts like ACID in some futile quest to achieve &amp;ldquo;web scale&amp;rdquo;, and end up accomplishing neither. RDBMS systems have literally decades of history to draw upon, and have long since conquered the pitfalls NoSQL platforms are just now encountering. There may be something to a couple of them, but by and large, they&amp;rsquo;re nothing we really need.
At least, that&amp;rsquo;s something I might have said a couple of weeks ago.</description>
    </item>
    
    <item>
      <title>PG Phriday: A Postgres Perspective on MongoDB</title>
      <link>https://bonesmoses.org/2016/pg-phriday-a-postgres-perspective-on-mongodb/</link>
      <pubDate>Fri, 15 Jul 2016 15:06:24 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-a-postgres-perspective-on-mongodb/</guid>
      <description>I&amp;rsquo;ve been almost exclusively a Postgres DBA for a seemingly interminable length of time. While this is good for specializing, nobody wants to be a One-Trick Pony. And aside from the occasional bit of Python to write more advanced tools when Bash isn&amp;rsquo;t up to the job, it&amp;rsquo;s All Postgres All The Time. While few things would make me happier, it pays to branch out occasionally.
When NoSQL databases hit the scene a few years ago, I pretty much ignored them wholesale.</description>
    </item>
    
    <item>
      <title>PG Phriday: All in a Name</title>
      <link>https://bonesmoses.org/2016/pg-phriday-all-in-a-name/</link>
      <pubDate>Fri, 08 Jul 2016 16:29:40 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-all-in-a-name/</guid>
      <description>Naming objects in a database can sometimes be an exercise in frustration. What kind of guidelines should we follow for schemas and tables? What about columns or variables? Should the same rules apply to indexes, constraints, and sequences? Functions and triggers are much different than all of those elements, yet still exist within the same namespace. Then we have to contend with Postgres reserved words, many of which are probably only obvious to someone well versed in database lingo.</description>
    </item>
    
    <item>
      <title>PG Phriday: EXCEPTIONal Performance</title>
      <link>https://bonesmoses.org/2016/pg-phriday-exceptional-performance/</link>
      <pubDate>Fri, 01 Jul 2016 11:41:45 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-exceptional-performance/</guid>
      <description>Like any programming language, the PL/pgSQL Postgres procedural language has plenty of handy control structures. Among those thankfully modern accoutrements is the humble EXCEPTION block. While not the more prevalent try/catch methodology, we can use BEGIN anywhere to start an embedded section for the same effect.
Knowing this is the case, what are the costs of actually using them? Postgres is fairly streamlined, and as such, can take several shortcuts when there are no exception blocks within a chunk of PL/pgSQL.</description>
    </item>
    
    <item>
      <title>PG Phriday: Let There Be Jank</title>
      <link>https://bonesmoses.org/2016/pg-phriday-let-there-be-jank/</link>
      <pubDate>Fri, 17 Jun 2016 13:26:37 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-let-there-be-jank/</guid>
      <description>One way the Postgres project is subtly misleading, is that it becomes easy to forget that not all other projects are nearly as well managed. This becomes more relevant when delving into niches that lack sufficient visibility to expose the more obvious deficiencies. As much as we like Postgres, it&amp;rsquo;s not quite as popular as it could be. This makes some of the side projects infrequently used, and as a direct consequence, they can often resemble jerky automatons cobbled together out of spit and bailing wire.</description>
    </item>
    
    <item>
      <title>PG Phriday: Moving to 9.5</title>
      <link>https://bonesmoses.org/2016/pg-phriday-moving-to-9.5/</link>
      <pubDate>Fri, 10 Jun 2016 14:01:15 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-moving-to-9.5/</guid>
      <description>There comes a day in every young database&amp;rsquo;s life that it&amp;rsquo;s time to move on. I&amp;rsquo;m sorry 9.4, but the day has come that we must say goodbye. It&amp;rsquo;s not like we haven&amp;rsquo;t had our good times. While I truly appreciate everything you&amp;rsquo;ve done for me, we must part ways. I&amp;rsquo;m far too needy, and I can&amp;rsquo;t demand so much of you in good conscience. May your future patches make you and your other suitors happy!</description>
    </item>
    
    <item>
      <title>PG Phriday: Rapid Prototyping</title>
      <link>https://bonesmoses.org/2016/pg-phriday-rapid-prototyping/</link>
      <pubDate>Fri, 03 Jun 2016 14:16:22 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-rapid-prototyping/</guid>
      <description>Ah, source control. From Subversion to git and everything in between, we all love to manage our code. The ability to quickly branch from an existing base is incredibly important to exploring and potentially abandoning divergent code paths. One often overlooked Postgres feature is the template database. At first glance, it&amp;rsquo;s just a way to ensure newly created databases contain some base functionality without having to bootstrap every time, but it&amp;rsquo;s so much more than that.</description>
    </item>
    
    <item>
      <title>PG Phriday: Converting to Horizontal Distribution</title>
      <link>https://bonesmoses.org/2016/pg-phriday-converting-to-horizontal-distribution/</link>
      <pubDate>Fri, 27 May 2016 13:28:04 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-converting-to-horizontal-distribution/</guid>
      <description>Now that we&amp;rsquo;ve decided to really start embracing horizontal scaling builds, there is a critically important engine-agnostic element we need to examine. Given an existing table, how exactly should we split up the contents across our various nodes during the conversion process? Generally this is done by selecting a specific column and applying some kind of hash or custom distribution mechanism to ensure all node contents are reasonably balanced. But how do we go about figuring that out?</description>
    </item>
    
    <item>
      <title>PG Phriday: Trusty Table Tiers</title>
      <link>https://bonesmoses.org/2016/pg-phriday-trusty-table-tiers/</link>
      <pubDate>Fri, 20 May 2016 11:00:38 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-trusty-table-tiers/</guid>
      <description>I always advocate breaking up large Postgres tables for a few reasons. Beyond query performance concerns, maintaining one monolithic structure is always more time consuming and consequentially more dangerous. The time required to create a dozen small indexes may be slightly longer than a single larger one, but we can treat the smaller indexes as incremental. If we want to rebuild, add more indexes, or fix any corruption, why advocate an all-or-nothing proposition?</description>
    </item>
    
    <item>
      <title>PG Phriday: Bountiful Beta Benefits</title>
      <link>https://bonesmoses.org/2016/pg-phriday-bountiful-beta-benefits/</link>
      <pubDate>Fri, 13 May 2016 15:41:52 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-bountiful-beta-benefits/</guid>
      <description>The Postgres developers recently announced the availability of the first public beta for Postgres 9.6. I would be highly remiss to ignore such an opportunity to dig into any interesting functionality listed in the 9.6 release notes. All in all, it&amp;rsquo;s a pretty exciting series of advancements, and assuming this is a glimpse of what we see when 9.6 drops, I&amp;rsquo;d say we&amp;rsquo;re on the right track.
Plentiful Parallelism Probably the most high-profile addition for 9.</description>
    </item>
    
    <item>
      <title>PG Phriday: Big Data is Hard</title>
      <link>https://bonesmoses.org/2016/pg-phriday-big-data-is-hard/</link>
      <pubDate>Fri, 06 May 2016 12:43:43 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-big-data-is-hard/</guid>
      <description>Let&amp;rsquo;s just get the obvious out of the way early: dealing with multiple Terabytes or Petabytes in a database context is something of a nightmare. Distributing it, retrieving it, processing it, aggregating and reporting on it, are all complicated&amp;mdash;and perhaps worst of all&amp;mdash;non-intuitive. Everything from tooling and maintenance, to usage and input, are either ad-hoc or obfuscated by several special-purpose APIs and wrappers.
One of the reasons a self-scaling database is such a killer app, derives from the failure rate from having so many moving parts.</description>
    </item>
    
    <item>
      <title>PG Phriday: Derivation Deluge</title>
      <link>https://bonesmoses.org/2016/pg-phriday-derivation-deluge/</link>
      <pubDate>Fri, 29 Apr 2016 14:46:14 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-derivation-deluge/</guid>
      <description>Having run into a bit of a snag with Postgres-XL, and not wanting to be dead in the water with our project, I went on a bit of a knowledge quest. Database scaling is hard, so I expected a bunch of either abandoned or proprietary approaches. In addition, as a huge fans of Postgres, compatibility or outright use of the Postgres core was a strict prerequisite.
So, what options are out there?</description>
    </item>
    
    <item>
      <title>PG Phriday: Growing Pains</title>
      <link>https://bonesmoses.org/2016/pg-phriday-growing-pains/</link>
      <pubDate>Fri, 22 Apr 2016 14:36:18 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-growing-pains/</guid>
      <description>Postgres is a great tool for most databases. Larger installations however, pretty much require horizontal scaling; addressing multi-TB tables relies on multiple parallel storage streams thanks to the laws of physics. It&amp;rsquo;s how all immense data stores work, and for a long time, Postgres really had no equivalent that wasn&amp;rsquo;t a home-grown shard management wrapper. To that end, we&amp;rsquo;ve been considering Postgres-XL as a way to fill that role. At first, everything was going well.</description>
    </item>
    
    <item>
      <title>PG Phriday: Postgres Password Practices</title>
      <link>https://bonesmoses.org/2016/pg-phriday-postgres-password-practices/</link>
      <pubDate>Fri, 15 Apr 2016 12:49:59 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-postgres-password-practices/</guid>
      <description>Connecting to a Postgres database can be a headache for end users and DBAs alike. Not because of the work involved, but the general irritation of managing passwords&amp;mdash;an issue common to any system that requires authentication controls.
The user wants to say, &amp;ldquo;Who am I? None of your business!&amp;rdquo;
While the database is more comfortable with, &amp;ldquo;Go away, before I taunt you a second time!&amp;rdquo;
Well, there&amp;rsquo;s some middle ground everyone can enjoy, and a few Postgres-specific caveats which add a bit of flavor to the whole interaction.</description>
    </item>
    
    <item>
      <title>PG Phriday: JOIN the Club</title>
      <link>https://bonesmoses.org/2016/pg-phriday-join-the-club/</link>
      <pubDate>Fri, 08 Apr 2016 12:13:14 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-join-the-club/</guid>
      <description>I&amp;rsquo;ve been going on and on about esoteric Postgres features for so long, sometimes I forget my own neophyte beginnings. So let&amp;rsquo;s back way off and talk about how JOINs work. What are they? What do they do? Why would you use one? What can go wrong? It&amp;rsquo;s easier than you might imagine, but there are definitely some subtleties to account for.
To make this more relatable, let&amp;rsquo;s start with a club of pet owners that likes to keep track of everything:</description>
    </item>
    
    <item>
      <title>PG Phriday: 5 Reasons Postgres Sucks!  (You Won&#39;t Believe Number 3!)</title>
      <link>https://bonesmoses.org/2016/pg-phriday-5-reasons-postgres-sucks-you-wont-believe-number-3/</link>
      <pubDate>Fri, 01 Apr 2016 12:09:56 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-5-reasons-postgres-sucks-you-wont-believe-number-3/</guid>
      <description>I&amp;rsquo;ve been a Postgres DBA since 2005. After all that time, I&amp;rsquo;ve come to a conclusion that I&amp;rsquo;m embarrassed I didn&amp;rsquo;t reach much earlier: Postgres is awful. This isn&amp;rsquo;t a &amp;ldquo;straw that broke the camel&amp;rsquo;s back&amp;rdquo; kind of situation; there is a litany of ridiculous idiocy in the project that&amp;rsquo;s, frankly, more than enough to stave off any DBA, end user, or developer. But I&amp;rsquo;ll limit my list to five, because clickbait.</description>
    </item>
    
    <item>
      <title>PG Phriday: Mining for Metadata</title>
      <link>https://bonesmoses.org/2016/pg-phriday-mining-for-metadata/</link>
      <pubDate>Fri, 18 Mar 2016 12:26:02 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-mining-for-metadata/</guid>
      <description>Every good database engine has a system catalog that describes the myriad of structures that model and preserve our data. Of course this is expected, as it would be somewhat silly for a database system not to use tables to represent its internal mechanisms. But that doesn&amp;rsquo;t mean they have to be humanly readable, or even make sense without a series of views or esoteric functions to decipher them. The information_schema standard serves a necessary role in that regard, and the Postgres implementation is extremely comprehensive.</description>
    </item>
    
    <item>
      <title>PG Phriday: Secret of the Ooze</title>
      <link>https://bonesmoses.org/2016/pg-phriday-secret-of-the-ooze/</link>
      <pubDate>Fri, 11 Mar 2016 11:54:36 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-secret-of-the-ooze/</guid>
      <description>A few days ago, a developer came to me with that inevitable scenario that every DBA secretly dreads: a need for a dynamic table structure. After I&amp;rsquo;d finished dying inside, I explained the various architectures that could give him what he needed, and then I excused myself to another room so I could weep silently without disturbing my coworkers. But was it really that bad? Databases have come a long way since the Bad Old Days when there were really only two viable approaches to table polymorphism.</description>
    </item>
    
    <item>
      <title>PG Phriday: Being A Tattletale</title>
      <link>https://bonesmoses.org/2016/pg-phriday-being-a-tattletale/</link>
      <pubDate>Fri, 04 Mar 2016 13:26:22 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-being-a-tattletale/</guid>
      <description>In a heterogeneous database environment, it&amp;rsquo;s not uncommon for object creation and modification to occur haphazardly. Unless permissions are locked down to prevent it, users and applications will create tables, modify views, or otherwise invoke DDL without the DBA&amp;rsquo;s knowledge. Or perhaps permissions are exceptionally draconian, yet they&amp;rsquo;ve been circumvented or a superuser account has gone rogue. Maybe we just need to audit database modifications to fulfill oversight obligations. Whatever the reason, Postgres has it covered with event triggers.</description>
    </item>
    
    <item>
      <title>PG Phriday: Corralling the Hordes</title>
      <link>https://bonesmoses.org/2016/pg-phriday-corralling-the-hordes/</link>
      <pubDate>Fri, 26 Feb 2016 12:28:10 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-corralling-the-hordes/</guid>
      <description>Ah, users. They log in, query things, accidentally delete critical data, and drop tables for giggles. Bane or boon, user accounts are a necessary evil in all databases for obvious reasons. And what would any stash of data be if nobody had access? Someone needs to own the objects, at the very least. So how can we be responsible with access vectors while hosting a Postgres database? We already covered automating grants, so let&amp;rsquo;s progress to the next step: building a &amp;ldquo;best practice&amp;rdquo; access stack.</description>
    </item>
    
    <item>
      <title>PG Phriday: Replacing Business Logic</title>
      <link>https://bonesmoses.org/2016/pg-phriday-replacing-business-logic/</link>
      <pubDate>Fri, 19 Feb 2016 14:01:53 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-replacing-business-logic/</guid>
      <description>Back in 2005, I started a new job with a company that did work for other businesses. Their data model was designed by developers and they had no DBA, as is pretty common in smaller organizations. A critical part of our main application relied on an event log that captured customer activity and relayed their final decision to the client for reconciliation. One day someone noticed that there was a bug in the system that resolved the final decision from the event stack, and panic ensued.</description>
    </item>
    
    <item>
      <title>PG Phriday: Database and Schema Basics</title>
      <link>https://bonesmoses.org/2016/pg-phriday-database-and-schema-basics/</link>
      <pubDate>Fri, 12 Feb 2016 12:58:01 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-database-and-schema-basics/</guid>
      <description>Sure, managing a Postgres cluster is great. We&amp;rsquo;ve got the software installed, more tool wrappers than we can wave several sticks at, and a running cluster that&amp;rsquo;s ready to do our bidding. But what do we do with it? In fact, what is a Postgres cluster anyway? How are databases involved? What about schemas? There&amp;rsquo;s critically important nomenclature that new users may find somewhat non-intuitive, so let&amp;rsquo;s demystify things a bit.</description>
    </item>
    
    <item>
      <title>PG Phriday: Tackling Intractable ACLs</title>
      <link>https://bonesmoses.org/2016/pg-phriday-tackling-intractable-acls/</link>
      <pubDate>Fri, 05 Feb 2016 11:11:35 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-tackling-intractable-acls/</guid>
      <description>Say that three times fast! Joking aside, managing database object access is a headache for users and DBAs alike. Postgres isn&amp;rsquo;t really an exception in that regard, but it does provide a few tools to greatly reduce the pain involved. The crazy thing is that few people even know this feature exists. I&amp;rsquo;ve known about it for a while myself, but it always slips my mind because it feels so wrong not to explicitly grant permissions.</description>
    </item>
    
    <item>
      <title>PG Phriday: COPY and Alternative Import Methods</title>
      <link>https://bonesmoses.org/2016/pg-phriday-copy-and-alternative-import-methods/</link>
      <pubDate>Fri, 29 Jan 2016 12:16:11 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-copy-and-alternative-import-methods/</guid>
      <description>I recently noted that the COPY command in Postgres doesn&amp;rsquo;t have syntax to skip columns in source data when importing it into a table. This necessitates using one or more junk columns to capture data we&amp;rsquo;ll just be throwing away. During that, I completely forgot that friendly devs had contributed alternative file handling methods as Foreign Data Wrappers. Most people think of foreign wrappers as a method for interacting with remote databases.</description>
    </item>
    
    <item>
      <title>PG Phriday: Joining the Big Leagues</title>
      <link>https://bonesmoses.org/2016/pg-phriday-joining-the-big-leagues/</link>
      <pubDate>Fri, 22 Jan 2016 11:05:49 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-joining-the-big-leagues/</guid>
      <description>I&amp;rsquo;ve maintained since about 2011, that the problem with scaling Postgres to truly immense installations could be solved by a query coordinator. Why? Most sharding systems utilize an application-level distribution mechanism, which may or may not leverage an inherent hashing algorithm. This means each Postgres instance can be treated independently of all the others if the distribution process is known. On a cleverly architected system, the application is algorithm aware, and can address individual shards through a driver proxy or accessor class.</description>
    </item>
    
    <item>
      <title>PG Phriday: Database Creation Workshop</title>
      <link>https://bonesmoses.org/2016/pg-phriday-database-creation-workshop/</link>
      <pubDate>Fri, 15 Jan 2016 13:15:52 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-database-creation-workshop/</guid>
      <description>Postgres theory, feature discussion, and advocacy are fun. But even I&amp;rsquo;ll admit it&amp;rsquo;s nice to have some practical application every once in a while. This week, we&amp;rsquo;re going to build an actual database.
But what would be small enough for a proof of concept, yet somewhat interesting? Well, I&amp;rsquo;m a fan of Hearthstone. It&amp;rsquo;s a silly card game much like Magic: The Gathering, but has the distinct aura of &amp;ldquo;eSports!&amp;rdquo; Regardless, it&amp;rsquo;s a fun little time waster, and has a few hundred data points we can manipulate.</description>
    </item>
    
    <item>
      <title>PG Phriday: How Far We&#39;ve Come</title>
      <link>https://bonesmoses.org/2016/pg-phriday-how-far-weve-come/</link>
      <pubDate>Fri, 08 Jan 2016 12:10:02 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2016/pg-phriday-how-far-weve-come/</guid>
      <description>With extremely fortuitous timing for my first article following the holidays, Postgres 9.5 was officially been released into the wild just yesterday. I tend to think about past releases when new versions come out, and consider everything that has changed since the early days. How early? I&amp;rsquo;ve personally been using Postgres since 2001, when my new employer bellyached about their Postgres 6.5 database crashing frequently and generally making their lives more difficult.</description>
    </item>
    
    <item>
      <title>PG Phriday: JSON and JSONB Revisited</title>
      <link>https://bonesmoses.org/2015/pg-phriday-json-and-jsonb-revisited/</link>
      <pubDate>Fri, 18 Dec 2015 12:25:36 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-json-and-jsonb-revisited/</guid>
      <description>With Postgres 9.5 on the horizon, I figured it&amp;rsquo;s a good time to see how things have advanced since my last dive into that particular ocean. This is probably particularly relevant since even MongoDB, a JSON-driven NoSQL database, is now partially powered by Postgres. A lot of people found that particular revelation quite shocking, but maybe they shouldn&amp;rsquo;t, given the advancements embedded within the last couple of Postgres releases.
As it turns out, there are quite a few advancements that really make JSONB a powerful addition to Postgres.</description>
    </item>
    
    <item>
      <title>PG Phriday: Postgres-XL and Horizontal Scaling</title>
      <link>https://bonesmoses.org/2015/pg-phriday-postgres-xl-and-horizontal-scaling/</link>
      <pubDate>Fri, 11 Dec 2015 15:51:07 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-postgres-xl-and-horizontal-scaling/</guid>
      <description>With all of the upheaval in the Postgres world thanks to advancements in extensions, foreign data wrappers, and background workers, it&amp;rsquo;s getting pretty difficult to keep track of everything! One of these rapidly moving targets is Postgres-XL and its role in helping Postgres scale outward. Large warehouses have a critical need for horizontal scaling, as the very laws of physics make it effectively impossible to perform aggregate queries on tables consisting of several billion rows.</description>
    </item>
    
    <item>
      <title>PG Phriday: Displaced Durability</title>
      <link>https://bonesmoses.org/2015/pg-phriday-displaced-durability/</link>
      <pubDate>Fri, 04 Dec 2015 11:41:49 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-displaced-durability/</guid>
      <description>A lot of DBAs are quite adamant regarding ACID compliance. I count myself among them. But unlike the other parts of the acronym, there are times when data durability isn&amp;rsquo;t actually a high priority. Data staging holding areas, temporary tables that need visibility across sessions, and other transient information do not require zealous protection. As a DBA it feels weird saying it, but there&amp;rsquo;s just some data we simply don&amp;rsquo;t care about losing.</description>
    </item>
    
    <item>
      <title>PG Phriday: Cluster Control</title>
      <link>https://bonesmoses.org/2015/pg-phriday-cluster-control/</link>
      <pubDate>Fri, 20 Nov 2015 10:45:06 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-cluster-control/</guid>
      <description>It has occurred to me that I may have been spending a bit too much time being excited about new Postgres features and developments in the community. One of the intents of this weekly article was for educational purposes, so this week, let&amp;rsquo;s get back to basics. To that end, the topic for this week boils down to the tools available for managing Postgres instances, and how to use them. Surprisingly, it&amp;rsquo;s not as straight-forward as you might think.</description>
    </item>
    
    <item>
      <title>PG Phriday: Parallel Sequence Scans</title>
      <link>https://bonesmoses.org/2015/pg-phriday-parallel-sequence-scans/</link>
      <pubDate>Fri, 13 Nov 2015 11:49:43 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-parallel-sequence-scans/</guid>
      <description>A couple days ago, Robert Haas announced that he checked in the first iteration of parallel sequence scans in the Postgres 9.6 branch. And no, that&amp;rsquo;s not a typo. One of the great things about the Postgres devs is that they have a very regimented system of feature freezes to help ensure timely releases. Thus even though 9.5 just released its second beta, they&amp;rsquo;re already working on 9.6.
So what is a sequence scan, and why does this matter?</description>
    </item>
    
    <item>
      <title>PG Phriday: Sidewinder</title>
      <link>https://bonesmoses.org/2015/pg-phriday-sidewinder/</link>
      <pubDate>Fri, 06 Nov 2015 14:18:00 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-sidewinder/</guid>
      <description>Maintaining a Postgres database can involve a lot of busywork. This is especially true for more robust architectures that allocate at least one replica for failover purposes. It&amp;rsquo;s still fairly common for a DBA to create a replica to accommodate emergency or upgrade scenarios, only to have to repeat the process when it came time to revert to the original master system. It&amp;rsquo;s not safe to simply subscribe the original primary to the newly promoted secondary, so this leaves either creating a new clone, or using rsync to synchronize all of the files first.</description>
    </item>
    
    <item>
      <title>PG Phriday: Massively Distributed Operation</title>
      <link>https://bonesmoses.org/2015/pg-phriday-massively-distributed-operation/</link>
      <pubDate>Fri, 30 Oct 2015 12:12:46 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-massively-distributed-operation/</guid>
      <description>Postgres has been lacking something for quite a while, and more than a few people have attempted to alleviate the missing functionality multiple times. I&amp;rsquo;m speaking of course, about parallel queries. There are several reasons for this, and among them include various distribution and sharding needs for large data sets. When tables start to reach hundreds of millions, or even billions of rows, even high cardinality indexes produce results very slowly.</description>
    </item>
    
    <item>
      <title>PG Phriday: Parallel-O-Postgres</title>
      <link>https://bonesmoses.org/2015/pg-phriday-parallel-o-postgres/</link>
      <pubDate>Fri, 16 Oct 2015 11:58:11 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-parallel-o-postgres/</guid>
      <description>I wasn&amp;rsquo;t able to write an article last week due to an unexpected complication regarding tests I was running to verify its contents. So this week, it&amp;rsquo;s going to be extra special! Also long.
What&amp;rsquo;s the fastest way to load a Postgres table? If you believe the documentation, the COPY command is the best way to unceremoniously heave data into a table. Fortunately after all of our talk about partitions, our minds are primed and ready to think in chunks.</description>
    </item>
    
    <item>
      <title>PG Phriday: When Partitioning Goes Wrong</title>
      <link>https://bonesmoses.org/2015/pg-phriday-when-partitioning-goes-wrong/</link>
      <pubDate>Fri, 02 Oct 2015 16:33:10 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-when-partitioning-goes-wrong/</guid>
      <description>I&amp;rsquo;ve been talking about partitions a lot recently, and I&amp;rsquo;ve painted them in a very positive light. Postgres partitions are a great way to distribute data along a logical grouping and work best when data is addressed in a fairly isloated manner. But what happens if we direct a basic query at a partitioned table in such a way that we ignore the allocation scheme? Well, what happens isn&amp;rsquo;t pretty. Let&amp;rsquo;s explore in more detail.</description>
    </item>
    
    <item>
      <title>PG Phriday: Database Infrastructure</title>
      <link>https://bonesmoses.org/2015/pg-phriday-database-infrastructure/</link>
      <pubDate>Fri, 25 Sep 2015 12:07:41 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-database-infrastructure/</guid>
      <description>This PG Phriday is going to be a bit different. During my trip to Postgres Open this year, I attended a talk I had originally written off as &amp;ldquo;some Red Hat stuff.&amp;rdquo; But I saw the word &amp;ldquo;containers&amp;rdquo; in the PostgreSQL in Containers at Scale talk and became intrigued. A few days later, I had something of an epiphany: I&amp;rsquo;ve been wrong about servers for years; we all have.
That&amp;rsquo;s a pretty bold claim, so it needs some background.</description>
    </item>
    
    <item>
      <title>PG Phriday: The Bones of High Availability</title>
      <link>https://bonesmoses.org/2015/pg-phriday-the-bones-of-high-availability/</link>
      <pubDate>Fri, 18 Sep 2015 18:07:53 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-the-bones-of-high-availability/</guid>
      <description>Well, the bell has tolled, the day is over, and at the end of it all, Postgres Open has ended its fifth year in service of the community. I will say it was certainly an honor to speak again this year, though now that it&amp;rsquo;s not conveniently in Chicago, I&amp;rsquo;ll have to work harder to justify hauling myself across the country next year. Of course at this point, I&amp;rsquo;d feel guilty if I didn&amp;rsquo;t at least try, assuming any of my submissions are accepted.</description>
    </item>
    
    <item>
      <title>PG Phriday: Dealing With Table Bloating</title>
      <link>https://bonesmoses.org/2015/pg-phriday-dealing-with-table-bloating/</link>
      <pubDate>Fri, 11 Sep 2015 11:51:47 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-dealing-with-table-bloating/</guid>
      <description>Most Postgres operators and informed users are aware that it uses MVCC for storage. One of the main drawbacks of this versioning mechanism is related to tuple reuse. In order to reuse the space, VACUUM must complete a cycle on the table. Unfortunately this isn&amp;rsquo;t always possible to &amp;ldquo;optimize&amp;rdquo; for larger tables. How so?
If a large table needs to have a calculated column added, or some other bulk query updates a large portion of its content, a large fragment of the table is now empty space.</description>
    </item>
    
    <item>
      <title>PG Phriday: Postgres as Middleware</title>
      <link>https://bonesmoses.org/2015/pg-phriday-postgres-as-middleware/</link>
      <pubDate>Fri, 04 Sep 2015 12:32:39 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-postgres-as-middleware/</guid>
      <description>One of the cool things I like most about Postgres, is that it&amp;rsquo;s probably the most inclusive database software I&amp;rsquo;ve ever encountered. It&amp;rsquo;s so full of features and functionality these days, it&amp;rsquo;s practically middleware. Almost anything plugs into it, and if it doesn&amp;rsquo;t, there&amp;rsquo;s usually a way to make it happen.
Want a demonstration?
SciDB is often used for large analytical data warehouses. They even use Postgres for metadata storage. Despite this, they still haven&amp;rsquo;t written a foreign data wrapper for back-and-forth interaction.</description>
    </item>
    
    <item>
      <title>PG Phriday: Fancy Partitioning</title>
      <link>https://bonesmoses.org/2015/pg-phriday-fancy-partitioning/</link>
      <pubDate>Fri, 28 Aug 2015 12:00:23 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-fancy-partitioning/</guid>
      <description>This week we&amp;rsquo;ll be covering another method of Postgres partitioning. This is a technique I personally prefer and try to use and advocate at every opportunity. It&amp;rsquo;s designed to straddle the line between traditional partitioning and standard monolithic table structure by using table inheritance as a convenience factor. The assumption here is that end-user applications either:
Know that partitioning is in use. Only load &amp;ldquo;current&amp;rdquo; data and don&amp;rsquo;t care about partitions.</description>
    </item>
    
    <item>
      <title>PG Phriday: Basic Partitioning</title>
      <link>https://bonesmoses.org/2015/pg-phriday-basic-partitioning/</link>
      <pubDate>Fri, 21 Aug 2015 11:32:15 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-basic-partitioning/</guid>
      <description>Most Postgres (PostgreSQL) users who are familiar with partitioning use the method described in the partitioning documentation. This architecture comes in a fairly standard stack:
One empty base table for structure. At least one child table that inherits the base design. A trigger to redirect inserts based on the partitioning scheme. A constraint on each child table to enforce the partition scheme, and help the planner exclude child partitions from inapplicable queries.</description>
    </item>
    
    <item>
      <title>PG Phriday: Partitioning Candidates</title>
      <link>https://bonesmoses.org/2015/pg-phriday-partitioning-candidates/</link>
      <pubDate>Fri, 14 Aug 2015 11:36:39 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-partitioning-candidates/</guid>
      <description>What&amp;rsquo;s a good table to partition? It&amp;rsquo;s not always a question with an obvious answer. Most often, size and volume determine whether or not a table should be broken into several chunks. However, there&amp;rsquo;s also cases where business or architecture considerations might use partitioning to preserve a shared table structure, or drive aggregate analysis over a common core. In Postgres (PostgreSQL), this is even more relevant because of how partitioning is handled through inheritance.</description>
    </item>
    
    <item>
      <title>PG Phriday: The Case for Partitioning</title>
      <link>https://bonesmoses.org/2015/pg-phriday-the-case-for-partitioning/</link>
      <pubDate>Fri, 07 Aug 2015 16:37:32 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-the-case-for-partitioning/</guid>
      <description>In the next few weeks, I&amp;rsquo;m going to be pushing a long discussion regarding Postgres (PostgreSQL) table partitioning. I&amp;rsquo;ve covered it in previous articles, but only regarding basic performance considerations. That&amp;rsquo;s a very limited view of what partitioning can offer; there&amp;rsquo;s a lot more variance and background that deserves elucidation.
So for the next few articles, the topic of discussion will be partitioning. There&amp;rsquo;s not really enough of it, and a lot of the techniques used in the field are effectively pulled straight from the documentation.</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: Sex Offenders</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-sex-offenders/</link>
      <pubDate>Fri, 24 Jul 2015 12:20:16 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-sex-offenders/</guid>
      <description>We&amp;rsquo;re finally at the end of the 10-part Postgres (PostgreSQL) performance series I use to initiate new developers into the database world. To that end, we&amp;rsquo;re going to discuss something that affects everyone at one point or another: index criteria. Or to put it another way:
Why isn&amp;rsquo;t the database using an index?
It&amp;rsquo;s a fairly innocuous question, but one that may have a surprising answer: the index was created using erroneous assumptions.</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: Indexing the World</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-indexing-the-world/</link>
      <pubDate>Fri, 17 Jul 2015 11:42:28 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-indexing-the-world/</guid>
      <description>An easy way to give Postgres (PostgreSQL) a performance boost is to judiciously use indexes based on queries observed in the system. For most situations, this is as simple as indexing columns that are referenced frequently in WHERE clauses. Postgres is one of the few database engines that takes this idea even further with partial indexes. Unfortunately as a consequence of insufficient exposure, most DBAs and users are unfamiliar with this extremely powerful functionality.</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: MAXimized Value</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-maximized-value/</link>
      <pubDate>Fri, 10 Jul 2015 12:46:10 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-maximized-value/</guid>
      <description>I apologize for putting this series on a short hiatus last week for the 4th of July. But worry not, for this week is something special for all the developers out there! I&amp;rsquo;m going to try to make your life easier for a change. Screw the database!
As a Postgres (PostgreSQL) DBA, it&amp;rsquo;s easy to get tied up in performance hints, obscure syntax, and mangled queries, but it&amp;rsquo;s really all about the people.</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: In The Loop</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-in-the-loop/</link>
      <pubDate>Fri, 26 Jun 2015 11:18:29 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-in-the-loop/</guid>
      <description>As a database, Postgres (PostgreSQL) is fairly standard in its use of SQL. Developers of all colors however, might have trouble switching gears and thinking in set operations, since so many language constructs focus on conditionals and looping. Last week in the performance pitfalls series, we discussed a bit of Set Theory, and how ignorance of its implications can be disastrous. But what about the more mundane?
What happens, for instance, when we treat a database like a programming language?</description>
    </item>
    
    <item>
      <title>PGCon 2015 Unconference: A Community</title>
      <link>https://bonesmoses.org/2015/pgcon-2015-unconference-a-community/</link>
      <pubDate>Tue, 23 Jun 2015 15:30:24 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pgcon-2015-unconference-a-community/</guid>
      <description>Well, I&amp;rsquo;ve returned from PGCon 2015 in Canada, and after a couple days to decompress, it&amp;rsquo;s time to share. I wrote about the PGCon 2014 unconference after returning to Chicago last year, so I felt it was only fitting that I start there. I feel as strongly now as I did a year ago, that directly interacting with the PostgreSQL maintainers at this level helps the community thrive. Even though PGCon is generally a more developer-focused conference, being able to brainstorm with the bigwigs, even if nothing comes of it, means the ideas have been given a fair shake.</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: Functionally Bankrupt</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-functionally-bankrupt/</link>
      <pubDate>Fri, 19 Jun 2015 12:01:23 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-functionally-bankrupt/</guid>
      <description>Functions are great. Having cut my teeth on a database that didn&amp;rsquo;t even provide the ability to define functions, I&amp;rsquo;ve come to almost take them for granted in Postgres (PostgreSQL). However, with this kind of ubiquity, sometimes they can be overused in ways that don&amp;rsquo;t seem to be part of the common programmer lexicon. In this week&amp;rsquo;s PG Phriday series on performance-killing missteps, I&amp;rsquo;m going to talk a bit about set theory, and how a certain amount of familiarity is necessary to properly interact with a database.</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: Out Of Order</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-out-of-order/</link>
      <pubDate>Fri, 12 Jun 2015 12:14:34 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-out-of-order/</guid>
      <description>There are a lot of database engines out there. As such, a developer or DBA will naturally have varying levels of experience with each, and some of this might conflict with how Postgres (PostgreSQL) operates. These kinds of embedded misunderstandings can cause potential issues by themselves, but in this particular case, corrective action is fairly simple.
So this week, I&amp;rsquo;d like to talk about indexes. Many people treat them as a &amp;ldquo;make query faster&amp;rdquo; button, and this often results in egregious misuse.</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: Cast Away</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-cast-away/</link>
      <pubDate>Fri, 05 Jun 2015 12:31:32 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-cast-away/</guid>
      <description>Unlike a lot of programming languages that have loose typing, databases are extremely serious about data types. So serious in fact, many patently refuse to perform automatic type conversions in case the data being compared is not exactly equivalent afterwards. This is the case with Postgres (PostgreSQL) and surprisingly often, queries will suffer as a result. Fortunately this is something we can address!
There are easier ways to demonstrate this, but in the interests of making this more of an adventure, let&amp;rsquo;s use a join between two tables:</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: IN-Sanity</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-in-sanity/</link>
      <pubDate>Fri, 29 May 2015 12:17:32 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-in-sanity/</guid>
      <description>When working with a database, sometimes performance problems are both far more subtle, and much worse than a query itself might suggest. The topic of this week&amp;rsquo;s Postgres (PostgreSQL) performance killers article concerns the use of the IN clause, and how misusing it can catastrophically obliterate the database in mysterious ways.
To that end, we&amp;rsquo;ll use a slightly revised single-table test case since it&amp;rsquo;s served us pretty well so far:</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: Forgetting it EXISTS</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-forgetting-it-exists/</link>
      <pubDate>Fri, 22 May 2015 18:41:33 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-forgetting-it-exists/</guid>
      <description>For the second of my ten part series on hidden Postgres (PostgreSQL) performance killers, I&amp;rsquo;m going to talk about something called an anti-join. It&amp;rsquo;s not a well-known approach outside of the database world, but due to how it works, it can impart almost magical plan revisions that drastically improve query performance in the right scenario. Developers can add it to a growing bag of tricks when working on database-driven content, since it comes in handy more often than you might expect.</description>
    </item>
    
    <item>
      <title>PG Phriday: 10 Ways to Ruin Performance: Forgetting to EXPLAIN</title>
      <link>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-forgetting-to-explain/</link>
      <pubDate>Fri, 15 May 2015 14:47:12 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-10-ways-to-ruin-performance-forgetting-to-explain/</guid>
      <description>Yesterday I gave the developers at my company what I call a DBA Chat. It&amp;rsquo;s something I try to do every month to keep them apprised on various features, caveats, performance considerations, and so on. I find that educating the folks who regularly work with the database does wonders for application performance and my sanity. The benefit of this long format is that I can go over more information than a time constrained set of slides.</description>
    </item>
    
    <item>
      <title>PG Phriday: Functions and Performance Attributes</title>
      <link>https://bonesmoses.org/2015/pg-phriday-functions-and-performance-attributes/</link>
      <pubDate>Fri, 08 May 2015 15:56:42 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-functions-and-performance-attributes/</guid>
      <description>Users both old and new are likely aware that Postgres has functions. Some lucky readers may have even written one or two. For those without much experience in this area, or are thinking about contributing a few functions to your database for the first time, there are a couple things you should know. This week, I want to cover a few of the function declaration decorators. If you have no idea what I&amp;rsquo;m talking about, then this is probably something you&amp;rsquo;ll want to read regardless of your experience level.</description>
    </item>
    
    <item>
      <title>PG Phriday: Reducing Writes With Unlogged Tables</title>
      <link>https://bonesmoses.org/2015/pg-phriday-reducing-writes-with-unlogged-tables/</link>
      <pubDate>Fri, 01 May 2015 11:16:02 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-reducing-writes-with-unlogged-tables/</guid>
      <description>Last week, I covered how MVCC, Postgres&amp;rsquo;s storage system, works on a very high level. Near the end, I also mentioned that it doesn&amp;rsquo;t quite lend itself well to certain use cases, such as rapidly mutating session storage. Well, there is one caveat to that statement that I&amp;rsquo;d forgotten about because of its relatively limited utility: unlogged tables.
Here&amp;rsquo;s what the Postgres documentation has to say about unlogged tables:
Data written to unlogged tables is not written to the write-ahead log, which makes them considerably faster than ordinary tables.</description>
    </item>
    
    <item>
      <title>PG Phriday: Let&#39;s Talk About Data Storage</title>
      <link>https://bonesmoses.org/2015/pg-phriday-lets-talk-about-data-storage/</link>
      <pubDate>Fri, 24 Apr 2015 11:48:06 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-lets-talk-about-data-storage/</guid>
      <description>As a DBA, I strive not to live in an isolated ivory tower, away from the developers that are destined to fill our databases with volumes of data from a myriad of applications. It&amp;rsquo;s important, I think, to occasionally come back to the basics. So I&amp;rsquo;d like to discuss one of the core elements that Postgres DBAs might be intimately familiar with, but comes up often enough that some clarification is warranted.</description>
    </item>
    
    <item>
      <title>PG Phriday: Anonymous Blocks and Object Manipulation</title>
      <link>https://bonesmoses.org/2015/pg-phriday-anonymous-blocks-and-object-manipulation/</link>
      <pubDate>Fri, 17 Apr 2015 10:45:19 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-anonymous-blocks-and-object-manipulation/</guid>
      <description>Postgres has had anonymous blocks since the release of 9.0 in late 2010. But it must either be one of those features that got lost in the shuffle, or is otherwise considered too advanced, because I rarely see it used in the wild. If that&amp;rsquo;s the case, it&amp;rsquo;s a great shame considering the raw power it conveys. Without committing to a function, we can essentially execute any code in the database, with or without SQL input.</description>
    </item>
    
    <item>
      <title>PG Phriday: Functions and Addressing JSON Data</title>
      <link>https://bonesmoses.org/2015/pg-phriday-functions-and-addressing-json-data/</link>
      <pubDate>Fri, 10 Apr 2015 11:30:14 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-functions-and-addressing-json-data/</guid>
      <description>Fairly recently, a friend of mine presented a problem he wanted to solve with some JSON he had in a table. After he presented the end result he was trying to reach, I made the assumption that this would be pretty easy to do. But then I looked at the JSON Functions to try and find that quick fix. Though I read extensively and used rather liberal interpretations of the functions, there&amp;rsquo;s no way to directly manipulate JSON object contents with PostgreSQL.</description>
    </item>
    
    <item>
      <title>PG Phriday: High Availability Through Delayed Replication</title>
      <link>https://bonesmoses.org/2015/pg-phriday-high-availability-through-delayed-replication/</link>
      <pubDate>Fri, 27 Mar 2015 11:53:02 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-high-availability-through-delayed-replication/</guid>
      <description>High availability of PostgreSQL databases is incredibly important to me. You might even say it&amp;rsquo;s a special interest of mine. It&amp;rsquo;s one reason I&amp;rsquo;m both excited and saddened by a feature introduced in 9.4. I&amp;rsquo;m Excited because it&amp;rsquo;s a feature I plan to make extensive use of, and saddened because it has flown under the radar thus far. It&amp;rsquo;s not even listed in the What&amp;rsquo;s new in PostgreSQL 9.4 Wiki page.</description>
    </item>
    
    <item>
      <title>PG Phriday: Date Based Partition Constraints</title>
      <link>https://bonesmoses.org/2015/pg-phriday-date-based-partition-constraints/</link>
      <pubDate>Fri, 20 Mar 2015 12:02:58 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-date-based-partition-constraints/</guid>
      <description>PostgreSQL has provided table partitions for a long time. In fact, one might say it has always had partitioning. The functionality and performance of table inheritance has increased over the years, and there are innumerable arguments for using it, especially for larger tables consisting of hundreds of millions of rows. So I want to discuss a quirk that often catches developers off guard. In fact, it can render partitioning almost useless or counter-productive.</description>
    </item>
    
    <item>
      <title>PG Phriday: Interacting with JSON and JSONB</title>
      <link>https://bonesmoses.org/2015/pg-phriday-interacting-with-json-and-jsonb/</link>
      <pubDate>Fri, 13 Mar 2015 11:33:36 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-interacting-with-json-and-jsonb/</guid>
      <description>With the release of PostgreSQL 9.4, comes the ability to use binary JSON objects. This internal representation is faster and more capable than the original JSON included in 9.3. But how do we actually interact with JSON and JSONB in a database connection context? The answer is actually a little complicated and somewhat surprising.
Casting. Casting Everywhere. Despite its inclusion as an internal type, PostgreSQL maintains its position as encouraging explicit casting to avoid bugs inherent in magic type conversions.</description>
    </item>
    
    <item>
      <title>A Short Examination of pg_shard</title>
      <link>https://bonesmoses.org/2015/a-short-examination-of-pg_shard/</link>
      <pubDate>Thu, 12 Mar 2015 16:28:01 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/a-short-examination-of-pg_shard/</guid>
      <description>For part of today, I&amp;rsquo;ve been experimenting with the new-ish pg_shard extension contributed by CitusData. I had pretty high hopes for this module and was extremely excited to try it out. After screwing around with it for a while, I can say it has a lot of potential. Yet I can&amp;rsquo;t reasonably recommend it in its current form. The README file suggests quite a few understandable caveats, but it&amp;rsquo;s the ones they don&amp;rsquo;t mention that hurt a lot more.</description>
    </item>
    
    <item>
      <title>PG Phriday: Materialized Views, Revisited</title>
      <link>https://bonesmoses.org/2015/pg-phriday-materialized-views-revisited/</link>
      <pubDate>Fri, 06 Mar 2015 11:32:08 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-materialized-views-revisited/</guid>
      <description>Materialized views are a great improvement to performance in many cases. Introduced in PostgreSQL 9.3, they finally added an easy method for turning a view into a transient table that could be indexed, mined for statistics for better planner performance, and easily rebuilt. Unfortunately, refreshing a materialized view in PostgreSQL 9.3 caused a full exclusive lock, blocking any use until the process was complete. In 9.4, this can finally be done concurrently, though there are still a couple caveats.</description>
    </item>
    
    <item>
      <title>PG Phriday: PostgreSQL Select Filters</title>
      <link>https://bonesmoses.org/2015/pg-phriday-postgresql-select-filters/</link>
      <pubDate>Fri, 27 Feb 2015 11:54:29 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2015/pg-phriday-postgresql-select-filters/</guid>
      <description>Long have CASE statements been a double-edged sword in the database world. They&amp;rsquo;re functional, diverse, adaptive, and simple. Unfortunately they&amp;rsquo;re also somewhat bulky, and when it comes to using them to categorize aggregates, something of a hack. This is why I wanted to cry with joy when I found out that PostgreSQL 9.4 introduced a feature I&amp;rsquo;ve always wanted, but found difficult to express as a need. I mean, CASE statements are fine, right?</description>
    </item>
    
    <item>
      <title>On PostgreSQL View Dependencies</title>
      <link>https://bonesmoses.org/2014/on-postgresql-view-dependencies/</link>
      <pubDate>Wed, 05 Nov 2014 17:20:41 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/on-postgresql-view-dependencies/</guid>
      <description>As many seasoned DBAs might know, there&amp;rsquo;s one area that PostgreSQL still manages to be highly aggravating. By this, I mean the role views have in mucking up PostgreSQL dependencies. The part that annoys me personally, is that it doesn&amp;rsquo;t have to be this way.
Take, for example, what happens if you try to modify a VARCHAR column so that the column length is higher. We&amp;rsquo;re not changing the type, or dropping the column, or anything overly complicated.</description>
    </item>
    
    <item>
      <title>On PostgreSQL Logging Verbosity</title>
      <link>https://bonesmoses.org/2014/on-postgresql-logging-verbosity/</link>
      <pubDate>Tue, 05 Aug 2014 14:35:05 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/on-postgresql-logging-verbosity/</guid>
      <description>Recently I stumbled across a question on Reddit regarding the performance impact of using pgBadger on an active database server. The only real answer to this question is: do not use pgBadger. Before anyone asks&amp;mdash;no, you shouldn&amp;rsquo;t use pgFouine either. This is not an indictment on the quality of either project, but a statement of their obsolescence in the face of recent PostgreSQL features.
One of the recommended postgresql.conf changes for both of these tools is to set log_min_duration_statement to 0.</description>
    </item>
    
    <item>
      <title>Finally Done With High Availability</title>
      <link>https://bonesmoses.org/2014/finally-done-with-high-availability/</link>
      <pubDate>Tue, 29 Jul 2014 15:23:42 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/finally-done-with-high-availability/</guid>
      <description>Well, my publisher recently informed me that the book I&amp;rsquo;ve long been slaving over for almost a year, is finally finished. I must admit that PostgreSQL 9 High Availability Cookbook is somewhat awkward as a title, but that doesn&amp;rsquo;t detract from the contents. I&amp;rsquo;d like to discuss primarily why I wrote it.
When Packt first approached me in October of 2013, I was skeptical. I have to admit that I&amp;rsquo;m not a huge fan of the &amp;ldquo;cookbook&amp;rdquo; style they&amp;rsquo;ve been pushing lately.</description>
    </item>
    
    <item>
      <title>Friends Don&#39;t Let Friends Use Loops</title>
      <link>https://bonesmoses.org/2014/friends-dont-let-friends-use-loops/</link>
      <pubDate>Fri, 25 Jul 2014 12:12:06 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/friends-dont-let-friends-use-loops/</guid>
      <description>Programming is fun. I love programming! Ever since I changed my career from programming to database work, I&amp;rsquo;ve still occasionally dabbled in my former craft. As such, I believe I can say this with a fair amount of accuracy: programmers don&amp;rsquo;t understand databases. This isn&amp;rsquo;t something small, either; there&amp;rsquo;s a fundamental misunderstanding at play. Unless the coder happens to work primarily with graphics, bulk set-based transformations are not something they&amp;rsquo;ll generally work with.</description>
    </item>
    
    <item>
      <title>Foreign Tables are not as Useful as I Hoped</title>
      <link>https://bonesmoses.org/2014/foreign-tables-are-not-as-useful-as-i-hoped/</link>
      <pubDate>Wed, 11 Jun 2014 16:14:01 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/foreign-tables-are-not-as-useful-as-i-hoped/</guid>
      <description>When I heard about foreign tables using the new postgres_fdw foreign data wrapper in PostgreSQL 9.3, I was pretty excited. We hadn&amp;rsquo;t upgraded to 9.3 so I waited until we did before I did any serious testing. Having done more experimentation with it, I have to say I&amp;rsquo;m somewhat disappointed. Why? Because of how authentication was implemented.
I&amp;rsquo;m going to get this out of the way now: The postgres_fdw foreign data wrapper only works with hard-coded plain-text passwords, forever the bane of security-conscious IT teams everywhere.</description>
    </item>
    
    <item>
      <title>PGCon 2014 Unconference: A Community</title>
      <link>https://bonesmoses.org/2014/pgcon-2014-unconference-a-community/</link>
      <pubDate>Tue, 27 May 2014 09:02:42 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/pgcon-2014-unconference-a-community/</guid>
      <description>This May, I attended my first international conference: PGCon 2014. Though the schedule spanned from May 20th to May 23rd, I came primarily for the talks. Then there was the Unconference on the 24th. I&amp;rsquo;d never heard of such a thing, but it was billed as a good way to network and find out what community members want from PostgreSQL. After attending the Unconference, I must admit I&amp;rsquo;m exceptionally glad it exists; it&amp;rsquo;s something I believe every strong Open Source project needs.</description>
    </item>
    
    <item>
      <title>Foreign Keys are Not Free</title>
      <link>https://bonesmoses.org/2014/foreign-keys-are-not-free/</link>
      <pubDate>Wed, 14 May 2014 16:40:23 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/foreign-keys-are-not-free/</guid>
      <description>PostgreSQL is a pretty good database, and I enjoy working with it. However, there is an implementation detail that not everyone knows about, which can drastically affect table performance. What is this mysterious feature? I am, of course, referring to foreign keys.
Foreign keys are normally a part of good database design, and for good reason. They inform about entity relationships, and they verify, enforce, and maintain those relationships. Yet all of this comes at a cost that might surprise you.</description>
    </item>
    
    <item>
      <title>Trumping the PostgreSQL Query Planner</title>
      <link>https://bonesmoses.org/2014/trumping-the-postgresql-query-planner/</link>
      <pubDate>Thu, 08 May 2014 12:24:45 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/trumping-the-postgresql-query-planner/</guid>
      <description>With the release of PostgreSQL 8.4, the community gained the ability to use CTE syntax. As such, this is a fairly old feature, yet it&amp;rsquo;s still misunderstood in a lot of ways. At the same time, the query planner has been advancing incrementally since that time. Most recently, PostgreSQL has gained the ability to perform index-only scans, making it possible to fetch results straight from the index, without confirming rows with the table data.</description>
    </item>
    
    <item>
      <title>Announcing walctl for PostgreSQL Transaction Log Management</title>
      <link>https://bonesmoses.org/2014/announcing-walctl-for-postgresql-transaction-log-management/</link>
      <pubDate>Thu, 27 Mar 2014 10:23:31 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2014/announcing-walctl-for-postgresql-transaction-log-management/</guid>
      <description>I&amp;rsquo;ve managed to convince my employer to open source one of the tools I recently wrote. That tool goes by the name of walctl, and I believe the importance of this kind of tool can not be overstated.
The PostgreSQL Write Ahead Log (WAL) files are key to crash recovery, point in time recovery, and all standby use not derived from streaming replication. WAL files are extremely critical to proper database operation.</description>
    </item>
    
    <item>
      <title>Free Copy of Instant PostgreSQL Starter</title>
      <link>https://bonesmoses.org/2013/free-copy-of-instant-postgresql-starter/</link>
      <pubDate>Wed, 05 Jun 2013 15:18:16 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2013/free-copy-of-instant-postgresql-starter/</guid>
      <description>Another free book giveaway? What, am I running a library here? Well, it turns out Packt liked my review of Instant PostgreSQL Starter so much, they want me host a short period where you can obtain your very own copy for the low, low price of $0.
To those ends, I have a few brand new digital copies comprised of shiny premium electrons ready to dispense to three lucky commenters. Does that sound good?</description>
    </item>
    
    <item>
      <title>Winning (Free eBooks) is Everything</title>
      <link>https://bonesmoses.org/2013/winning-free-ebooks-is-everything/</link>
      <pubDate>Tue, 21 May 2013 09:43:40 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2013/winning-free-ebooks-is-everything/</guid>
      <description>It occurs to me I forgot to congratulate the winners of the free ebooks. So without further ado:
SAB, who seems to host a nice blog geared toward server administration. Stephan, who&amp;rsquo;s looking to improve existing strategies. Jeff and his growing PostgreSQL cluster. Pierre, who apparently has an experimental PostgreSQL backend for MySQL. Interesting. Congrats to the winners. But more, I call upon them to pay it forward by contributing to the community, either by corresponding with the excellent PostgreSQL mailing lists, or maybe submitting a patch or two to the code.</description>
    </item>
    
    <item>
      <title>Make pg_hba.conf Redundant by Using pg_hba.conf</title>
      <link>https://bonesmoses.org/2013/make-pg_hba.conf-redundant-by-using-pg_hba.conf/</link>
      <pubDate>Fri, 10 May 2013 10:02:07 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2013/make-pg_hba.conf-redundant-by-using-pg_hba.conf/</guid>
      <description>Let&amp;rsquo;s face it, the pg_hba.conf file is a pain in the ass to use regularly. Sure, reloading the database will cause it to re-read this file, but with a lot of active users and frequent changes, this isn&amp;rsquo;t really tenable.
Luckily lurking deep within its bowels, PostgreSQL has a little-known feature that can easily be overlooked because it&amp;rsquo;s so humbly stated. Here&amp;rsquo;s the manual entry for pg_hba.conf for the user section:</description>
    </item>
    
    <item>
      <title>Free PostgreSQL Backup Book? Yes Please!</title>
      <link>https://bonesmoses.org/2013/free-postgresql-backup-book-yes-please/</link>
      <pubDate>Fri, 26 Apr 2013 10:53:04 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2013/free-postgresql-backup-book-yes-please/</guid>
      <description>A little while ago, I wrote to the PostgreSQL general mailing list that I&amp;rsquo;d been approached by Packt Publishing to contribute a quick manual on doing PostgreSQL backups: Instant PostgreSQL Backup and Restore How-to. They&amp;rsquo;re the same guys who published Greg Smith&amp;rsquo;s PostgreSQL 9.0 High Performance book which everyone seems to swear by.
The goal of the backup book was to distill the PostgreSQL documentation, tools, and Wiki down to a collection of short step-by-step guides much like the O&amp;rsquo;Reilly nutshell series.</description>
    </item>
    
    <item>
      <title>2011 PGOpen is now Closed</title>
      <link>https://bonesmoses.org/2011/2011-pgopen-is-now-closed/</link>
      <pubDate>Tue, 20 Sep 2011 22:25:09 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2011/2011-pgopen-is-now-closed/</guid>
      <description>Well, that was an interesting couple of days. Unfortunately my birthday came right after and I didn&amp;rsquo;t feel like writing anything for the duration. Now though? Why not!
In the end, I think my presentation, NVRam for Fun and Profit went over okay. Not a ton of people showed up, but I did get ambushed afterwards with questions after I got off the stage. Why those people didn&amp;rsquo;t ask while I was in Presentation Mode, I can&amp;rsquo;t quite understand.</description>
    </item>
    
    <item>
      <title>Dragged into the (Postgres) Open</title>
      <link>https://bonesmoses.org/2011/dragged-into-the-postgres-open/</link>
      <pubDate>Tue, 19 Jul 2011 20:38:51 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2011/dragged-into-the-postgres-open/</guid>
      <description>A few months ago, Greg Smith of PostgreSQL fame suggested I submit a proposal to the new Postgres Open conference here in Chicago. Some of us residents of the Midwest have long waited for a PostgreSQL-related conference of our very own, and now the glorious day has finally arrived. I was asked to submit proposals to other conferences, but the travel involved quickly put me off; now I can be lazy and still help spread The Word.</description>
    </item>
    
    <item>
      <title>When Query Hints Attack</title>
      <link>https://bonesmoses.org/2011/when-query-hints-attack/</link>
      <pubDate>Tue, 01 Mar 2011 21:22:08 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2011/when-query-hints-attack/</guid>
      <description>Ah, query hints. For all those times when the database isn&amp;rsquo;t doing what you want, they&amp;rsquo;re a useful tool for forcing the query optimizer to perform your bidding. But in this case, not only is the road to Hell paved with good intentions, it&amp;rsquo;s paved with a frictionless slide directly into a wood chipper that empties handily into an active volcano. With query hints, be careful what you wish for, because&amp;mdash;to the detriment of all you hold dear&amp;mdash;you just might get it.</description>
    </item>
    
    <item>
      <title>MySQL isn&#39;t YourSQL</title>
      <link>https://bonesmoses.org/2011/mysql-isnt-yoursql/</link>
      <pubDate>Mon, 28 Feb 2011 22:12:45 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2011/mysql-isnt-yoursql/</guid>
      <description>Ok, so I&amp;rsquo;ve already corrected gaudy and horrible behavior part and parcel with default PostgreSQL installs, but what about that&amp;hellip; other open-source SQL database? Is it wrong too? Sure is!
Fixing Your Damn Server Again My fake system still has 8GB of RAM, but we&amp;rsquo;ll be using more of it for a MySQL install. Why? Because MySQL&amp;rsquo;s planner makes different assumptions about memory allocation than PostgreSQL. Remember sysctl.conf? Put this in there:</description>
    </item>
    
    <item>
      <title>PostgreSQL for Newbs</title>
      <link>https://bonesmoses.org/2011/postgresql-for-newbs/</link>
      <pubDate>Sun, 13 Feb 2011 21:57:49 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2011/postgresql-for-newbs/</guid>
      <description>So you&amp;rsquo;ve decided to use PostgreSQL as the database for your sparkly new website running some variant of a LAMP stack. Or maybe you just got a new job and must now administer a PostgreSQL install so you excitedly did your research. You&amp;rsquo;ve read the install docs, tinkered on a VM, and you think you&amp;rsquo;ve got everything ready.
You&amp;rsquo;re wrong. You&amp;rsquo;re going to run out of disk space, your website will be slow, and you&amp;rsquo;ll go running to the PostgreSQL mailing lists in abject terror because you have no clue what is wrong.</description>
    </item>
    
    <item>
      <title>Why I Married pg_migrator </title>
      <link>https://bonesmoses.org/2010/why-i-married-pg_migrator/</link>
      <pubDate>Thu, 03 Jun 2010 15:42:08 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2010/why-i-married-pg_migrator/</guid>
      <description>With the introduction of PostgreSQL 8.4, Bruce Momjian, a significant core developer, contributed a tool that can actually upgrade an entire database cluster in place. The time required is essentially only that necessary to copy the data files from the old installation to the new one. On a quick RAID system, this can be an order of magnitude faster than a dump/restore. The main drawback is similar to Slony: disk space must effectively be doubled for this upgrade method.</description>
    </item>
    
    <item>
      <title>LIMITed Performance</title>
      <link>https://bonesmoses.org/2010/limited-performance/</link>
      <pubDate>Fri, 16 Apr 2010 15:50:18 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2010/limited-performance/</guid>
      <description>PostgreSQL can be both a beautiful thing, and an infuriating mess.
Occasionally I look through the logs on one of our database servers to see if I can&amp;rsquo;t optimize some queries. It&amp;rsquo;s good practice, and is an excellent way to monitor basic system performance by watching for queries that take longer than might otherwise be possible. Sometimes performance can be fixed by tweaking an index, or manually rewriting the query and convincing a developer to integrate the changes.</description>
    </item>
    
    <item>
      <title>On Upgrading and Databases</title>
      <link>https://bonesmoses.org/2010/on-upgrading-and-databases/</link>
      <pubDate>Mon, 15 Mar 2010 11:53:25 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2010/on-upgrading-and-databases/</guid>
      <description>Postgresql hates itself. I&amp;rsquo;m convinced of this, and have considered the idea frequently over the years. I roll it around in my mouth just to savor the taste, only to hope the flavor changes eventually. A couple things have advanced, though not quite what one might hope.
Parallel Restore With the introduction of PostgreSQL 8.4, the core developers have finally succumbed to the availability of multiple-CPU systems, and added parallel restores.</description>
    </item>
    
    <item>
      <title>DBA Angry!</title>
      <link>https://bonesmoses.org/2008/dba-angry/</link>
      <pubDate>Wed, 27 Aug 2008 10:24:38 +0000</pubDate>
      
      <guid>https://bonesmoses.org/2008/dba-angry/</guid>
      <description>There&amp;rsquo;s a lot of debate in application development circles over various sundries such as column naming schemes and framework implementation details. Well, I&amp;rsquo;d like to clear all that up.
See, there are more application frameworks than grains of sand on the entire planet Earth, and each one of them has a different philosophy and API for creating database objects. Rails, Django, Turbogears, Zope, Zoop, Drupal, Catalyst, Nitro, Nuke&amp;hellip; holy fucking Christ, stop it already!</description>
    </item>
    
  </channel>
</rss>
