Re: PostgreSQL Logical decoding

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Ankit Oza <ankit(dot)p(dot)oza(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL Logical decoding
Date: 2022-10-11 06:25:56
Message-ID: CAA4eK1LzsZ0B6DjQu52MaDc3CbxYd-_+dBH9k53sLM7yzK4Xcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 11, 2022 at 9:32 AM Ankit Oza <ankit(dot)p(dot)oza(at)gmail(dot)com> wrote:
>
> Hello,
>
> We are looking for an example on how to consume the changes of WAL produced by logical decoding (streaming or SQL interface) in another postgres server.
>
> Basically, we are trying to create a replica/standby postgre server to a primary progre server. Between Logical replication and Logical Decoding we came up with Logical decoding as the choice due to limitation of logical replication (materialized views, external views/tables, sequences not replicated). However we are not finding a good example with instructions on how to set up a consumer postgre server.
>

I think from a code perspective, you can look at contrib/test_decoding
and src\backend\replication\pgoutput to see how to consume changes and
send them to the replica. You can refer to docs [1] for SQL functions
to consume changes.

[1] - https://www.postgresql.org/docs/devel/functions-admin.html#FUNCTIONS-REPLICATION

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-10-11 06:29:19 Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf
Previous Message Andrey Lepikhov 2022-10-11 06:06:57 Re: Fast COPY FROM based on batch insert