Re: The dangers of streaming across versions of glibc: A cautionary tale

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Matthew Kelly <mkelly(at)tripadvisor(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, Matthew Spilich <mspilich(at)tripadvisor(dot)com>
Subject: Re: The dangers of streaming across versions of glibc: A cautionary tale
Date: 2014-08-07 00:11:37
Message-ID: 20140807001137.GA14724@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 6, 2014 at 09:24:17PM +0000, Matthew Kelly wrote:
> The following is a real critical problem that we ran into here at TripAdvisor,
> but have yet figured out a clear way to mitigate.
>
> TL;DR:
> Streaming replicas—and by extension, base backups—can become dangerously broken
> when the source and target machines run slightly different versions of glibc.
> Particularly, differences in strcoll and strcoll_l leave "corrupt" indexes on
> the slave. These indexes are sorted out of order with respect to the strcoll
> running on the slave. Because postgres is unaware of the discrepancy is uses
> these "corrupt" indexes to perform merge joins; merges rely heavily on the
> assumption that the indexes are sorted and this causes all the results of the
> join past the first poison pill entry to not be returned. Additionally, if the
> slave becomes master, the "corrupt" indexes will in cases be unable to enforce
> uniqueness, but quietly allow duplicate values.

No surprise; I have been expecting to hear about such breakage, and am
surprised we hear about it so rarely. We really have no way of testing
for breakage either. :-(

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2014-08-07 01:12:53 Re: The dangers of streaming across versions of glibc: A cautionary tale
Previous Message Adrian Klaver 2014-08-06 23:14:59 Re: Connecting with PostgreSQL 9.1 using the Ubuntu machine user and peer authentication method