Re: BUG #17695: Failed Assert in logical replication snapbuild.
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: bowenshi <zxwsbg@qq.com>
Cc: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2022-11-28T05:07:17Z
Lists: pgsql-bugs
On Fri, Nov 25, 2022 at 4:44 PM bowenshi <zxwsbg@qq.com> wrote:
>
> Thanks for your advice! I update my test script, now it can 100% reproduce problem in my computer.
Hmm, I could not reproduce the issue even with the updated patch.
> The new script and fix code are both in the patch. However, I met new problem after adding fix code. It fails into a new trap following:
>
> TRAP: FailedAssertion("TransactionIdPrecedesOrEquals(safeXid, snap->xmin)", File: "snapbuild.c", Line: 593, PID: 1576)
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT(ExceptionalCondition+0xb9)[0xb1ca28]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT(SnapBuildInitialSnapshot+0x1b3)[0x8f3c79]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT[0x9136b9]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT(exec_replication_command+0x398)[0x91456a]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT(PostgresMain+0x7be)[0x984e4a]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT[0x8c0d5b]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT[0x8c06cd]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT[0x8bc9de]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT(PostmasterMain+0x117a)[0x8bc2b5]
> postgres: master: walsender postgres [local] CREATE_REPLICATION_SLOT[0x7bdb13]
>
Testing this script in some environments, I sometimes get this
assertion failure. I think this is the same issue that has been
reported in this thread[1]. I'll investigate this issue as well and
share my findings.
[1] https://www.postgresql.org/message-id/CAA4eK1L8wYcyTPxNzPGkhuO52WBGoOZbT0A73Le%3DZUWYAYmdfw%40mail.gmail.com
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix assertion failure in snapshot building
- 0f404c581247 15.13 landed
- 7be51eb4e169 14.18 landed
- eb27d3dc8887 16.0 landed
- 48efb2302bea 17.0 landed
-
Fix perl warning from commit 9b4eafcaf4
- c93254424f28 14.7 cited