<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rebuild-large-indexes-on-aurora-postgresql-with-blue-green-deployments-ahloqjc3j" -->

---
title: Rebuild large indexes on Aurora PostgreSQL with...
description: Rebuilding large indexes on Aurora PostgreSQL can fail due to temporary storage exhaustion during the sort phase. This guide shows how to combine Aurora...
canonical: https://daily.dev/posts/rebuild-large-indexes-on-aurora-postgresql-with-blue-green-deployments-ahloqjc3j
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Rebuild large indexes on Aurora PostgreSQL with Blue/Green Deployments | daily.dev
og:description: Rebuilding large indexes on Aurora PostgreSQL can fail due to temporary storage exhaustion during the sort phase. This guide shows how to combine Aurora...
og:url: https://daily.dev/posts/rebuild-large-indexes-on-aurora-postgresql-with-blue-green-deployments-ahloqjc3j
og:image: https://api.daily.dev/og/posts/AhlOQJc3J.png
og:image:alt: Rebuild large indexes on Aurora PostgreSQL with Blue/Green Deployments
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rebuild large indexes on Aurora PostgreSQL with Blue/Green Deployments

**[AWS Database Blog](https://daily.dev/sources/aws-database-blog)** · 15 min read · 0 upvotes · 0 comments

## Summary

Rebuilding large indexes on Aurora PostgreSQL can fail due to temporary storage exhaustion during the sort phase. This guide shows how to combine Aurora Blue/Green Deployments with Aurora Optimized Reads on NVMe-backed instance classes (db.r6gd, db.r8gd, db.r6id) to safely rebuild bloated indexes. The approach runs REINDEX CONCURRENTLY on the isolated green environment, which uses fast local NVMe storage for sort spills instead of EBS over the network. Benchmarks show a 5,942 MB index bloated to 8,918 MB was rebuilt to 4,557 MB in ~4 minutes, writing 19.5 GB of sort data to NVMe. Running the rebuild on green kept production query latency 60% lower and throughput 37% higher compared to rebuilding directly on the production instance. After validation, a switchover promotes green to production with under a minute of downtime.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://aws.amazon.com/blogs/database/rebuild-large-indexes-on-aurora-postgresql-with-blue-green-deployments>

## Similar posts on daily.dev

- [Fix PostgreSQL Index Bloat & Buffer Cache Issues](https://daily.dev/posts/fix-postgresql-index-bloat-buffer-cache-issues-ah4j9ec7v) · SitePoint · 2 upvotes · 0 comments
- [Amazon RDS and Aurora expand R8gd and M8gd to additional Regions](https://daily.dev/posts/amazon-rds-and-aurora-expand-r8gd-and-m8gd-to-additional-regions-wgzz3wz0d) · AWS · 1 upvotes · 0 comments

---

Tags: [#aws](https://daily.dev/tags/aws), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/rebuild-large-indexes-on-aurora-postgresql-with-blue-green-deployments-ahloqjc3j)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Rebuild large indexes on Aurora PostgreSQL with Blue/Green Deployments","url":"https://daily.dev/posts/rebuild-large-indexes-on-aurora-postgresql-with-blue-green-deployments-ahloqjc3j","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/rebuild-large-indexes-on-aurora-postgresql-with-blue-green-deployments-ahloqjc3j"},"datePublished":"2026-07-13T21:05:55.443Z","dateModified":"2026-07-13T21:25:28.605Z","description":"Rebuilding large indexes on Aurora PostgreSQL can fail due to temporary storage exhaustion during the sort phase. This guide shows how to combine Aurora...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dcef1a47d711a13d6a7bb74a3b6c20f9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dcef1a47d711a13d6a7bb74a3b6c20f9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"AWS Database Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"AWS Database Blog","logo":"https://media.daily.dev/image/upload/s--En-avd2a--/f_auto,q_auto/v1780213446/logos/aws-database-blog?_a=BAMAMiWQ0","url":"https://daily.dev/sources/aws-database-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/rebuild-large-indexes-on-aurora-postgresql-with-blue-green-deployments-ahloqjc3j","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"aws,postgresql","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"AWS Database Blog","item":"https://daily.dev/sources/aws-database-blog"},{"@type":"ListItem","position":3,"name":"Rebuild large indexes on Aurora PostgreSQL with Blue/Green Deployments"}]}
```

