Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6TQQ-0007c0-Bh for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jun 2023 09:56:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q6TQO-00083L-RJ for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jun 2023 09:56:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q6TQO-00083A-Hi for pgsql-hackers@lists.postgresql.org; Tue, 06 Jun 2023 09:56:24 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q6TQL-000YRI-Ny for pgsql-hackers@postgresql.org; Tue, 06 Jun 2023 09:56:23 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5148f299105so12100567a12.1 for ; Tue, 06 Jun 2023 02:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1686045379; x=1688637379; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hHYw9LjStOEeOrFmIoQRlQDyuQparqYaCxRMxK1Q+gs=; b=E/qGZptmmoGD2PsNmFgrv079HvjT9BLJ2ID7HBsCk0yaxSJB2oY+nFk6vvZgIdw4zs ezOht5PgJaBXlxX2CLGKP5hDuAJiyhRUeyom441sisNr9MJD6XOJMSUuSwEJSltiAXKK OenyrzFm/sba34Qzu14oxYECWnZpsENFCYPQ2jJwPItF0flZz8qXoPm6BPX60GugJag0 fiehCPIHaeOEr62rWpN/yl4OhjH06YfbqRGe9xvzBvwPYD7h2EsrAGLG9+t8ei+nDwJg cjVyVSZFT1VNRTZYva4fSk/gWa1ICnT5r09jCvhYgwrGzzhNIQv2FnbRFhtBwJVxOaCX mfaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686045379; x=1688637379; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hHYw9LjStOEeOrFmIoQRlQDyuQparqYaCxRMxK1Q+gs=; b=geASv3fXhD/CxOOehtuQFwSGCMuMZ4KmtWr32MKit0KXaHItgLy20rjCgglSX90kRZ 4MV0vtli3ltf1YGgoH3jM6QM7X86pmcSMU4u/kRR3PJuQtdF6ql8/+c9Adao1vvXAcbD qU4KtBbfIkZg9YQjvpjg6x+2RQ8yW4ZNb+1msVTEN3B+9+UXUiWOp1FIX/dcHaT/ZXh7 /2zduT6smBkFyUi0cMNE9ExFH87fSoogUXWOULdIjagnw1KO0II/vTUQ81PMa8KCwaC3 p8yT5PKMdzD88Y4LRjTarFFWmPoToQQ8/RMcZd4pQxpzLL6L3+vXCZtTNCAFkVek33bl 3yuw== X-Gm-Message-State: AC+VfDxOleW4pikV3d41GnWKndRXaM6+jkHRGE45iogx9mBzw/MZYgBq rze2J5JC+MbXsnDweuoBTmkNBQ== X-Google-Smtp-Source: ACHHUZ4y6c3ePelvwMcuTV39nDmrk8RhW6GnQZAWf2Is7McNBvwQAa7CAakPb7+d5wUo+Xubn8nglg== X-Received: by 2002:aa7:d558:0:b0:50d:89d5:bf95 with SMTP id u24-20020aa7d558000000b0050d89d5bf95mr1780354edr.20.1686045379343; Tue, 06 Jun 2023 02:56:19 -0700 (PDT) Received: from [10.137.0.17] (static-84-42-175-93.bb.vodafone.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id t24-20020aa7d4d8000000b0050c524253dasm4831515edr.20.2023.06.06.02.56.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jun 2023 02:56:18 -0700 (PDT) Message-ID: <99b45770-e3d8-4522-ea52-f4509931c65b@enterprisedb.com> Date: Tue, 6 Jun 2023 11:56:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639) To: Alexander Lakhin , Amit Kapila , Masahiko Sawada Cc: pgsql-hackers References: Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/6/23 11:00, Alexander Lakhin wrote: > Hello, > ...> With the debug logging added inside AssertTXNLsnOrder() I see: > ctx->snapshot_builder->start_decoding_at: 209807224, > ctx->reader->EndRecPtr: 210043072, > SnapBuildXactNeedsSkip(ctx->snapshot_builder, ctx->reader->EndRecPtr): 0 > and inside the loop: > cur_txn->first_lsn: 209792872 > cur_txn->first_lsn: 209975744 > cur_txn->first_lsn: 210043008 > cur_txn->first_lsn: 210043008 > and it triggers the Assert. > So what's the prev_first_lsn value for these first_lsn values? How does it change over time? Did you try looking at the pg_waldump for these positions? regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company