Instacart is making a major change to its core infrastructure: the grocery delivery giant is moving its search system from Elasticsearch to PostgreSQL.
For years, Instacart relied on Elasticsearch to power product discovery. But the setup required constant synchronization between Elasticsearch and PostgreSQL, which stored core catalog and inventory data. That duplication increased complexity, costs, and delayed real-time updates.
By consolidating everything into PostgreSQL with the help of extensions like pgvector for semantic search and pg_trgm for text matching, Instacart now manages search and catalog in one place. Engineers report 10× fewer write workloads and up to 80% savings in storage and indexing costs.
The new system uses sharded PostgreSQL clusters that handle both traditional keyword searches and AI-powered recommendations. This not only improves speed and accuracy but also makes real-time updates, like inventory changes and discounts, immediately visible to customers.
For Instacart, the shift is about more than technology, it’s about scale and simplicity. By betting on PostgreSQL, the company has built a leaner, faster, and more adaptable search system, offering a glimpse of where large-scale e-commerce infrastructure may be headed.