From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | "Jason ChenTJ (CN)" <Jason(dot)ChenTJ(at)homecredit(dot)cn> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: 回复: [External]Re: BUG #18540: Does PG16 standby database support function pg_replication_origin_advance? |
Date: | 2024-07-29 13:52:10 |
Message-ID: | ZqeeijrY91EfhYfu@ip-10-97-1-34.eu-west-3.compute.internal |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi,
On Mon, Jul 22, 2024 at 02:51:35AM +0000, Jason ChenTJ (CN) wrote:
> 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...)
As one can not create a subscription on a standby nor execute pg_replication_origin_create()
on a standby then I think that the only way to get a replication origin on a
standby is when it comes from the primary (i.e if a subscription has been created
on the primary or one executed pg_replication_origin_create() on the primary).
Then it seems to me that pg_replication_origin_advance() should be executed on
the primary (if needed).
Could you please describe your use case?
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-07-29 14:06:02 | Re: BUG #18558: ALTER PUBLICATION fails with unhelpful error on attempt to use system column |
Previous Message | Андрей Рачицкий | 2024-07-29 08:24:48 | Re: BUG #18545: \dt breaks transaction, calling error when executed in SET SESSION AUTHORIZATION |