回复: [External]Re: BUG #18540: Does PG16 standby database support function pg_replication_origin_advance?

From: "Jason ChenTJ (CN)" <Jason(dot)ChenTJ(at)homecredit(dot)cn>
To: Michael Paquier <michael(at)paquier(dot)xyz>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: 回复: [External]Re: BUG #18540: Does PG16 standby database support function pg_replication_origin_advance?
Date: 2024-07-22 02:51:35
Message-ID: ZQ0PR01MB1080F9DCA995F5190441F0E292A82@ZQ0PR01MB1080.CHNPR01.prod.partner.outlook.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Michael,

Thanks for your reply!

I just check the patch: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5aa235042

The related source code located on src/backend/replication/logical/origin.c and it's marked as new file .

[cid:9554a9eb-7db8-400f-a815-21f3de8917e7]

The error is from this function: replorigin_check_prerequisites

[cid:57394eb2-b636-4c7f-8c99-c0ecdc3de3a5]

And you perform the WAL log offset reset function, must do a validation by replorigin_check_prerequisites.

[cid:856de95d-cc1d-4f6e-91cc-27575f3fc243]

So am not sure it's a bug or not on standby database, or some dev can fix it on next version?
(like add some logicals to identify the database role first...)

========================================================================================
On Mon, Jul 15, 2024 at 08:28:26AM +0000, PG Bug reporting form wrote:
> Seems the function pg_replication_origin_advance is not supported running on
> standby instance. It there any workaround for it?

Not that I know of. One would need to study how to lift this
restriction in place since the introduction of replication origins in
5aa2350426c4.
--
Michael
========================================================================================

Thanks
Jason
________________________________
发件人: Michael Paquier <michael(at)paquier(dot)xyz>
发送时间: 2024年7月16日 9:00
收件人: Jason ChenTJ (CN) <Jason(dot)ChenTJ(at)homecredit(dot)cn>; pgsql-bugs(at)lists(dot)postgresql(dot)org <pgsql-bugs(at)lists(dot)postgresql(dot)org>
主题: [External]Re: BUG #18540: Does PG16 standby database support function pg_replication_origin_advance?

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.
________________________________

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2024-07-22 08:41:11 Re: BUG #18546: Attempt to insert default into a non-updatable column of a view fails with a dubious error
Previous Message Thomas Munro 2024-07-21 22:00:28 Re: [EXTERNAL] Re: Windows Application Issues | PostgreSQL | REF # 48475607