From: Bridget Frey <bridget.frey@redfin.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Brauwerman <michael.brauwerman@redfin.com>
Cc: Peter Geoghegan <peter@2ndquadrant.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6200: standby bad memory allocations on SELECT
Date: Tue, 31 Jan 2012 05:47:57 -0800
Message-ID: <-1661306214659431052@unknownmsgid> (raw)
In-Reply-To: <25481.1327986356@sss.pgh.pa.us>
References: <CAHOc93mRXhU0CMko1jLvxwkKz42jTRZ63xRxDATsEw2t5ukOZQ@mail.gmail.com>
<CA+TgmoZ6S5e46xThsHKv6-vV58f==D4_TH_ECB2sQsZRngL+8Q@mail.gmail.com>
<CAHOc93mzK58JO8XJdHHp=6tLRjv45WYY4cxsdkAZYNnpNQ7RjA@mail.gmail.com>
<CA+TgmoYxXZQhEosbnd=NaJ8=6oW-AyLJ+RukFBBQ-xYwq5Lfiw@mail.gmail.com>
<CAHDXJ6jes_Zv1OFo=EZn-HGOrjKoy2uLz3Sg4ShXhb0yMY_-5A@mail.gmail.com>
<CAEYLb_VDqHiysP_wgDsef7CXo7+P3tW3qSa9KR5+bWqpc=kJgg@mail.gmail.com>
<CAHDXJ6j6Oyke3z_eNSqA1O8G+3M359c3r5NjUp25F5sRUmSPDA@mail.gmail.com>
<CA+TgmoYDuD1HOX=uaQ8BXn5WZoM406SV6Cutcsc54LPsbDnTWg@mail.gmail.com>
<CAHOc93kpe7yPM6h0ORoxBnF8mA5YxacepQEYqEOkqzOLs9UesA@mail.gmail.com>
<23550.1327978836@sss.pgh.pa.us>
<1137480939183049761@unknownmsgid>
<25365.1327985956@sss.pgh.pa.us>
<25481.1327986356@sss.pgh.pa.us>
We have no DDL whatsoever in the code. We do update rows in the
logins table frequently, but we basically have a policy of only doing
DDL changes during scheduled upgrades when we bring the site down. We
have been discussing this issue a lot and we really haven't come up
with anything that would be considered unusual here. The tables
experiencing issues have maybe 1M to 200M rows, we do updates and
selects frequently, they have standard btree primary key indexes, and
the failing query always seems to be a select for a single row based
on a primary key lookup. All of these code paths worked flawlessly
prior to our 9.1 upgrade (we had been using skytools replication).
And we see no problems on the master despite similar workloads there.
It is definitely puzzling, and we are not too sure what to look into
next...
Sent from my iPhone
On Jan 30, 2012, at 9:06 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wrote:
>> Hm. The stack trace is definitive that it's finding the bad data in a
>> tuple that it's trying to print to the client, not in an index.
>
> BTW, after a bit more reflection it occurs to me that it's not so much
> that the data is necessarily *bad*, as that it seemingly doesn't match
> the tuple descriptor that the backend's trying to interpret it with.
> (In particular, the reported symptom would be consistent with finding
> a small integer constant at a place where the descriptor expects to find
> a variable-length field.) So that opens up a different line of thought
> about how those could get out of sync on a standby. Are you in the
> habit of issuing ALTER TABLE commands to add/delete/change columns on
> these tables? In fact, is there any DDL whatsoever going on around the
> time these failures happen?
>
> regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: bridget.frey@redfin.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, michael.brauwerman@redfin.com, peter@2ndquadrant.com
Subject: Re: BUG #6200: standby bad memory allocations on SELECT
In-Reply-To: <-1661306214659431052@unknownmsgid>
References: <CAHOc93mRXhU0CMko1jLvxwkKz42jTRZ63xRxDATsEw2t5ukOZQ@mail.gmail.com> <CA+TgmoZ6S5e46xThsHKv6-vV58f==D4_TH_ECB2sQsZRngL+8Q@mail.gmail.com> <CAHOc93mzK58JO8XJdHHp=6tLRjv45WYY4cxsdkAZYNnpNQ7RjA@mail.gmail.com> <CA+TgmoYxXZQhEosbnd=NaJ8=6oW-AyLJ+RukFBBQ-xYwq5Lfiw@mail.gmail.com> <CAHDXJ6jes_Zv1OFo=EZn-HGOrjKoy2uLz3Sg4ShXhb0yMY_-5A@mail.gmail.com> <CAEYLb_VDqHiysP_wgDsef7CXo7+P3tW3qSa9KR5+bWqpc=kJgg@mail.gmail.com> <CAHDXJ6j6Oyke3z_eNSqA1O8G+3M359c3r5NjUp25F5sRUmSPDA@mail.gmail.com> <CA+TgmoYDuD1HOX=uaQ8BXn5WZoM406SV6Cutcsc54LPsbDnTWg@mail.gmail.com> <CAHOc93kpe7yPM6h0ORoxBnF8mA5YxacepQEYqEOkqzOLs9UesA@mail.gmail.com> <23550.1327978836@sss.pgh.pa.us> <1137480939183049761@unknownmsgid> <25365.1327985956@sss.pgh.pa.us> <25481.1327986356@sss.pgh.pa.us> <-1661306214659431052@unknownmsgid>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox