{"id":113006,"date":"2026-10-01T12:00:00","date_gmt":"2026-10-01T12:00:00","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=113006"},"modified":"2026-09-29T15:08:55","modified_gmt":"2026-09-29T15:08:55","slug":"why-postgresql-shouldnt-be-your-apps-answer-to-everything","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/postgresql\/why-postgresql-shouldnt-be-your-apps-answer-to-everything\/","title":{"rendered":"Why PostgreSQL shouldn&#8217;t be your app&#8217;s answer to everything"},"content":{"rendered":"\n<p><strong>PostgreSQL is one of the most capable relational databases available, but capability isn&#8217;t the same as suitability. <\/strong><\/p>\n\n\n\n<p>Using it to handle jobs it wasn&#8217;t built for &#8211; such as queuing or storing every document an application generates &#8211; creates recurring problems like <strong>unclear code ownership<\/strong>, <strong>single points of failure<\/strong>, <strong>security exposure<\/strong>, and <strong>rising cloud costs<\/strong>. <\/p>\n\n\n\n<p>PostgreSQL expert <strong>Pat Wright <\/strong>explains more.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-stop-putting-everything-in-the-database\">Stop putting everything in the database!<\/h2>\n\n\n\n<p>I\u2019ve seen quite a few posts lately about how <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/postgresql\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>PostgreSQL<\/strong><\/a> can do <em>everything.<\/em> And, while I do believe it&#8217;s the most advanced and fastest-growing <a href=\"https:\/\/db-engines.com\/en\/ranking\/relational+dbms\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>relational database<\/strong><\/a> available right now, that doesn\u2019t change the fact that &#8211; at its core &#8211; it&#8217;s still a relational database.\u00a0\u00a0<\/p>\n\n\n\n<p>This thinking goes all the way back to the mid-2000s, when I was working on <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL Server<\/a> and starting to explore the <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/nosql\/how-to-choose-between-sql-and-nosql-databases\/\" target=\"_blank\" rel=\"noreferrer noopener\">NoSQL<\/a> movement with Elasticsearch, Hadoop, Hive, HBase, and their respective tools.<\/p>\n\n\n\n<p>Even back then, people said these new technologies could solve <em>every problem<\/em>. Take it from me: <strong>please don&#8217;t use <em>any<\/em> technology for <em>every<\/em> problem you have.<\/strong><\/p>\n\n\n\n<p>I\u2019ve spent a lot of my career fixing systems that said, <em>\u201clet\u2019s have the database handle this.\u201d<\/em>\u00a0 From fighting queuing in the database (a topic for another time), to using the database as a cache, or to store every document you&#8217;ve ever sent by email.<\/p>\n\n\n\n<p><strong>You <em>can<\/em> put all of these things in the database &#8211; but that doesn&#8217;t mean you <em>should<\/em>.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-engineers-keep-putting-everything-in-the-database\">Why engineers keep putting everything in the database<\/h2>\n\n\n\n<p>Now that I\u2019ve probably upset a few engineers with these points, let me clarify a few things. <\/p>\n\n\n\n<p>First off, I\u2019m a DBA &#8211; typically, an operational DBA.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-is-an-operational-dba\">What is an operational DBA?<\/h3>\n\n\n\n<p><strong>Being an operational DBA means I\u2019m the one who has to deal with what was created <em>years ago<\/em> just to get an application out the door.<\/strong><\/p>\n\n\n\n<p>It&#8217;s the same little puppy (the application) that was once cute and cuddly \u2014 the one everyone laughed at when it left tiny bite marks on your shoes.<\/p>\n\n\n\n<p>Now, that very same puppy consumes 32 pairs of shoes a day and costs your company thousands of dollars in <a href=\"https:\/\/www.red-gate.com\/hub\/product-learning\/redgate-monitor\/cloud-database-cost-optimization-with-redgate-monitor\/\" target=\"_blank\" rel=\"noreferrer noopener\">cloud costs<\/a>.<\/p>\n\n\n\n<div id=\"callout-block_f1adcc65374e6a2121f3fd42e804922c\" class=\"callout alignnone\">\n    <div class=\"child-last:mb-0 child-first:mt-0 bg-gray-50 dark:bg-gray-950 p-4xl my-3xl\">\n\n<p><strong>You may also be interested in&#8230;<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.red-gate.com\/simple-talk\/career\/what-does-a-modern-dba-actually-do-6-key-points-from-a-senior-dba\/\" target=\"_blank\" rel=\"noreferrer noopener\">What does a modern DBA actually do? 6 key points from a senior DBA&nbsp;<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.red-gate.com\/simple-talk\/collections\/migrating-from-on-prem-to-the-cloud-dba-stories\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to migrate from on-prem to the cloud (a \u2018DBA Stories\u2019 series)<\/a><\/p>\n\n<\/div>\n<\/div> \n\n\n<h3 class=\"wp-block-heading\" id=\"h-why-you-might-believe-you-can-put-everything-in-the-database\">Why you might believe you <em>can <\/em>put everything in the database<\/h3>\n\n\n\n<p>Look, I understand why you believe you can put things like this in the database, I really do. I\u2019ve been in these discussions many times, and know these statements well:<\/p>\n\n\n\n<p><em>\u201cWe are going to refactor in 6 months.\u201d\u00a0<\/em><\/p>\n\n\n\n<p><em>\u201cThis is just for MVP (minimum viable product). We will add tickets to refactor.\u201d\u00a0<\/em><\/p>\n\n\n\n<p><em>\u201cWe only had 2 months for this to be released.\u201d\u00a0<\/em><\/p>\n\n\n\n<p><em>\u201cSomeone already wrote a driver\/connector that does this, so we should be OK. We can just use that to save time.\u201d\u00a0<\/em><\/p>\n\n\n\n<p><em>\u201cWe don\u2019t have to do any extra coding! Just hand it to this extension and it&#8217;s taken care of!\u201d\u00a0<\/em><\/p>\n\n\n\n<p>OK, yes, PostgreSQL has the best extension ecosystem in the RDBMS (relational database management system) world. We&#8217;ve been promoting extension creation in the platform for a long time, and want to expand it further.<\/p>\n\n\n\n<p><strong>So, why exactly am I <em>against<\/em> adding things to the database?\u00a0<\/strong><\/p>\n\n\n\n<section id=\"my-first-block-block_526e44ab537d8bdaf4750a9223e7b26e\" class=\"my-first-block alignwide\">\n    <div class=\"bg-brand-600 text-base-white py-5xl px-4xl rounded-sm bg-gradient-to-r from-brand-600 to-brand-500 red\">\n        <div class=\"gap-4xl items-start md:items-center flex flex-col md:flex-row justify-between\">\n            <div class=\"flex-1 col-span-10 lg:col-span-7\">\n                <h3 class=\"mt-0 font-display mb-2 text-display-sm\">Get started with PostgreSQL &#8211; free book download<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            &#8216;Introduction to PostgreSQL for the data professional&#8217;, written by Grant Fritchey and Ryan Booz, covers all the basics of how to get started with PostgreSQL.                                    <\/div>\n            <\/div>\n                                            <a href=\"https:\/\/www.red-gate.com\/hub\/books\/introduction-to-postgresql-for-the-data-professional\/\" class=\"btn btn--secondary btn--lg\" aria-label=\"Download your free copy: Get started with PostgreSQL - free book download\">Download your free copy<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-4-key-reasons-to-stop-putting-everything-in-your-database\">The 4 key reasons to stop putting everything in your database <\/h2>\n\n\n\n<p><strong>Here are some of the key reasons, from my perspective, to stop putting everything in the database.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-unclear-code-ownership\">Unclear code ownership<\/h3>\n\n\n\n<p>It\u2019s universally known that engineers own the code. They own how it works and what it does.<\/p>\n\n\n\n<p>However, <em>database<\/em> code is gray area for a lot of companies. Sometimes database folks <a href=\"https:\/\/www.red-gate.com\/simple-talk\/podcasts\/who-owns-the-database\/\" target=\"_blank\" rel=\"noreferrer noopener\">own the database<\/a> and the procedures inside it, and sometimes ownership is split between engineers <em>and<\/em> DBAs.<\/p>\n\n\n\n<p>Ultimately, engineers LOVE to own things. They need to understand how things work and be able to change them quickly. <\/p>\n\n\n\n<p>And, <strong>when you put stuff into a database, you inadvertently create a big gray area about who owns it when things go wrong.<\/strong><\/p>\n\n\n\n<p>Who, for example, gets the call at 2am if the extension breaks? <\/p>\n\n\n\n<p>As an engineer, you may be able to make something easier and faster by handing it off to a database (or another process), but remember &#8211; <em>you may still have to own it<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-single-point-of-failure\">Single point of failure<\/h3>\n\n\n\n<p><strong>If you put your queuing system in the database and don&#8217;t separate it from the rest of your application, a single queue going down can take your entire production system down with it<\/strong>, <strong>since they&#8217;re all connected.<\/strong> <\/p>\n\n\n\n<p>I&#8217;ve seen this happen many times. You may think the answer is simple &#8211; just separate them &#8211; but that&#8217;s not always possible within the architecture.<\/p>\n\n\n\n<p>When something&#8217;s designed quickly, the queue and the application often end up tightly coupled &#8211; and that coupling tends to cause bigger problems down the road.\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-security-and-governance-risks\">Security and governance risks<\/h3>\n\n\n\n<p>Do you know what this additional thing you&#8217;ve added to your database actually has access to? Is it segmented enough to ensure it can\u2019t access data it shouldn&#8217;t?\u00a0 <\/p>\n\n\n\n<p>I understand it\u2019s not a rogue extension running around (since you&#8217;re probably controlling it through code), but remember, it\u2019s<em> another<\/em> point of access to your database &#8211; a database potentially holding the organization&#8217;s most critical information.<\/p>\n\n\n\n<p><strong>The more database access points you give others, the more you expose your data.<\/strong>\u00a0<\/p>\n\n\n\n<p>Again, separation can help here, but I don\u2019t see it enough.\u00a0\u00a0<\/p>\n\n\n\n<div id=\"callout-block_f1adcc65374e6a2121f3fd42e804922c\" class=\"callout alignnone\">\n    <div class=\"child-last:mb-0 child-first:mt-0 bg-gray-50 dark:bg-gray-950 p-4xl my-3xl\">\n\n<p><strong>You may also be interested in&#8230;<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/security\/securing-your-databases-in-2026-best-practices-for-the-evolving-threat-landscape\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to keep your databases secure in 2026: a complete guide<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.red-gate.com\/simple-talk\/data-security-privacy-compliance\/\" target=\"_blank\" rel=\"noreferrer noopener\">Simple Talk&#8217;s full collection of data and database security, privacy &amp; compliance guides<\/a><\/p>\n\n<\/div>\n<\/div> \n\n\n<h3 class=\"wp-block-heading\" id=\"h-rising-infrastructure-costs\">Rising infrastructure costs<\/h3>\n\n\n\n<p>Every point I&#8217;ve listed here is a critical one, but many teams would put cost and expense at the top of the priority order. Check any cloud bill you have, and I\u2019m pretty sure the database will be one of your most expensive components. <\/p>\n\n\n\n<p><strong>Being open-source, PostgreSQL doesn&#8217;t have any licensing costs to deal with &#8211; but it <em>does<\/em> have expense connected to CPU, memory, and disks. <\/strong><\/p>\n\n\n\n<p>And, to put it simply: <strong>the more services, extensions, and work you throw at the database, the more it will cost.<\/strong> <\/p>\n\n\n\n<p>Queuing, for example, is much cheaper with a queue service <em>outside<\/em> of the database. <\/p>\n\n\n\n<p>So, while you may gain <em>some<\/em> simplicity with putting things in the database, you&#8217;re going to spend more in doing so.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-in-summary\">In summary&#8230;<\/h2>\n\n\n\n<p>I know this won&#8217;t change the minds of people who genuinely believe PostgreSQL can do <em>everything<\/em>. After all, we&#8217;ll keep seeing more extensions and more features that promise, <em>&#8220;just put it in the database and it&#8217;ll solve all your problems.&#8221;<\/em><\/p>\n\n\n\n<p>My hope, then, is that you <strong>spend some time thinking about what truly needs to be in the database<\/strong>, and what it means for the future. <\/p>\n\n\n\n<p>If I get even just a few engineers to stop and think along these lines, that&#8217;ll be a success for me.<\/p>\n\n\n\n<p>For everyone else, well, I\u2019m still available for consulting and fixing the decisions you made previously! Just give me a call.\u00a0<\/p>\n\n\n\n<p><strong><em>What do you think? I&#8217;d love to hear your thoughts in the comments down below.<\/em><\/strong><\/p>\n\n\n\n<section id=\"my-first-block-block_10fa301a4e89a7fb84654479a4f8dd77\" class=\"my-first-block alignwide\">\n    <div class=\"bg-brand-600 text-base-white py-5xl px-4xl rounded-sm bg-gradient-to-r from-brand-600 to-brand-500 red\">\n        <div class=\"gap-4xl items-start md:items-center flex flex-col md:flex-row justify-between\">\n            <div class=\"flex-1 col-span-10 lg:col-span-7\">\n                <h3 class=\"mt-0 font-display mb-2 text-display-sm\">Free desktop tool for fast PostgreSQL monitoring and diagnostics<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            Stay in control of PostgreSQL performance with Redgate pgNow \u2013 a free desktop tool for fast, focused diagnostics. No agents, no setup, just actionable insights when you need them.                                    <\/div>\n            <\/div>\n                                            <a href=\"https:\/\/www.red-gate.com\/products\/redgate-pgnow\/\" class=\"btn btn--secondary btn--lg\" aria-label=\"Learn more &amp; download now: Free desktop tool for fast PostgreSQL monitoring and diagnostics\">Learn more &amp; download now<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<section id=\"faq\" class=\"faq-block my-5xl\">\n    <h2>FAQs<\/h2>\n\n                        <h3 class=\"mt-4xl\">1. Can PostgreSQL handle queuing, caching, and document storage?<\/h3>\n            <div class=\"faq-answer\">\n                <p dir=\"ltr\">Yes, because PostgreSQL&#8217;s extension ecosystem makes almost anything possible &#8211; but doing so often tightly couples unrelated systems, so a single failure (like a stuck queue) can take down the whole application. Each added workload then increases the database&#8217;s cost and attack surface.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">2. Why is putting a queue inside the database risky?<\/h3>\n            <div class=\"faq-answer\">\n                <p dir=\"ltr\">When a queuing system lives inside the same database as the rest of the application, it isn&#8217;t isolated. A queue backup or failure can cascade into a full production outage, since the queue and the application share the same resources and failure domain.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">3. Who owns database extensions when something breaks?<\/h3>\n            <div class=\"faq-answer\">\n                <p dir=\"ltr\">Ownership is often unclear. Engineers typically own application code, but database-level logic \u2014 extensions, procedures, embedded services \u2014 frequently falls into a gray area between engineering and DBA teams, which slows down incident response.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">4. Does adding extensions to PostgreSQL increase cloud costs?<\/h3>\n            <div class=\"faq-answer\">\n                <p dir=\"ltr\">Yes. Every extension or embedded service adds CPU, memory, and disk demand to the database tier, which is usually already one of the most expensive parts of a cloud bill. Running the same workload (e.g. queuing) outside the database is typically cheaper.<\/p>\n            <\/div>\n            <\/section>\n","protected":false},"excerpt":{"rendered":"<p>A DBA explains why using PostgreSQL for queuing, caching, or document storage creates ownership gaps, security risks, and higher cloud costs.&hellip;<\/p>\n","protected":false},"author":346611,"featured_media":113061,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143523,53,143534],"tags":[4168,4170,158978],"coauthors":[159379],"class_list":["post-113006","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-featured","category-postgresql","tag-database","tag-database-administration","tag-postgresql"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/113006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/346611"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=113006"}],"version-history":[{"count":20,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/113006\/revisions"}],"predecessor-version":[{"id":113094,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/113006\/revisions\/113094"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media\/113061"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=113006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=113006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=113006"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=113006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}