Postgres scale-out and HA operations
The idea
Problem
Hypothesis
A credible first version
Evidence
Hand-collected links the ratings are based on, each with the curator's note.
- Jepsen: Amazon RDS for PostgreSQL 17.4
Note: Replication/HA setups can violate expected isolation guarantees.
Operational complaintHacker Newsattached by curatormanualnews.ycombinator.com608 eng.Apr 28, 2025 - Lessons learned from sharding Postgres at Notion
Note: Application-level sharding of Postgres as a major engineering project.
Operational complaintHacker Newsattached by curatormanualnews.ycombinator.com471 eng.Oct 5, 2021 - Show HN: PgDog – Scale Postgres without changing the app
Note: Strong interest in transparent Postgres sharding proxies.
Feature requestHacker Newsattached by curatormanualnews.ycombinator.com326 eng.Feb 23, 2026 - Self-hosting a high-availability Postgres cluster on Kubernetes
Note: HA Postgres on Kubernetes remains a DIY exercise.
Operational complaintHacker Newsattached by curatormanualnews.ycombinator.com107 eng.Jan 2, 2024
Existing solutions
How well each covers the problem has not been assessed yet; the ratings' differentiation reason says what is known.
Signals attached by the rules
A signal attaches when it concerns one of the entities below and its kind is one of Operational complaint, Migration, Feature request, or its title contains one of: sharding postgres, postgres sharding, postgres high availability, patroni, postgres failover, resharding, connection pooler.
Migration (12)
- Comment on “PostgreSQL for Everything”
For "replacing your microservice" you should checkout PostgREST. It basically turns PostgreSQL into a microservice.
451 eng.Aug 19, 2026 - Comment on “PostgreSQL for Everything”
PostgreSQL Replacing Your Microservice I've done that before and the code was a mess. It works at the beginning but APIs do much more than piping data from the database. When you start dealing with ACL, external calls, code reuse, etc. It's just nice to have all the tools available to you from…
451 eng.Aug 19, 2026 - Comment on “The Internals of PostgreSQL”
It's also hard to even claim they migrated from “PostgreSQL” to “MySQL”; they surely run MySQL underneath in their new system, but it's a really weird hybrid where it's basically only the storage engine. Even secondary indexes, on of their main points of contention in the article, is managed as a…
379 eng.Nov 4, 2026 - Comment on “Does anyone run Postgres without PgBouncer?”
(I work on the postgres proxy layer at Neon) PgBouncer is entirely optional and it's not always the right choice. If you have a classical app (non serverless) and you can maintain a connection pool from your app, then I recommend avoiding pgbouncer. The benefits of pgbouncer mostly come from…
165 eng.Aug 16, 2026 - Comment on “A new write and space optimized storage engine for MySQL is here”
"Why Uber Engineering Switched from Postgres to MySQL"
64 eng.Oct 8, 2026 - Comment on “Moving our warehouse off DuckDB”
The 2026 equivalent of 2016's "Why Uber Engineering Switched from Postgres to MySQL" !
0 eng.Nov 2, 2026 - Comment on “There is more to code review than (automatable) detection”
People forget that pull requests and doing code reviews in the context of those is still a fairly recent thing. People did some code reviews before that of course but nowhere near as strictly. Same with testing practices, static code analysis, etc. Most of that wasn't all that common until…
0 eng.Sep 28, 2026 - Comment on “Executable Is a SQLite Database”
Yes. In this interview Michael Stonebreaker, one of the original developers of PostgreSQL, discusses (among other topics) replacing the file system with a database :
0 eng.Aug 24, 2026 - Comment on “The road to ACID transactions in Cassandra 6”
its not a drop in. There is no reasonable way of replacing a huge existing cassandra cluster with scylladb. You have to transition as it was a new database.
0 eng.Aug 22, 2026 - Comment on “Go 1.27”
This was one of the times where it made some sense. A lot of their complaints were about GC, which Discord has had issues with in the past on other things. Notably, Discord switched from Cassandra to ScyllaDB for their messages, and cited the Java GC as a big reason.
0 eng.Aug 20, 2026 - Comment on “Kimi K3-256k”
My current Claude Code session has been going on for like 35 hours and has used up around 400 million tokens, thankfully almost all of those being cached (95-98%) - pretty typical for long form agentic work. First you spend like 2-3 hours working on a plan, once you have that you just tell the…
0 eng.Jul 29, 2026 - Comment on “Why Vanilla JavaScript”
HTTP was designed for multi-page applications/websites but I think it makes sense that Facebook migrated from basic PHP/MySQL to something more complex including React and making less full-page navigation events, for performance reasons (server costs and mobile loading time). There's also UX…
0 eng.Jul 13, 2026
Operational complaint (26)
- Comment on “PingCap TiDB Leaks”
First the Google Cloud outage [0], then the CA private key leak [1]... ...and now this... Today we are making the PingCAP breach public. We possess the complete TiDB Cloud control plane, its billing and finance estate, its GCP storage estate and its AWS cost and billing estate, its Jira, its CRM,…
433 eng.Oct 20, 2026 - Comment on “MongoDB CEO resigns to join Meta”
AI makes it much less painful to move off of legacy and/or overpriced software. Agreed. While DynamoDB != MongoDB, they are similar. I built a product on DynamoDB (Single-table-design) and while it was cool to find a way to make relational data work in DynamoDB, it was always a chore. New feature…
366 eng.Sep 28, 2026 - Comment on “MongoDB CEO resigns to join Meta”
TIL MongoDB is a publicly traded company. I can't imagine the future is bright for MongoDB as AI makes it much less painful to move off of legacy and/or overpriced software.
366 eng.Sep 28, 2026 - Comment on “MongoDB CEO resigns to join Meta”
MongoDB's biggest weakness was its default settings, which made it insecure and very vulnerable to data consistency failures. An absolute nightmare for PR. It's not perfect, but it's comparable to other NoSQL databases now.
366 eng.Sep 28, 2026 - Comment on “Does anyone run Postgres without PgBouncer?”
I do. I run Postgres in the same server as the app in some apps, with no pgbouncer, no regret at all after 10+ years.
165 eng.Aug 17, 2026 - NATS Server: k8s: Consistent memory leak through versions 2.10.9 -> 2.10.17 -> 2.10.20.
Observed behavior Recently, we encountered a strange memory leak in our NATS brokers. Memory consumption is continuously growing without any parallel workload being noticed. The memory continues growing until the pod is OOM (The limit is 8GB). GOMEMLIMIT Is configured to 6GiB. We have this issue for several NATS versions already, and the upgrade didnt help 2.10.9 - 2.10.17 - 2.10.20. The command server ls shows that the consumption is low, as it seen below: server ls ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮…
githubgithub.com26 eng.Oct 15, 2024 - SurrealDB: Feature: Rate limiting for Queries
Is your feature request related to a problem? This issue is to track the implementation of rate limiting, as it's an essential feature with security in mind it should be prioritised. This feature has come up several times over the past year on Discord and Surreal streams. It's not possible to rate limit queries sent in by the users when Surreal is used as a web / client database, and this can easily lead to abuse by running: - Expensive queries run by scoped users - Abusing API calls when used with http functions ( http::get , http::post etc.) Describe the solution Surreal needs to expose…
githubgithub.com18 eng.May 19, 2023 - Comment on “PostgreSQL Migrator 1.0: Moving Fast from Oracle and MySQL to PostgreSQL”
mysql accepts utf-8 in latin-1 varchar, bad dates, etc. mysql is actually a fractal of bad design for data integrity. For SQL syntax, using bare strings as identifier may be a nightmare: SELECT 1 'int' is a column named int.
6 eng.Sep 15, 2026 - Comment on “How to Extract Data from InnoDB, MyISAM, and MyRocks Files?”
What is your plan B when you find out the MySQL/MariaDB backup is missing, but the database crashes with data corruption? Or maybe someone ran a DELETE without a WHERE clause, but the binary log was already rotated (or doesn't have the pre-image due to "minimal")?
0 eng.Oct 28, 2026 - Comment on “Node.js: 5 vulnerabilities found, update now”
Another day, another disaster: So in just a single 1 week: 1. Google Cloud Outage [0] 2. eMudhra CA private key Leak [1] 3. PingCap TiDB 10.6 TB data Leak [2] 4. PHP2Shell RCE [3] 5. LiteLLM compromise round 2 [4] 6. GitLab Unauthenticated RCE [5] 7. Railway Security Breach [6] Now four CVEs that…
0 eng.Oct 22, 2026 - Comment on “Compromised LiteLLM 1.107.0 on PyPI Installs a Credential Stealer and Backdoor”
So in just 1 week: 1. Google Cloud Outage [0] 2. eMudhra CA private key Leak [1] 3. PingCap TiDB 10.6 TB data Leak [2] 4. PHP2Shell uncovers critical CVEs (with AI) [3] ...and now we have Round 2 of a LiteLLM compromise after the first one in [4]. [0] [1] [2] [3] [4]
0 eng.Oct 21, 2026 - Comment on “Storage orchestration layer presents many S3/blob providers as one S3 endpoint”
been putting a lot of work into this since last time I shared it...a LOT has changed and improved. Have picked up some users and contributors, been finding and fixing bugs while improving/expanding functionality. Great for homelabbers who want to take all the always-free tier s3/blob allotments and…
0 eng.Oct 5, 2026 - Comment on “Fakecloud: Local AWS cloud emulator for integration tests”
Your first paragraph "just use a MySQL container" and the second "test against what prod runs on", seem to contradict? If not, you are asking for eventual outage in Prod when some slightly different AWS thing bites you. Exactly...
0 eng.Sep 28, 2026 - Comment on “What Sun got wrong”
- UltraSPARC was more than a decade too late to make up for SPARC falling way behind x86 64. Sun needed to give up on SPARC, but again, vendor lock-in sounds sweet but turns out to be poison. UltraSPARC came out in 1995, and Athlon 64 in 2003. I'm confused on how it could be late? - The MySQL…
0 eng.Sep 21, 2026 - Comment on “What Sun got wrong”
I've written several times here about all the mistakes that Sun made during the 00s that doomed it. Among the many mistakes it made are: - Cancelling -if briefly- Solaris on x86 in 2002. This killed Solaris in the minds of many who didn't want to be locked into Sun for SPARC. - Failing to make a…
0 eng.Sep 21, 2026 - Comment on “Containers are great. Kubernetes is great. But [DBA crying]”
Kubernetes isn’t the problem. Adding unnecessary layers is. Good database architecture should reduce complexity, not introduce it. Fewer layers mean fewer dependencies, fewer failure points, and less operational overhead. I’m a DBA, and I’m saying you don’t need Kubernetes to automate PostgreSQL.…
0 eng.Aug 28, 2026 - Comment on “PostgreSQL for Everything”
At Comper we have a very hot key-value store for annotating git data. We maintain a parallel git-blame data structure so we can do incremental "git blame -w -M -C -C". Typically a very expensive operation, but if you make it incremental, you can make it very cheap when new commits need to be…
0 eng.Aug 19, 2026 - Comment on “Does anyone run Postgres without PgBouncer?”
of course, the vast, vast majority of PostgreSQL users outside of managed cloud hosting are not using pgbouncer. pgbouncer introduces complexities into the database conversation (transaction-level pooling interacting with the prepared statement cache is a long recurring nightmare for us at…
0 eng.Aug 16, 2026 - Comment on “Tracking down the 16-year-old WAL-reset SQLite bug”
"...and then we discovered an unexpected clue . We wanted a way to restore service that didn’t involve rolling back to the last known-good backup (which would lose a lot of data) or repairing the known-corrupted database (which was potentially risky). To do this, we built a transaction logging…
0 eng.Aug 13, 2026 - Comment on “Humans missed 1 in 3 threats approving AI agent commands across 40k game runs”
I joined Oracle in 2012, and I myself complained that the user experience was horrible: get an Oracle DB installed was a nightmare, starting with so many questions. I heard complaints from other users about it requiring, during installation, that an admin password must be set. I myself had…
0 eng.Aug 6, 2026 - Comment on “Massively Parallel Postgres Backups”
What I emphasized in this article (author here) is scaling postgres backups. This works because there's already rock-solid systems built into postgres + surrounding tooling to build from. The broader takeaway is the principle of, "how do I take something that doesn't scale on its own and make it…
0 eng.Aug 3, 2026 - Comment on “Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy”
From an engineering perspective, sqlite and PostgreSQL are equivalent. The difference is only in the deployment/maintenance. And considering the context he stated, zero downtime really doesn't seem like something he's worrying about.
0 eng.Jul 26, 2026 - Comment on “The startup's Postgres survival guide”
I think you need to analyze the disaster scenarios and recovery costs you are trying to balance before you can really evaluate these different options. If you are on reasonable storage, I think it is arguable that the main reason you would have to recover is due to a software failure leading to…
0 eng.Jul 22, 2026 - Comment on “The startup's Postgres survival guide”
An atomic volume snapshot should work for any database that's durable on power failure. Ideally preceded by a checkpoint, to minimize recovery time. Atomicity of the snapshot mechanism is essential to prevent data corruption using this approach. We used EBS snapshots on AWS for multi-TB MongoDB to…
0 eng.Jul 22, 2026 - Comment on “Show HN: Ingestr CDC – open-source CDC replication in Go”
Man I have had a lot of gripes with debezium... the setup alone in a kubernetes cluster with strimzi kafka connect... And dealing with the kafka connect errors and fixing replication slots... ehhh was painful. Does this tool make it any well easier. One problem I expirienced in production systems…
0 eng.Jul 18, 2026
Feature request (52)
- CloudNativePG: [Feature]: In-place recovery from backup
Is there an existing issue already for this feature request/idea? - [X] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated. What problem is this feature going to solve? Why should it be added? Currently, In CloudNativePG, you can't perform recovery in place on an existing cluster. Recovery is instead a way to bootstrap a new Postgres cluster starting from an available physical backup. While it is amazing to have this capability, the ergonomics are not great, especially if needing to recover a database in an emergency…
githubgithub.com161 eng.Jul 30, 2024 - CloudNativePG: [Feature]: managing cnpg in GitOps workflows (FluxCD, ArgoCD ...)
Is there an existing issue already for this feature request/idea? - [X] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated. What problem is this feature going to solve? Why should it be added? In kubernetes cluster manager using gitops tools like FluxCD, I faced a really annoying limiation, especially for restoring db cluster, which is the following: When defining a CNPG cluster resource for a db, we specify the initialization mode for the cluster of the database. There are two options: initdb: This mode creates an empty…
githubgithub.com117 eng.Oct 9, 2024 - CloudNativePG: [Feature]: allow cross-namespace Database and Role configuration
Is there an existing issue already for this feature request/idea? - [x] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated. What problem is this feature going to solve? Why should it be added? The new CRD for Database and the upcoming Role CRD use LocalObjectReference for the cluster setting. This makes it awkward to share a Postgres cluster among applications in different namespaces. Describe the solution you'd like It would be nice if a Cluster in another namespace can be referenced in Database and Role objects. This…
githubgithub.com103 eng.Nov 6, 2024 - SurrealDB: Feature: Expiration / TTL of records
Is your feature request related to a problem? I use REDIS a lot for my companies. One of the features that would be an awesome addition would be the ability to expire records in SurrealDB. I would use it for rate limiting, session information and for situations like where a record doesn't need to live for more than X number of hours/mins/seconds after an event occured. And when I mean event I mean an event like a car show, meet up...etc where some data can be archived elsewhere. Describe the solution // EXAMPLES // RATE limit someone to 5 seconds for any reason CREATE ratelimit SET ip =…
githubgithub.com88 eng.Oct 4, 2022 - CloudNativePG: [Feature]: VolumeSnapshot retention policy
Is there an existing issue already for this feature request/idea? - [x] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated. What problem is this feature going to solve? Why should it be added? Currently in CNPG when you have volume snapshots enabled the .spec.backup.retentionPolicy is ignored. This leads to having to implement your own retention policy or manually delete older snapshots as they grow unbounded in the cluster over time. Describe the solution you'd like Add functionality to remove snapshots older than what…
githubgithub.com77 eng.Nov 1, 2024 - CockroachDB: sql: Ecto compatibility
This is a list of issues found with Ecto (Elixir). Note that most of these are not required to get Ecto working, but each of these can be a potential roadblock when migrating an existing app to cockroach. [ ] Defaults where arrays are set must be annotated, solving this with fragment on default definition [ ] Can't do any operation on a column or table where the operation is in the same migration as that objects creation [x] 32917 Must do foreign keys in three separate migrations (add column, add an index on that column, add the constraint) [ ] Doesn't support Compound Data Types [x] 8318 [ ]…
githubgithub.com70 eng.Jan 2, 2019 - Typesense: [Feature Request] Support querying joined fields
Feature request: support querying joined fields Hi, Typesense has been a great product for me and my team. It is exciting to see the new features in the recent 26.0 release (especially the JOINs). However a missing feature we really wish for is being able to do a "search in joined fields". That is, in the docs at one-to-one-relation where you do: sh curl " search" -X POST \ -H "X-TYPESENSE-API-KEY: ${TYPESENSE API KEY}" \ -d '{ "searches": [ { "collection": "books", "include fields": "$authors(first name,last name)", "q": "famous" } ] }' which resulted with json { "document": { "id": "0",…
githubgithub.com57 eng.Apr 8, 2024 - SurrealDB: Feature: Cronjob support
Is your feature request related to a problem? Auto deletion of "expired" data could be done with cronjobs, such as password invalidation after some time, or deletion of "archived" data Describe the solution Cronjobs is an "industry-standard" job scheduler, implemented in other DB solutions and used in the industry, with cronjobs we could automatically update, create and delete data with a great amount of flexibility. Alternative methods N/A SurrealDB version surreal 1.0.0-beta.7 for linux on x86 64 Contact Details paulandreiabrudan@protonmail.com Is there an existing issue for this? - [X] I…
githubgithub.com53 eng.Sep 17, 2022 - 51 eng.Apr 21, 2021
- RabbitMQ: [Prometheus] Detailed per-queue metrics for incoming/deliver/ack rate
Is your feature request related to a problem? Please describe. Hi there! I'd like to be able to scrape the equivalent of the per-queue incoming/deliver/ack rate that is visible on the RabbitMQ Management page. As far as I understand this would currently be possibly by scraping the detailed metrics under the channel queue metrics and channel queue exchange metrics . However, my setup is composed of a limited set of queues (< 50) and a really high number of connections/channels (10k to 100k), therefore I cannot afford scraping those per-channel metrics. Describe the solution you'd like I'd like…
githubgithub.com45 eng.Jun 28, 2023 - CockroachDB: sql: support rolling back nested transactions containing schema changes
CockroachDB 20.1 is introducing support for nested transactions via postgres' (and SQL standard) savepoint protocol. SAVEPOINT, RELEASE SAVEPOINT, COMMIT SAVEPOINT. However as of 20.1, a (nested) transaction containing schema changes—or any type of DDL statement, really—cannot be rewound. This is because the logic needed to invalidate cached schema elements in the transaction has not been implemented yet. To advertise compatibility with PostgreSQL to a level that satisfies most uses in client apps, this gap remains to be closed. ---- Note: the discussion starting in Nov 2016 up to and…
githubgithub.com44 eng.Nov 16, 2016 - CockroachDB: New syntax: AS OF FUTURE SYSTEM TIME
Is your feature request related to a problem? Please describe. My request is to remove one of the last challenges faced by database users, and that's populating the database with data. Database population suffers from the following two issues: 1) Importing can take a long time. The cluster cannot be used until there's data in there. 2) The database administrator needs to know the data in advance. Describe the solution you'd like A new variant of the current SQL syntax called 'AS OF FUTURE SYSTEM TIME An example: First we create a new table: CREATE TABLE users ( id UUID PRIMARY KEY, first name…
githubgithub.com43 eng.Apr 1, 2022 - CloudNativePG: [Feature]: Run a script after adding/removing managed roles
Is there an existing issue already for this feature request/idea? - [x] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated. What problem is this feature going to solve? Why should it be added? The declarative syntax is missing a way to declare a script to be run after adding/removing a managed role. In the context of adding a new managed role, I need to be able to GRANT privileges on it. In the context of credential rotation, I want to add a new role, transfer ownership of objects from the old role to the new one, and…
githubgithub.com42 eng.Mar 12, 2025 - CloudNativePG: [Feature]: Allow fallback to initdb if backup is missing
Is there an existing issue already for this feature request/idea? - [x] I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated. What problem is this feature going to solve? Why should it be added? In some environments a full recovery from a backup is optional - for example in non-production clusters environments. Currently if a bootstrap.recovery is specified but the base backup is not found in the object store (for example s3) the cluster fails to initialize and gets stuck in error state This is technically expected and…
githubgithub.com39 eng.May 5, 2025 - CockroachDB: sql: FK options (deferrable, etc)
Is your feature request related to a problem? Please describe. FK options are tuning knob that help developers decide when the FK relations become active. They are useful to enable fast import of known-consistent data. Describe the solution you'd like Support DEFERRABLE, NOT DEFERRABLE, INITIALLY DEFERRED, INITIALLY IMMEDIATE like postgresql. Epic CRDB-58740 Jira issue: CRDB-4783
githubgithub.com38 eng.Oct 19, 2018 - SurrealDB: Feature: Support Server-Sent Events (SSE) protocol in addition to WebSockets (WS)
Is your feature request related to a problem? SSE may be preferable over WS for certain users, as it provides a few benefits over WS: - Websockets may be blocked by certain WAFs / company firewalls - SSE does not require a 101 HTTP upgrade request, so the handshake is simpler - SSE supports cookies and headers, and do not need a separate custom "sign-in" / "connection init" frame like a WS connection does - Additionally, this means you can allow / deny the connection without having to initialize it on the server - SSE / Fetch are stateless APIs, unlike WS which requires additional server-side…
githubgithub.com37 eng.Aug 26, 2022 - Strimzi: [Enhancement] Start using CC self heal features
Hi, I have been running a kafka cluster with strimzi for a while now. However a few months ago we moved to preemtible vm's in Google cloud. This means that kafka brokers get terminated at least one time a day. If I could enable the self heal in cruise control downtime could be reduced to unnoticeable proportions. However I see you filter that property in the documentation. Why is that? Only other solution I see is building a service that detects broker outage manually and than triggers a rebalance. However this would not be needed if I could just enable this one property...
githubgithub.com37 eng.Sep 3, 2020 - TiDB: Support `SKIP LOCKED` Syntax
Feature Request Is your feature request related to a problem? Please describe: Introduce a new syntax to handle hot rows Describe the feature you'd like: Starting with MySQL 8.0.1 we are introducing the SKIP LOCKED modifier which can be used to non-deterministically read rows from a table while skipping over the rows which are locked. Describe alternatives you've considered: Teachability, Documentation, Adoption, Migration Strategy:
githubgithub.com36 eng.Jun 24, 2020 - CockroachDB: sql: support remainder of the postgres trigram module (pg_trgm)
The postgres trigram module ( is used for various kind of text search applications. A good chunk of it is supported in CockroachDB 22.2 (see below list of functionality), but not everything yet. Supported in CockroachDB 22.2: - [x] similarity(), show trgm() - [x] text % text - [x] pg trgm.similarity threshold - [x] trigram gin inverted indexes - [x] Accelerate % - [x] Accelerate LIKE and ILIKE Not yet supported: - [ ] Implement word similarity() - [ ] Implement strict word similarity() - [ ] Implement % and and (strict word similarity search) - [ ] Acclerate % and , , , , and (distance, word…
githubgithub.com36 eng.Oct 3, 2019 - Strimzi: [Enhancement] Advertise pod IPs in listener
I'm using Strimzi on AWS EKS with the VPC CNI which means my pod IPs are routable and accessible from outside of the Kubernetes cluster. Ideally like to be able to configure a listener to advertise the pod IPs so that clients outside of the cluster are able to connect to brokers directly rather than having to go through a nodeport service. I'm struggling to figure out if this is possible with the current overrides available?
ecosystemsissues.ecosyste.ms31 eng.Nov 19, 2020 - TiDB: Support materialized views
Description Support materialized views. Category Feature, Performance Value TiDB can be used as a real-time data warehouse / create derived datasets, so that analyzing will be more effective.
githubgithub.com31 eng.Jun 15, 2020 - CockroachDB: sql: alter column type in transaction not supported
With the current schema changer infrastructure, it's difficult to support alter column type in transactions. This is because the computed column swap doesn't actually occur until the transaction is committed. Thus any references to the column being altered will be done on the original column and not the column after the swap. Here is an example with adding a constraint to an altered column root@127.0.0.1:61263/movr ALTER TABLE t ADD CONSTRAINT x unique UNIQUE (x); root@127.0.0.1:61263/movr BEGIN; ALTER TABLE t ALTER COLUMN x TYPE STRING; ALTER TABLE t ADD COLUMN y INT; ALTER TABLE t ADD…
githubgithub.com31 eng.May 21, 2020 - CockroachDB: sql: support disabling constraints in-place
Currently we always check/enforce a constraint if it exists. In some cases an operator may wish to skip the enforcement of constraints, e.g. during bulk loading, and then re-enable it later and do a one-time validation pass. We have currently have unvalidated constraints, and the ability to explicitly validate an unvalidated constraint, but even unvalidated constraints are enforced . A disabled constraint would be unenforced, skipping the extra work (e.g. FK lookups) required to enforce it. Re-enabling a disabled constraint would first need to move it to unvalidated, wait for that version to…
githubgithub.com31 eng.Oct 23, 2017 - CockroachDB: sql: support NULLS FIRST/LAST modifiers for indexes
Many SQL engines (including Oracle and Postgres) support the ORDER BY modifiers of NULLS {FIRST LAST} . These modifiers, as their names' suggest, specify that NULL values should be returned before/after non-NULL values. We should consider if we want to support this syntax given that it could be pretty useful for queries on any sparse tables. If so, it might take a bit of work to make sure both modifiers work correctly with ordering which uses an index to avoid in-memory sorting. This is a 2-part issue. Part 1 is complete, while Part 2 is pending. [Completed] In we added support for NULLS…
githubgithub.com30 eng.Apr 22, 2016 - CockroachDB: sql: add support for GROUPING SETS, CUBE, and ROLLUP
According to Postgres docs: More complex grouping operations are possible using the concept of grouping sets . The data selected by the FROM and WHERE clauses is grouped separately by each specified grouping set, aggregates computed for each group just as for simple GROUP BY clauses, and then the results returned. We (maybe) should add support for GROUPING SETS , CUBE , and ROLLUP . I have no idea how hard that would be, but 7 out 99 queries of TPC-DS benchmark use rollup . Jira issue: CRDB-5096
githubgithub.com29 eng.Mar 19, 2020