Sources
1577 sources collected
like we work with those objections and help to implement, right? So yeah, but we, yeah, for everything we had episode. There are episodes for everything. So this was number 1, heavy load contention. And I chose the most popular reasons. Of course there are other reasons. But in my view, DDL and queue-like
wiki.postgresql.org
PGConf.dev 2025 Community Summit - PostgreSQL wikiDiscussion: There are objective reasons for that disconnect: 1. There are very few database courses in colleges, 2. Database changes can't be instantaneously implemented, and they are irreversible for the most part 3. Lack of development tools How can we improve the situation?
www.siriusopensource.com
What are the Challenges of Using PostgreSQL in ...### Distributed Transactions and Write Bottlenecks - Many existing PostgreSQL scaling solutions are described as "half-distributed" because they can distribute **read operations**across a cluster but **rely on a single write node**. - This creates a **significant write bottleneck**, especially problematic for real-time systems processing distributed transactions like payments or account balance updates. A constant influx of new transactions can overwhelm this single write point, leading to **performance degradation**. … ### Managing High-Traffic and Performance Degradation - PostgreSQL does not possess an inherent capability to **automatically scale to meet fluctuating demand**; this responsibility **rests entirely with the user**. - Efficient scaling requires **intricate tuning of the database itself**, beyond merely adding more CPU and memory. **Read-heavy workloads**(e.g., reporting) can experience severe degradation without proper read replicas and caching layers. Conversely, **write-heavy workloads**(e.g., financial transactions) demand meticulous indexing and partitioning strategies to prevent slow inserts and locking issues. … ### Challenges with Large Data Volumes and Real-time Analytics - PostgreSQL may **not be the optimal choice for applications requiring real-time or near real-time analytics**, where refresh rates measured in hours or days can be unacceptable. - For **massive single datasets**(billions of rows, hundreds of gigabytes), especially with frequent joins, PostgreSQL performance can be **extremely slow, with queries potentially taking hours**. While techniques like partitioning can help, they **introduce additional layers of complexity**. - PostgreSQL **does not natively support columnar storage**, a crucial feature for efficient analytical workloads, often necessitating **extensions that are not inherent to the core design**. - This suggests enterprises with specific Online Analytical Processing (OLAP) or big data requirements might need a **hybrid database strategy**, increasing architectural complexity and data synchronization challenges. **High Availability, Resilience, and Data Consistency Concerns** Ensuring continuous operation and maintaining data integrity are paramount, but achieving these with PostgreSQL **demands substantial effort and introduces specific risks**. … ### Complexity of Replication, Failover, and Disaster Recovery Setups - PostgreSQL **does not offer native multi-region replication capabilities**; organizations must rely on **logical replication and third-party tools**like pglogical or BDR. - Horizontal scaling further complicates monitoring, backup, and failover management, necessitating **robust tooling and specialized expertise**. - This reliance on external tools increases **vendor dependency and internal expertise requirements**, shifting the burden of integration and maintenance onto the enterprise and leading to potential vendor lock-in, increased operational overhead, and higher risk of misconfiguration. … ### Demands of Manual Configuration and Performance Tuning - PostgreSQL offers a multitude of configuration "levers and knobs" requiring **substantial effort to learn and tune**, especially for self-hosted instances at scale. This includes mastering backup/restore and connection pooling procedures. - Efficient scaling requires **meticulous database tuning**to match specific workloads. - This extensive manual tuning implies a **high and continuous dependency on specialized DBA expertise**, translating into significant personnel costs and creating a potential **single point of failure**if knowledge is not shared. ### Challenges of Major Version Upgrades and Application Compatibility - PostgreSQL **does not support in-place major version upgrades**. Upgrades typically necessitate either **dumping and restoring the entire dataset or setting up logical replication**. **Application compatibility must be rigorously tested**for existing queries, indexes, and extensions. - Delaying upgrades increases complexity and risk, as outdated versions miss critical security patches, performance improvements, and new features, eventually leading to unsupported systems. This transforms routine maintenance into a **complex, high-risk migration project**impacting business continuity and development velocity. … **instance rather than restoring to an existing one.** *new* - High write activity generates large transaction logs, consuming significant disk space. - These granular limitations mean enterprises cannot rely solely on basic features, necessitating **complex, multi-faceted strategies**that combine backups, PITR, and exports, potentially with third-party tools. **Security Vulnerabilities and Compliance Risks** While PostgreSQL has inherent security features, ensuring a secure and compliant enterprise deployment requires **diligent configuration and ongoing vigilance**. ### Common Weaknesses - Many vulnerabilities stem from **misconfiguration and operational oversight**, not software flaws. **Weak Authentication:**Default installations can allow passwordless logins ("Trust" method) if not managed, and lack robust password policies. Broad IP access increases attack surface. **Unencrypted Connections:**Default installations often **do not enable SSL/TLS encryption**, leaving data vulnerable. **Excess User Privileges:**Granting superuser privileges for routine tasks creates unnecessary risks.
10 ● Cost effective scalability: Scale systems efficiently while minimizing infrastructure costs ● Developer Productivity: Streamline developer workflows to handle rapid iteration with lean teams. ● Operational Costs: Control costs while scaling infrastructure, avoiding over-provisioning. “Had a bunch of issues hitting a scale where the instance size wasnʼt good enough. Downtime was a problem.ˮ “We needed faster iteration cycles with limited infrastructure. The team couldnʼt afford to spend extra time on database maintenance.ˮ 11 ● Schema Migrations: Ensure schema migrations are done without downtime. ● Backup and Recovery: Robust backup and disaster recovery systems as their data grows. ● Operational Costs: Balance performance and cost as they scale data systems. “Schema migrations have always been a challenge, especially without downtime. We donʼt have the luxury of waiting for off-hours.ˮ “We handle over a terabyte of transactional data every day, and backups are critical. Ensuring recovery plans are solid is non-negotiable.ˮ 12 ● High Availability: Zero downtime and fault tolerance across globally distributed systems. ● Real-Time Data Replication: Reliable real-time replication systems to manage large-scale, globally distributed data. ● Performance Monitoring: Require tools to optimize performance at scale and ensure reliable uptime. “Real-time replication across multiple regions is our biggest challenge. We handle petabytes of data that need to be constantly synced.ˮ “Vacuuming and scaling problems with Aurora are a constant headache. Would like something horizontally scalable like CockroachDB.ˮ … 16 Some Postgres schema changes are difficult ● Locking issues (e.g. on a busy table, in a fast a migration can wait at an exclusive lock and cause downtime) https://xata.io/blog/migrations-and-exclusive-locks ● Constraints might require data back-filling (if you add a NOT NULL UNIQUE column, how do you fill the data? ● Backwards incompatible changes require a multiple step process (e.g. renames) Motivation
… One is scary plans and statistics out of it which is common like stands are not in place and things are not working. Then vacuum process no post conference is complete without vacuum {ts:65} being talked about. The third is connections then multi- transactions. This is a special feature. Then how memory utilization log contentions are taken there and then we'll also have a quick look on other challenges which might be very and cases … So symptoms are like {ts:187} slow running queries and then you will sometimes you will observe that there are more sequential scans happening or stale data. So these are common symptoms what we see but uh you know most common symptom is what we will say is uh whenever you try to debug the query {ts:206} first of all you need to find it out what exactly or which query is taking time. … Right? That is the {ts:268} important thing because most frequently we will see that if stats are out outdated then query will start giving you uh I mean optimizer will generate a bad plans and because of that you will see that query is getting affected right or you need to see uh there is a right {ts:287} index and which was you know uh the data was less in that table and there is a right index which was uh like getting picked by uh the queries till yesterday but today the data has been grow and now whatever the index right uh it is there on the table it is not actually working
## You don’t need 20 tools. ... ### One boring old SQL database might be the best backend in 2025. medium.com But then reality shows up usually in the form of corporate infrastructure. You get dropped into a production environment that’s basically a dungeon crawler for database queries: - Twelve network hops before your request even touches the DB - Firewalls that block you like a bouncer at the world’s most boring nightclub - Antivirus software that somehow slows down SQL execution - Latency numbers that would make your Redis cry And the worst part? You’re not the database admin. That means: - No installing PGVector for AI search - No PG Cron for internal scheduling - No PG Crypto for secure operations - Sometimes, you don’t even *know* which region your database is in Suddenly, your “one tool for everything” dream feels like playing Elden Ring… with a potato for a GPU. … ## 4. Row-level security: when theory trolls reality On paper, **Row Level Security (RLS)** sounds brilliant. You set rules so each user only sees the rows they’re allowed to. No more messing around with manual filters in your app layer the database enforces it for you. Then you turn it on in production… and suddenly, every query plan looks like it just rolled a critical fail. What used to be a fast `SELECT` now feels like it’s doing a 14-table join for fun. Indexes? Still there, but apparently on vacation. … But here’s what actually happens: - Debugging becomes a questline from hell no proper stack traces, no modern logging tools, just squinting at SQL like it’s an ancient scroll. - Version control turns into duct tape your stored procedure updates live in random `.sql` files or, worse, only exist in production and nobody remembers who wrote them. - Your CI/CD pipeline? Doesn’t even know this logic exists, so testing is… let’s say “optional.” One developer summed it up perfectly: > *“If you maintain jobs and business logic inside Postgres, you’re giving up git for guesswork.”* It’s not that stored procedures are evil they’re great for certain performance-critical cases but making them the *default* place for all your application logic is asking for future pain. When that pain hits, it doesn’t matter how elegant your SQL was you’ll be the one spelunking through functions at 2 AM while prod is down. … ## You don’t need 20 tools. ... You get dropped into a production environment that’s basically a dungeon crawler for database queries: - Twelve network hops before your request even touches the DB - Firewalls that block you like a bouncer at the world’s most boring nightclub - Antivirus software that somehow slows down SQL execution - Latency numbers that would make your Redis cry And the worst part? You’re not the database admin. That means: - No installing PGVector for AI search - No PG Cron for internal scheduling - No PG Crypto for secure operations - Sometimes, you don’t even *know* which region your database is in Suddenly, your “one tool for everything” dream feels like playing Elden Ring… with a potato for a GPU. … ## 4. Row-level security: when theory trolls reality ... You set rules so each user only sees the rows they’re allowed to. No more messing around with manual filters in your app layer the database enforces it for you. Then you turn it on in production… and suddenly, every query plan looks like it just rolled a critical fail. What used to be a fast `SELECT` now feels like it’s doing a 14-table join for fun. Indexes? Still there, but apparently on vacation. ... But here’s what actually happens: - Debugging becomes a questline from hell no proper stack traces, no modern logging tools, just squinting at SQL like it’s an ancient scroll. - Version control turns into duct tape your stored procedure updates live in random `.sql` files or, worse, only exist in production and nobody remembers who wrote them. - Your CI/CD pipeline? Doesn’t even know this logic exists, so testing is… let’s say “optional.” One developer summed it up perfectly: > *“If you maintain jobs and business logic inside Postgres, you’re giving up git for guesswork.”* It’s not that stored procedures are evil they’re great for certain performance-critical cases but making them the *default* place for all your application logic is asking for future pain. When that pain hits, it doesn’t matter how elegant your SQL was you’ll be the one spelunking through functions at 2 AM while prod is down.
www.tigerdata.com
What is the State of PostgreSQL? - TigerDataWhile 57% reported that the onboarding experience as either “fairly easy” or “extremely easy,” many cited a few ways to make the onboarding experience even better: ... We asked about the biggest pain points people experience when using Postgres, and many responses included the following: - Documentation could be improved (cleaned up, add more tutorials) - Replication, sharding, partitioning, vacuuming - High availability - Options for scaling up and out - Schema development Perhaps you identify with some of the points listed above (no solution is perfect!), but we *also* saw a ton of positive feedback for Postgres, its ecosystem, and the community.
In this code talk, we dive deep into practical tuning techniques to avoid common pitfalls that silently degrade performance by improving an underperforming PostgreSQL database workload. Learn how excessive indexes hurt write throughput, why HOT updates fail, and how vacuum behavior can stall your system. We’ll demonstrate how to use Query Plan Management (QPM) and pg_hint_plan for plan stability and decode wait events to uncover hidden bottlenecks. ... … Otherwise, you'll see high storage and IOPs utilization. {ts:201} And if you have more indexes which are unused or duplicate, every modification to the database will lead to update those indexes unnecessarily, which is where you see storage and I obstacleization. And Postress SQL uses work memory to control the query operations such as
www.instaclustr.com
Top Postgresql Best...### Replication and high availabilityitReplication in PostgreSQL involves maintaining a real-time copy of a database on another server. It ensures high availability by allowing transition to a replica if the primary server fails. Managing replication can be challenging due to the need for intricate configuration and careful monitoring to prevent data loss or corruption. Ensuring consistent data across replicas while accommodating write and read loads requires careful setup and ongoing oversight. Achieving high availability requires automated failover mechanisms and monitoring. Balancing load between primary and standby servers is crucial for PostgreSQL performance and availability. Selecting the appropriate strategy (streaming replication or logical replication) based on system needs is essential in maintaining operational readiness. ... ### Performance optimizationioOptimizing performance in PostgreSQL involves a combination of hardware, configuration, and query tuning. Effective indexing, appropriate data types, and well-designed database schemas are important for improving speed. Developers must analyze query performance through tools like EXPLAIN to identify bottlenecks. Efficient use of resources such as CPU and memory is also crucial in supporting high performance, particularly under heavy loads. Developers must monitor query execution alongside regular maintenance tasks like ANALYZE and VACUUM to maintain efficiency over time. ### Security managementenSecurity in PostgreSQL involves protecting data against unauthorized access and ensuring compliance with relevant standards. Configuring authentication mechanisms and permissions is vital for restricting access to authorized users only. Implementing SSL encryption for data transit and applying security patches promptly are additional layers of defense. Security measures must be strong enough to protect against common threats like SQL injection and brute-force attacks. PostgreSQL provides built-in tools for monitoring suspicious activities, such as logging failed login attempts. Users must know how to properly implement these tools and ensure they regularly audit permissions and access logs. ### Data backup and recoveryerPostgreSQL backup strategies include full, incremental, and continuous methods, offering different recovery points and durations. Full backups ensure recovery but require significant resources, while incremental methods reduce time and storage by only capturing changes since the last backup. Continuous archiving offers real-time recovery capabilities but can be complex to manage effectively. Choosing the right mix of strategies is important for balancing speed, cost, and data safety. The recovery plan must address both data consistency and downtime minimization. Users must test recovery procedures to prepare the system for real-world scenarios. PostgreSQL tools like pg_basebackup and pg_dump can be used for data backup management.
But it isn't all roses. Persistence is difficult in itself, and application development in particular -- automating open-ended interactions with stored state -- brings with it some unique challenges for developers and DBAs alike. Some of Postgres' properties and features help dev teams overcome these issues. Others exacerbate them. In this talk, we'll discuss the rise of the "accidental DBA" and the implications of vernacular schema architecture. We'll explore how development teams work with Postgres across all phases of the software development lifecycle. ... {ts:282} promises we make to our users, to our stakeholders are not about the database. They're about the whole system. The database is a core component. But it is not what users see. It's not what people think of themselves as interacting with. So compatibility and interface stability requirements also are at the level of the system, not the database. … And mistakes here can be very very difficult to take back. In particular, it can be really difficult for us to recognize that what we're doing demands us to be really active stewards of the data and to approach the requirements and {ts:458} complications or nuances that we encounter with a really truly critical eye. Finally, the team can be very unfamiliar with just how expressive data models can be or not realize how important certain elements are and that's how you end up with databases that don't have a single {ts:477} foreign key constraint. So, we'll tend to lean on the familiar the things that we know about. We'll prioritize discoverability and we'll avoid magic like triggers even when a trigger is the best you available solution for the specific problem. um a lot of the time we'll use lowest … But because we think from code, not at first from a position that prioritizes where the data are going to be most of the time, we don't make good decisions here. Uh we're not really set up for success when we start working with persistence. {ts:686} There are many problems that are not unique. probably most of them uh for instance if you're doing something geospatial you probably picked postgress because you know about postpostgis similarly PG vector is you know sort of a killer app for the um ML and vector embedding uh use case but there are a … Um this is all difficult and there are further difficulties. SQL injection is you know {ts:859} the perennial top contender for the most financially damaging application security vulnerability where you're just like interpolating user input directly into a statement and you don't escape it and somebody escapes it for you and then does a few more things on top. … {ts:1398} this is this works it's high effort it's high redundancy and you have a problem of minute variations that make a big difference um also if you you know once you start evolving the schema making some changes to how uh the application uh works with data uh those changes {ts:1417} either break your tests or they don't which is worse because your tests no longer guarantee what you think they do. … Uh we do also only get the first error. This record has many more problems. Um so we're going to have to iterate to solve you know this thing and get this record into the database for real. It is very good to fail fast. Uh we do feel it {ts:1533} a little bit more on the application side because we have long workflows and a lot of setup. … Could be the database, could be something in the code. We have to go on a bit of a journey to rule out the other things and then start figuring out what uh behavior we've encoded in the database is incorrect. And the more complicated the database side of the of the equation is, the more difficult this {ts:1571} gets. … They're very noisy. You have to restart the entire server to adjust them. So hope you got got it right in production the first time. Um, sometimes if especially if you're in a platform as a service context and you're in an {ts:1605} ephemeral environment and haven't wired up PG Badger, it's a pain to get to them.
# 5 Common Pain Points in PostgreSQL #postgres #database Before building Flashboard (our PostgreSQL admin app), our development team had struggled with a lot of stuff that you might've encountered in your PostgreSQL journey. I'm not just talking about tracking foreign keys or building extra-complex SQL queries, but also finding a way to make data editable for non-technical folks without needing to build an entire new software to support the *main thing* — after all, the *main thing* is where the core of the work should be, right, Project Owners? … ## 1. Time-Consuming Query Creation Building SQL queries is fun — until it isn't. It's like RegEx — you get that big, broad smile when it works, but after the 10th time you just hit ChatGPT and ask it to build it for you. It becomes tiresome, error-prone, and, mainly, time-consuming. The *f-in-fun* becomes *f-in-frustration* when you have to redo it all because you got a new client. ## 2. Navigating Foreign Keys A good PostgreSQL database probably has a lot of foreign keys — and that's a green flag in architecture design... or at least that's what the architects say. When the developers need to navigate the schema, jumping from one related table to the other, things get confusing — you gain database-performance in exchange for developer-speed. ## 3. Handling JSON Data I know the feeling of working with JSON in PostgreSQL. Saving data this way saves time and space, but it's waaaay too difficult to query it. You need special operators and functions, and when you’re working with nested structures, it’s easy to mess something up. ## 4. Creating Secure Interfaces for Non-Tech Teams You might need to give access to the database to non-technical users — sometimes there's no time to build a feature in the *main app* or there's no proper admin panel setup for them. This is hard work — it’s not just about making sure they don’t break anything, but also ensuring sensitive data stays locked down. Building a secure admin interface means juggling encryption, access control, and usability — when you notice it, you are building a secondary software as hard to maintain as the primary one. ## 5. Scaling Custom Admin Solutions Continuing from the last topic: what starts as a simple admin panel for a small team can quickly balloon into a mess as your user base or data grows. Suddenly, you’re dealing with performance issues, broken queries, and features that no longer work as expected. Scaling a custom solution is a beast of a task, and unless you planned for it from day one, you’ll probably need to rebuild a good chunk of it down the road.
news.ycombinator.com
Ask HN: I'm a New PostgreSQL Hacker – What Problems Do You Face with Postgres?To learn and grow as a Postgres hacker, I want to hear directly from you—PostgreSQL users—about the problems you face, big or small. These could be operational challenges, performance bottlenecks, confusing behaviors, missing features, or friction points in your workflows. ... That and the updates being a royal pain. DumBthInker007 13 days ago ... EDIT: Missing primary keys in-between also bothers me, however, never found a decent solution for this at scale.