Re: BUG #17716: walsender process hang while decoding 'DROP PUBLICATION' XLOG - Mailing list pgsql-bugs

From Bowen Shi
Subject Re: BUG #17716: walsender process hang while decoding 'DROP PUBLICATION' XLOG
Date
Msg-id CAM_vCudVP=zWPaTXo23voZUSFnwrF7dMkVRYpiExkxiiTsvo6w@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17716: walsender process hang while decoding 'DROP PUBLICATION' XLOG  (shveta malik <shveta.malik@gmail.com>)
Responses Re: BUG #17716: walsender process hang while decoding 'DROP PUBLICATION' XLOG
Re: BUG #17716: walsender process hang while decoding 'DROP PUBLICATION' XLOG
List pgsql-bugs
Hello,
Thanks for your advice. I make some tests and this problem can't be
reproduced in PG 14+ version. I think adding a new XLOG type will help
resolve this problem. But I think the following patch may be helpful
in the PG 13 version.

The invalidation contains two parts: pgoutput and relfilenodeMap. We
have no way to optimize relfilenodeMap part , since it has been
discussed in previous mails
https://www.postgresql.org/message-id/CANDwggKYveEtXjXjqHA6RL3AKSHMsQyfRY6bK+NqhAWJyw8psQ@mail.gmail.com.

However, I'd like to contribute a patch to fix pgoutput part. We can skip
invalidating caches after first time with a lazy tag and this works.
It almost doubles the walsender performance while decoding this XLOG.

I use the test in the last email and reduce the number of relations in
publications to 1000, the test result is following:

Before optimization: 76 min
After optimization: 35 min

Though the result is not good enough, I think this patch is still worthy.

Attachment

pgsql-bugs by date:

Previous
From: Robins Tharakan
Date:
Subject: Re: BUG #17713: Assert with postgres_fdw in v12
Next
From: PG Bug reporting form
Date:
Subject: BUG #17725: Sefault when seg_in() called with a large argument