Re: Postgres crashes at memcopy() after upgrade to PG 13.

From: Avinash Kumar <avinash(dot)vallarapu(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres crashes at memcopy() after upgrade to PG 13.
Date: 2021-03-16 16:50:10
Message-ID: CAN0TujdruRVmsqgvWsFUCug0W9hDYpDS=uKs6+FJMrKx3jSDZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi,

On Tue, Mar 16, 2021 at 1:44 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:

> On Tue, Mar 16, 2021 at 5:01 AM Avinash Kumar
> <avinash(dot)vallarapu(at)gmail(dot)com> wrote:
> > I am afraid that it looks to me like a deduplication bug but not sure
> how this can be pin-pointed. If there is something I could do to determine
> that, I would be more than happy.
>
> That cannot be ruled out, but I don't consider it to be the most
> likely explanation. The index in question passes amcheck verification,
> which includes verification of the posting list tuple structure, and
> even includes making sure the index has an entry for each row from the
> table. It's highly unlikely that it is corrupt, and it's hard to see
> how you get from a non-corrupt index to the segfault. At the same time
> we see that some other index is corrupt -- it fails amcheck due to a
> cross-level inconsistency, which is very unlikely to be related to
> deduplication in any way. It's hard to believe that the problem is
> squarely with _bt_swap_posting().
>
> Did you actually run amcheck on the failed-over server, not the original
> server?
>
Yes, it was on the failover-over server where the issue is currently seen.
Took a snapshot of the data directory so that the issue can be analyzed.

>
> Note that you can disable deduplication selectively -- perhaps doing
> so will make it possible to isolate the issue. Something like this
> should do it (you need to reindex here to actually change the on-disk
> representation to not have any posting list tuples from
> deduplication):
>
> alter index idx_id_mtime set (deduplicate_items = off);
> reindex index idx_id_mtime;
>
I can do this. But, to add here, when we do a pg_repack or rebuild of
Indexes, automatically this is resolved. But, not sure if we get the same
issue again.

>
> --
> Peter Geoghegan
>

--
Regards,
Avi.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2021-03-16 17:02:46 Re: Postgres crashes at memcopy() after upgrade to PG 13.
Previous Message Andrew Anderson 2021-03-16 16:50:08 Re: WAL-files is not removing authomaticaly

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-03-16 16:51:04 Re: pg_amcheck contrib application
Previous Message Fujii Masao 2021-03-16 16:49:51 Re: [PATCH] pgbench: improve \sleep meta command