Re: encoding problem while inictial copy in logical replication

2025-09-16 Thread Adrian Klaver
-+--+--- 119464 |0 | {client_encoding=WIN1252,bytea_output=escape,standard_conforming_strings=off} (1 rows) Some time ago I tried to create a logical replication, for a speed up I used I

encoding problem while inictial copy in logical replication

2025-09-16 Thread Jaime Casanova
-+--+--- 119464 |0 | {client_encoding=WIN1252,bytea_output=escape,standard_conforming_strings=off} (1 rows) Some time ago I tried to create a logical replication, for a speed up I used I created a physical replica and converted it in a

Re: Regarding logical replication issues with PostgreSQL versions 16and above

2025-07-29 Thread Laurenz Albe
On Tue, 2025-07-29 at 15:00 +0800, yexiu-glory wrote: > The approach of adding unique indexes is not suitable for our business. Well, then I guess that logical replication is not suitable for your business. Yours, Laurenz Albe

Re: Regarding logical replication issues with PostgreSQL versions 16and above

2025-07-29 Thread yexiu-glory
the column filtering function when creating logical replication. >>>If we use `alter table table1 replica identity default;`, there is no issue at all. >>> However, when encountering new business scenarios, we need to use the CSI columnar index function. >>>Under the d

Re: Regarding logical replication issues with PostgreSQL versions 16 and above

2025-07-27 Thread DINESH NAIR
ing function when creating logical > replication. > If we use `alter table table1 replica identity default;`, there is no issue > at all. > However, when encountering new business scenarios, we need to use the CSI > columnar > index function. Under the default setting, the

Re: Regarding logical replication issues with PostgreSQL versions 16 and above

2025-07-18 Thread Laurenz Albe
On Fri, 2025-07-18 at 19:08 +0800, yexiu-glory wrote: > I'm facing a problem here: our business requires logical data replication to > other > departments, but at the same time, sensitive fields need to be filtered out. > Therefore, we used the column filtering function when

Regarding logical replication issues with PostgreSQL versions 16 and above

2025-07-18 Thread yexiu-glory
I'm facing a problem here: our business requires logical data replication to other departments, but at the same time, sensitive fields need to be filtered out. Therefore, we used the column filtering function when creating logical replication. If we use `alter table table1 replica ide

Re: Query regarding support of test_decoding and PGReplicationStream with Standby Logical Replication

2025-07-17 Thread Kiran K V
Hi Dinesh, Yes, that is correct. Regards, Kiran On Tue, Jul 15, 2025 at 11:43 PM DINESH NAIR wrote: > > Hi Kiran, > > Are we trying to perform logical replication from create replication slots > on a standby server and use logical decoding plugins(JDBC > PGReplicationStr

Re: Query regarding support of test_decoding and PGReplicationStream with Standby Logical Replication

2025-07-15 Thread DINESH NAIR
Hi Kiran, Are we trying to perform logical replication from create replication slots on a standby server and use logical decoding plugins(JDBC PGReplicationStream API) to stream changes from the standby Is my understanding correct? Hi, I have a question regarding the new

Query regarding support of test_decoding and PGReplicationStream with Standby Logical Replication

2025-07-12 Thread Kiran K V
Hi, I have a question regarding the new feature introduced in PostgreSQL 16 that enables logical replication from a standby server. Currently, we are using a standalone instance of PostgreSQL 16 and performing logical replication by creating replication slots and utilizing the JDBC replication

Query regarding support of test_decoding and PGReplicationStream with Standby Logical Replication

2025-07-12 Thread Kiran K V
Hi, I have a question regarding the new feature introduced in PostgreSQL 16 that enables logical replication from a standby server. Currently, we are using a standalone instance of PostgreSQL 16 and performing logical replication by creating replication slots and utilizing the JDBC replication

Re: Logical Replication 08P01 invalid memory alloc request size 1095736448

2025-07-06 Thread Soni M
Thanks Tom, really appreciate it. On Sun, Jul 6, 2025 at 10:12 PM Tom Lane wrote: > Soni M writes: > > We just do patch updates from 15.12 to 15.13, restart Logical Master and > > then Logical Replica, and suddenly Logical replication stops working. > > Streaming replica

Re: Logical Replication 08P01 invalid memory alloc request size 1095736448

2025-07-06 Thread Tom Lane
Soni M writes: > We just do patch updates from 15.12 to 15.13, restart Logical Master and > then Logical Replica, and suddenly Logical replication stops working. > Streaming replication of both are fine. This sounds like the same bug previously discussed in https://www.postgresql.org/m

Re: Logical Replication 08P01 invalid memory alloc request size 1095736448

2025-07-06 Thread Soni M
sr/pgsql-15/lib/libpqwalreceiver""",,,,,"","logical replication worker",,0 DEBUG,0,"find_in_dynamic_libpath: trying ""/usr/pgsql-15/lib/libpqwalreceiver.so""",,,,,"","logical replication worker",,0 D

Logical Replication 08P01 invalid memory alloc request size 1095736448

2025-07-06 Thread Soni M
Hello All, we have this set up : Postgres 15.13 on RHEL 9.6 Logical Master also have 2 streaming replica Logical Replica also have 1 streaming replica We just do patch updates from 15.12 to 15.13, restart Logical Master and then Logical Replica, and suddenly Logical replication stops working

Re: Logical Replication Memory Allocation Error - "invalid memory alloc request size"

2025-06-17 Thread Masahiko Sawada
On Wed, Jun 11, 2025 at 7:36 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Max, > > > We have rewritten as many of our transactions as possible to avoid using > > temporary tables, and so far, that seems to have resolved the problem. > > Good to know. We try to fix as soon as possible. > I pushed th

RE: Logical Replication Memory Allocation Error - "invalid memory alloc request size"

2025-06-11 Thread Hayato Kuroda (Fujitsu)
Dear Max, > We have rewritten as many of our transactions as possible to avoid using > temporary tables, and so far, that seems to have resolved the problem. Good to know. We try to fix as soon as possible. Sorry for inconvenience. Best regards, Hayato Kuroda FUJITSU LIMITED

Re: Logical Replication Memory Allocation Error - "invalid memory alloc request size"

2025-06-11 Thread Max Madden
s with memory allocation errors like: > > > > ``` > > 2025-06-10 14:14:56.800 UTC [299] ERROR: could not receive data from WAL > stream: ERROR: invalid memory alloc request size 1238451248 > > 2025-06-10 14:14:56.805 UTC [1] LOG: background worker "logical > replication worker

RE: Logical Replication Memory Allocation Error - "invalid memory alloc request size"

2025-06-10 Thread Hayato Kuroda (Fujitsu)
6-10 14:14:56.800 UTC [299] ERROR: could not receive data from WAL > stream: ERROR: invalid memory alloc request size 1238451248 > 2025-06-10 14:14:56.805 UTC [1] LOG: background worker "logical replication > worker" (PID 299) exited with exit code 1 > ``` I think this

Logical Replication Memory Allocation Error - "invalid memory alloc request size"

2025-06-10 Thread Max Madden
Hello, I'm encountering a consistent issue with PostgreSQL 15 logical replication and would appreciate any guidance on debugging or resolving this problem. *Setup:* - Source: PostgreSQL 15.x - Target: PostgreSQL 15.x - Replication: Logical replication using publication/subscription (pgo

Re: Custom logical replication client

2025-05-23 Thread Edson Carlos Ericksson Richter
On May 23, 2025, at 11:36, Edson Carlos Ericksson Richter wrote: Dear Community, I'm starting a project where I would like to write an application to decode the logical replication protocol to save data into an analytics streaming system. Is there a starting guide or similar project tha

Re: Custom logical replication client

2025-05-23 Thread Christophe Pettus
> On May 23, 2025, at 11:36, Edson Carlos Ericksson Richter > wrote: > > Dear Community, > I'm starting a project where I would like to write an application to decode > the logical replication protocol to save data into an analytics streaming > system. > Is ther

Custom logical replication client

2025-05-23 Thread Edson Carlos Ericksson Richter
Dear Community, I'm starting a project where I would like to write an application to decode the logical replication protocol to save data into an analytics streaming system. Is there a starting guide or similar project that can help me to educate myself on how to accomplish this

Re: Logical replication, need to reclaim big disk space

2025-05-20 Thread Achilleas Mantzios
one server, I'll process a table a time, with a nightly script, and issue a VACUUM FULL to tables that have already been processed. But I'm in a logical replication architecture (we are using a multimaster system called pgEdge, but I don't think it will make big difference, si

Re: Logical replication, need to reclaim big disk space

2025-05-20 Thread Moreno Andreo
t server is almost immediate. If I had only one server, I'll process a table a time, with a nightly script, and issue a VACUUM FULL to tables that have already been processed. But I'm in a logical replication architecture (we are using a multimaster system called pgEdge, but I don&

Re: Logical replication, need to reclaim big disk space

2025-05-20 Thread Moreno Andreo
ou want to run on cloud. Even the VMs where PostgreSQL is running. The problem is: this is generating BIG table bloat, as you may imagine. Running a VACUUM FULL on an ex-22GB table on a standalone test server is almost immediate. If I had only one server, I'll process a table a time, with a ni

Re: Logical replication, need to reclaim big disk space

2025-05-19 Thread Achilleas Mantzios
with a nightly script, and issue a VACUUM FULL to tables that have already been processed. But I'm in a logical replication architecture (we are using a multimaster system called pgEdge, but I don't think it will make big difference, since it's based on logical replication), and

Re: Logical replication, need to reclaim big disk space

2025-05-19 Thread Moreno Andreo
ime, with a nightly script, and issue a VACUUM FULL to tables that have already been processed. But I'm in a logical replication architecture (we are using a multimaster system called pgEdge, but I don't think it will make big difference, since it's based on logical replication)

Re: Logical replication, need to reclaim big disk space

2025-05-19 Thread Achilleas Mantzios
ting BIG table bloat, as you may imagine. Running a VACUUM FULL on an ex-22GB table on a standalone test server is almost immediate. If I had only one server, I'll process a table a time, with a nightly script, and issue a VACUUM FULL to tables that have already been processed. But I'm

Re: Logical replication, need to reclaim big disk space

2025-05-19 Thread Moreno Andreo
pt, and issue a VACUUM FULL to tables that have already been processed. But I'm in a logical replication architecture (we are using a multimaster system called pgEdge, but I don't think it will make big difference, since it's based on logical replication), and I'm building a

Re: Logical replication, need to reclaim big disk space

2025-05-16 Thread Achilleas Mantzios
as you may imagine. Running a VACUUM FULL on an ex-22GB table on a standalone test server is almost immediate. If I had only one server, I'll process a table a time, with a nightly script, and issue a VACUUM FULL to tables that have already been processed. But I'm in a logical

Logical replication, need to reclaim big disk space

2025-05-16 Thread Moreno Andreo
nightly script, and issue a VACUUM FULL to tables that have already been processed. But I'm in a logical replication architecture (we are using a multimaster system called pgEdge, but I don't think it will make big difference, since it's based on logical replication), and I'

Re: Records count mismatch with logical replication

2025-01-23 Thread Adrian Klaver
On 1/23/25 10:21, Durgamahesh Manne wrote: At subscription side getting this error repeatedly  So Do we have any solution without resync full data again from scratch * |2025-01-23 18:11:46 UTC::@:[507]:DEBUG: logical replication did not find row to be updated in replication target

Re: Records count mismatch with logical replication

2025-01-23 Thread Adrian Klaver
On 1/23/25 09:54, Durgamahesh Manne wrote: See comments in line below. Source Publication Side: archiving=> select * from pg_stat_replication; There is missing information here. Am I right in assuming this is for slot cls_eva_msa? And that it going to same client_addr 10.80.0.168? cl

Re: Records count mismatch with logical replication

2025-01-23 Thread Durgamahesh Manne
_time | 2025-01-23 17:41:11.933344+00 > latest_end_lsn| 16C7/FB48DFE0 > latest_end_time | 2025-01-23 17:41:11.924562+00 > > archiving=> select * from pg_stat_subscription where subname = > 'cle_clm_mka'; > -[ RECORD 1 ]-+--

Re: Records count mismatch with logical replication

2025-01-23 Thread Durgamahesh Manne
g_send_time| 2025-01-23 17:41:17.375879+00 last_msg_receipt_time | 2025-01-23 17:41:17.378932+00 latest_end_lsn| 16C7/FB8CDF68 latest_end_time | 2025-01-23 17:41:17.375879+00 If you need to see more stats based on your info will give you Your response in this regard is valuable Are you r

Re: Records count mismatch with logical replication

2025-01-23 Thread Adrian Klaver
On 1/22/25 18:53, Durgamahesh Manne wrote: > But records count varies with difference of more than 10 thousand Have you looked at the I/0 statistics between the Postgres instances? Seems everything looks good with pg replication slots Except the subscriber is lagging behind the publish

Re: Records count mismatch with logical replication

2025-01-22 Thread Durgamahesh Manne
On Wed, 22 Jan, 2025, 03:11 Adrian Klaver, wrote: > On 1/21/25 11:40, Durgamahesh Manne wrote: > > > > > > On Wed, 22 Jan, 2025, 00:22 Adrian Klaver, > > wrote: > > > > > > > > On 1/21/25 10:06 AM, Durgamahesh Manne wrote: > > > > > > > > Hi Adrian

Re: Records count mismatch with logical replication

2025-01-21 Thread Adrian Klaver
On 1/21/25 11:40, Durgamahesh Manne wrote: On Wed, 22 Jan, 2025, 00:22 Adrian Klaver, > wrote: On 1/21/25 10:06 AM, Durgamahesh Manne wrote: > > Hi Adrian Klaver > > 22,906,216 bytes/10,846 rows  works out to 2112 bytes per row.

Re: Records count mismatch with logical replication

2025-01-21 Thread Durgamahesh Manne
On Wed, 22 Jan, 2025, 00:22 Adrian Klaver, wrote: > > > On 1/21/25 10:06 AM, Durgamahesh Manne wrote: > > > > > Hi Adrian Klaver > > > > 22,906,216 bytes/10,846 rows works out to 2112 bytes per row. > > > > Is that a reasonable per row estimate? > > > > Yes sometimes would be vary > > If I am f

Re: Records count mismatch with logical replication

2025-01-21 Thread Adrian Klaver
On 1/21/25 10:06 AM, Durgamahesh Manne wrote: Hi Adrian Klaver 22,906,216 bytes/10,846 rows  works out to 2112 bytes per row. Is that a reasonable per row estimate? Yes  sometimes would be vary If I am following the lag went from 350GB behind to 22MB. Is the issue that the lag has stal

Re: Records count mismatch with logical replication

2025-01-21 Thread Durgamahesh Manne
On Tue, Jan 21, 2025 at 11:26 PM Adrian Klaver wrote: > On 1/21/25 09:38, Durgamahesh Manne wrote: > > > > > > > > > Hi Adrian Klaver > > > > Really Thanks for your quick response > > > > This happened during repack lag went to more than 350Gb then gradually > > decreased to minimal lag after run

Re: Records count mismatch with logical replication

2025-01-21 Thread Adrian Klaver
On 1/21/25 09:38, Durgamahesh Manne wrote: Hi Adrian Klaver Really Thanks for your quick response This happened during repack lag went to more than 350Gb then gradually decreased to minimal lag after running pg_repack I don't use pg_repack so I don't know what effect it would have on t

Re: Records count mismatch with logical replication

2025-01-21 Thread Durgamahesh Manne
On Tue, Jan 21, 2025 at 9:24 PM Adrian Klaver wrote: > On 1/21/25 04:08, Durgamahesh Manne wrote: > > Hi Team, > > > > I have publication and subscription servers .So seems data replication > > running with minimal lag but records count mismatch with more than 10 > > thousand records between sou

Re: Records count mismatch with logical replication

2025-01-21 Thread Adrian Klaver
On 1/21/25 04:08, Durgamahesh Manne wrote: Hi  Team, I have publication and subscription servers .So seems data replication running with minimal lag but records count mismatch with more than 10 thousand records between source and destination tables Could you please help in resolving this iss

Records count mismatch with logical replication

2025-01-21 Thread Durgamahesh Manne
Hi Team, I have publication and subscription servers .So seems data replication running with minimal lag but records count mismatch with more than 10 thousand records between source and destination tables Could you please help in resolving this issue? Regards, Durga Mahesh

Re: Need help in logical replication

2025-01-13 Thread Divyansh Gupta JNsThMAudy
criber table empty?? > > Thank you, > > On Mon, Jan 13, 2025 at 7:30 AM Divyansh Gupta JNsThMAudy < > ag1567...@gmail.com> wrote: > >> Hii PostgreSQL Community, >> >> I am setting up logical replication between two clusters in the same >> subnet g

Re: Need help in logical replication

2025-01-13 Thread Justin
> Hii PostgreSQL Community, > > I am setting up logical replication between two clusters in the same > subnet group. I’ve created a publication on the primary and a subscription > on the secondary, and the replication slot has been created. However, the > slot remains inactive, and chan

Re: Need help in logical replication

2025-01-13 Thread Rob Sargent
> On Jan 13, 2025, at 5:30 AM, Divyansh Gupta JNsThMAudy > wrote: > >  > Hii PostgreSQL Community, > > I am setting up logical replication between two clusters in the same subnet > group. I’ve created a publication on the primary and a subscription on the > sec

Need help in logical replication

2025-01-13 Thread Divyansh Gupta JNsThMAudy
Hii PostgreSQL Community, I am setting up logical replication between two clusters in the same subnet group. I’ve created a publication on the primary and a subscription on the secondary, and the replication slot has been created. However, the slot remains inactive, and changes aren’t being

Re: Query related to Logical Replication using test_decoding and unchanged-toast-datum

2025-01-06 Thread David G. Johnston
On Mon, Jan 6, 2025 at 7:21 AM Kiran K V wrote: > could you please tell me whether PostgreSQL will truly log these values to > WAL or not ? If not, what will be entered into WAL for the JSON column if > it remains unchanged? > > Not quite sure what you are looking for but: https://www.postgresql

Query related to Logical Replication using test_decoding and unchanged-toast-datum

2025-01-06 Thread Kiran K V
Hi, I am currently using PostgreSQL version 16 and the test_decoding plugin to perform logical replication (using replication slots). I have a simple table with integer column and JSON column. When a non-JSON column is updated, the value "unchanged-toast-datum" for the JSON column i

Re: Starting logical replication at arbitrary point that's available in WAL

2024-12-27 Thread Alexander Uvizhev
On 12/27/24 13:20, Zhijie Hou (Fujitsu) wrote: On Friday, December 27, 2024 7:39 PM Alexander Uvizhev wrote: Hi, I'm doing a logical replication using streaming replication protocol and I'm trying to start a stream from a certain arbitrary point that's available in WAL

RE: Starting logical replication at arbitrary point that's available in WAL

2024-12-27 Thread Zhijie Hou (Fujitsu)
On Friday, December 27, 2024 7:39 PM Alexander Uvizhev wrote: Hi, > I'm doing a logical replication using streaming replication protocol and > I'm trying to start a stream from a certain arbitrary point that's > available in WAL. However, both CRE

Starting logical replication at arbitrary point that's available in WAL

2024-12-27 Thread Alexander Uvizhev
Hi, I'm doing a logical replication using streaming replication protocol and I'm trying to start a stream from a certain arbitrary point that's available in WAL. However, both CREATE_REPLICATION_SLOT and pg_create_logical_replication_slot() create slot with nearly last L

Continue Logical Replication After Master Became Slave and then Became Master Again

2024-12-15 Thread Avi Weinberg
Hi All, Postgres 15.2 We have Patroni cluster with one master and two replicas. The master is publisher (logical replication) to some subscriptions running on other clusters. When we have a failover, the master becomes replica and one of the replicas assume the role of master. In such a

Re: pg_upgrade vs. logical replication

2024-12-09 Thread Greg Sabino Mullane
On Mon, Dec 9, 2024 at 6:43 AM Joe Wildish wrote: Overall, your solution seems okay, but: > a fix has gone in to PG17 that sorts this problem. > > However, we can't go to 17 yet, so need a solution for 15 and 16. Honestly, this would seem like a really, really strong reason to push for v17.

pg_upgrade vs. logical replication

2024-12-09 Thread Joe Wildish
We maintain c.50 logical replicas. Typically the producer version is 12 or 13, and the subscriber version is 14. We intend to upgrade the subscribers to 15 using pg_upgrade. However, we ran into an unexpected problem with that approach. I couldn't find much being mentioned about it on the web,

Re: PostgreSQL logical replication

2024-11-13 Thread Jayadevan M
On Tue, Nov 12, 2024 at 7:47 PM Ron Johnson wrote: > The documentation tells you, down in the Notes section. > > https://www.postgresql.org/docs/16/sql-createpublication.html > Thank you.

Re: PostgreSQL logical replication

2024-11-12 Thread Ron Johnson
The documentation tells you, down in the Notes section. https://www.postgresql.org/docs/16/sql-createpublication.html On Tue, Nov 12, 2024 at 5:46 AM Jayadevan M wrote: > Hello all, > > I am using PostgreSQL 16.4. I tried to set up logical replication with > "postgres" us

PostgreSQL logical replication

2024-11-12 Thread Jayadevan M
Hello all, I am using PostgreSQL 16.4. I tried to set up logical replication with "postgres" user and all worked fine. Then I created a new user (my_replication) to be used for the purpose and couldn't figure out which privileges are necessary. Initially I got an error like &quo

Re: Logical replication disabled, recovery not possible because of 1 large transaction with schema changes?

2024-10-17 Thread Koen De Groote
De Groote wrote: > > > > Hello Muhammad, > > > > The problem with my scenario is the changes are written as a single > transaction, with a BEGIN and COMMIT. In that transaction, there are first > inserts, then a schema change, and then inserts on the new schema. > >

Re: Logical replication disabled, recovery not possible because of 1 large transaction with schema changes?

2024-10-17 Thread Michał Kłeczek
on the new schema. I guess until logical replication of DDL is available you’re out of luck. The best you can do is to have a separate table for recording and replaying schema changes. Create triggers that perform actual DDL operations based on DML in this table. Publish this table on the

Re: Logical replication disabled, recovery not possible because of 1 large transaction with schema changes?

2024-10-17 Thread Koen De Groote
table from publication. On Thu, Oct 17, 2024 at 5:49 AM Muhammad Usman Khan wrote: > Hi, > When you execute schema-altering operations on the publisher, these > changes are not automatically replicated to the subscriber which causes > the following error > logical replication

Re: Logical replication disabled, recovery not possible because of 1 large transaction with schema changes?

2024-10-16 Thread Muhammad Usman Khan
Hi, When you execute schema-altering operations on the publisher, these changes are not automatically replicated to the subscriber which causes the following error logical replication target relation "public.dummy_table" is missing replicated columns: "contact_email", &qu

Logical replication disabled, recovery not possible because of 1 large transaction with schema changes?

2024-10-16 Thread Koen De Groote
ut this runs into the same error. I remove the table from the publication and retry. Same error. Even with the table no longer in the publication, and the table on the subscriber side dropped and re-created, I'm still getting the exact same errors of "logical replication target relation "p

Re: Logical Replication Delay

2024-09-29 Thread GF
Hi Ram, 29 set 2024, 12:29 Ramakrishna m : *We are planning to set up logical replication from a standby to another > server. When the primary goes down, there is no issue as the standby > becomes the primary and the logical slots are already present. However, > when the standby

Re: Logical Replication Delay

2024-09-29 Thread Ramakrishna m
up logical replication from a standby to another server. When the primary goes down, there is no issue as the standby becomes the primary and the logical slots are already present. However, when the standby goes down, these slots are not copied to the third node or the primary by Patroni. Is there

Re: Logical Replication Delay

2024-09-25 Thread Greg Sabino Mullane
On Sat, Sep 21, 2024 at 3:08 PM Ramakrishna m wrote: > I would greatly appreciate any suggestions you may have to help avoid > logical replication delays, whether through tuning database or operating > system parameters, or any other recommendations > In addition to the things alre

Re: Logical Replication Delay

2024-09-23 Thread Justin
Hi Ramakrishna, I am not following the reasoning on not separating the tables into different publications and subscriptions. I set up logical replication all the time in many different environments, one of the audits I perform before deploying LR is looking at pg_stat_all_tables and WAL creation

Re: Logical Replication Delay

2024-09-22 Thread Ramakrishna m
al_segment_size 1073741824 B >> wal_sender_timeout 60 ms >> >> *Optimizations applied:* >> >>1. Vacuum freeze is managed during off-hours; no aggressive vacuum is >>triggered during business hours. >>2. Converted a few tables to unlogged. >>

Re: Logical Replication Delay

2024-09-21 Thread Justin
bles. > > *Pending:* > >1. Turning off/tuning autovacuum parameters to avoid triggering during >business hours. > > *Not possible: *We are running all tables in a single publication, and it > is not possible to separate them. > > I would greatly appreciate any s

Logical Replication Delay

2024-09-21 Thread Ramakrishna m
running all tables in a single publication, and it is not possible to separate them. I would greatly appreciate any suggestions you may have to help avoid logical replication delays, whether through tuning database or operating system parameters, or any other recommendations -- Thanks & Reg

Re: Logical replication without direct link between publisher and subscriber?

2024-09-12 Thread Koen De Groote
I've considered it, but it sounds like a lot of work and failure prone. Even projects like Debezium seem like it's a ton to set up. Thanks for the suggestions. Regards, Koen On Wed, Sep 11, 2024 at 3:20 PM Greg Sabino Mullane wrote: > Dumping changes periodically, sending them directly or uplo

Re: Logical replication without direct link between publisher and subscriber?

2024-09-11 Thread Greg Sabino Mullane
> > Dumping changes periodically, sending them directly or uploading to cloud > storage and then downloading and applying them on the subscriber side. > But maybe there's a simpler option someone here knows about? How about using WAL shipping to populate a replica, and either query that directly

Logical replication without direct link between publisher and subscriber?

2024-09-09 Thread Koen De Groote
I want to have a PG instance receive logical replication from a publisher. However, the subscriber should not have network access to the publisher, in any way. This is for security reasons. No VPN or any setup that allows the subscriber to send traffic to the publisher host. The publisher

Re: Monitoring logical replication

2024-09-03 Thread Shaheed Haque
Mostly to close the loop on this, now that I have things going seemingly reliably... On Tue, 18 Jun 2024 at 14:33, Ron Johnson wrote: > On Tue, Jun 18, 2024 at 5:03 AM Shaheed Haque > wrote: > >> Hi all, >> >> Is there an "official" pairing of LSN values on the publication and >> subscription s

Re: Postgres Logical Replication - how to see what subscriber is doing with received data?

2024-09-02 Thread Shaheed Haque
t; >>> On Sun, Sep 1, 2024 at 9:22 PM Shaheed Haque >>> wrote: >>> >>>> Since nobody more knowledgeable has replied... >>>> >>>> I'm very interested in this area and still surprised that there is no >>>> official/con

Re: Postgres Logical Replication - how to see what subscriber is doing with received data?

2024-09-02 Thread Muhammad Ikram
. >>> >>> Based partly on that thread, I ended up with a script that connects to >>> both ends of the replication, and basically loops while comparing the >>> counts in each table. >>> >>> On Fri, 30 Aug 2024, 12:38 Michael Jaskiewicz, >&g

Re: Postgres Logical Replication - how to see what subscriber is doing with received data?

2024-09-02 Thread Shaheed Haque
mail.com >> ). >> >> Based partly on that thread, I ended up with a script that connects to >> both ends of the replication, and basically loops while comparing the >> counts in each table. >> >> On Fri, 30 Aug 2024, 12:38 Michael Jaskiewicz, >> wrote: >

Re: Postgres Logical Replication - how to see what subscriber is doing with received data?

2024-09-01 Thread Muhammad Ikram
. > > On Fri, 30 Aug 2024, 12:38 Michael Jaskiewicz, > wrote: > >> I've got two Postgres 13 databases on AWS RDS. >> >>- One is a master, the other a slave using logical replication. >>- Replication has fallen behind by about 350Gb. >>- The sla

Re: Postgres Logical Replication - how to see what subscriber is doing with received data?

2024-09-01 Thread Shaheed Haque
, the other a slave using logical replication. >- Replication has fallen behind by about 350Gb. >- The slave was maxed out in terms of CPU for the past four days >because of some jobs that were ongoing so I'm not sure what logical >replication was able to replica

Postgres Logical Replication - how to see what subscriber is doing with received data?

2024-08-30 Thread Michael Jaskiewicz
I've got two Postgres 13 databases on AWS RDS. * One is a master, the other a slave using logical replication. * Replication has fallen behind by about 350Gb. * The slave was maxed out in terms of CPU for the past four days because of some jobs that were ongoing so I'm not

logical replication - who is managing replication slots created automatically during initial sync

2024-08-26 Thread Avi Weinberg
Hi Experts I have seen that logical replication slots created automatically by Postgres during initial sync (a slot per table), are marked as "wal_status = lost" and "active = false". 1. Who is responsible for removing those faulty replication slots? 2. Can a s

Re: pg 16.4, logical replication, use case = data archiving

2024-08-19 Thread milist ujang
My experience with oracle streams (upto version 12.1). there is a tag at capture, by default tag is null (if not defined). at the session level we set DBMS_STREAMS.SET_TAG ; so whatever this session does, will not replicate. Maybe this kind of "tag" is planned in the upcoming logical r

pg 16.4, logical replication, use case = data archiving

2024-08-19 Thread milist ujang
Hi all, I Play logical replication with row filter feature, my use case is data archiving. in lab env, it worked, my questions: - during alter subscription, what about on-going DML? Can it be lost? - any lock during alter subscription should I aware? scenario: # on source tutorial=# ALTER

Re: Logical replication slots on slaves/replicas?

2024-08-01 Thread Piotr Andreassen Blasiak
t; On Thu, Aug 1, 2024 at 10:42 AM Piotr Andreassen Blasiak <mailto:pi...@attendium.com>> wrote: >> Hi, >> >> I know that currently logical replication slots are available only for >> primary servers. Is there any plan to add this feature to read slaves as >&

Re: Logical replication slots on slaves/replicas?

2024-08-01 Thread Torsten Förtsch
n the master as soon as it is reported committed in the wal stream. All the best, Torsten On Thu, Aug 1, 2024 at 10:42 AM Piotr Andreassen Blasiak < pi...@attendium.com> wrote: > Hi, > > I know that currently logical replication slots are available only for > primary servers. I

Re: Logical replication slots on slaves/replicas?

2024-08-01 Thread shammat
Piotr Andreassen Blasiak schrieb am 01.08.2024 um 10:42: > I know that currently logical replication slots are available only > for primary servers. Is there any plan to add this feature to read > slaves as well? My problem is this: > > I want to use debezium to stream changes from

Logical replication slots on slaves/replicas?

2024-08-01 Thread Piotr Andreassen Blasiak
Hi, I know that currently logical replication slots are available only for primary servers. Is there any plan to add this feature to read slaves as well? My problem is this: I want to use debezium to stream changes from postgresql. But, if I stream changes from the master I can not query my

Re: Logical Replication - PG_Wall size is too big, What can I do ?

2024-07-09 Thread Laurenz Albe
an this folder without stopping Logical Replication ? The cause is logical replication (probably the initial synchronization of the tables), and the only way to clean that directory is to abort logical replication. PostgreSQL has to retain all WAL (transaction log) until copying the data is done and

Re: Logical replication with temporary tables

2024-07-02 Thread David G. Johnston
On Tuesday, July 2, 2024, Stuart Campbell wrote: > This is a question for AWS. Community PostgreSQL doesn't have any of >> these concepts, and this is all proprietary modifications to PostgreSQL by >> Amazon. > > > Maybe my question can be re-summarised as: do DDL operations on temporary > table

Re: Logical replication with temporary tables

2024-07-02 Thread Christophe Pettus
> On Jul 2, 2024, at 18:16, Stuart Campbell > wrote: > > My understanding was that under the hood, AWS uses the logical replication > features that are present in community Postgres. If that's incorrect then I'm > sorry for the off-topic post. Yes,

Re: Logical replication with temporary tables

2024-07-02 Thread Stuart Campbell
> > This is a question for AWS. Community PostgreSQL doesn't have any of > these concepts, and this is all proprietary modifications to PostgreSQL by > Amazon. My understanding was that under the hood, AWS uses the logical replication features that are present in community Po

Re: Logical replication with temporary tables

2024-07-02 Thread Christophe Pettus
> On Jul 2, 2024, at 17:47, Stuart Campbell > wrote: > My question is whether there is some workaround that will let me create > indexes on a temporary table, and also let me drop the temporary table, in a > way that doesn't end up "degrading" replication? (Presumably that means > avoiding

Logical replication with temporary tables

2024-07-02 Thread Stuart Campbell
Hello, I'm trying to use a blue/green deployment in Amazon RDS, which uses Postgres logical replication to keep blue and green environments in sync. Some parts of our app use temporary tables, and in some cases we CREATE INDEX on those tables and sometimes DROP and recreate them. The C

Re: Monitoring logical replication

2024-06-18 Thread Ron Johnson
On Tue, Jun 18, 2024 at 5:03 AM Shaheed Haque wrote: > Hi all, > > Is there an "official" pairing of LSN values on the publication and > subscription sides that should be used to track the delta between the two > systems? I ask because Google is full of different pairs being used. I > tried to id

Re: Monitoring logical replication

2024-06-18 Thread Shaheed Haque
_error()."\n"); >> exit(1); >> } >> >> $dbq = pg_query("DELETE FROM lsn2data WHERE lsn < (". >>"SELECT lsn FROM lsn2data WHERE lsn < (". >> &q

Re: Is a VACUUM or ANALYZE necessary after logical replication?

2024-06-16 Thread David G. Johnston
that table already > functional? > The whole point of “logical” replication is that the inserts/updates/deletes are reapplied on the secondary against the table and the whatever triggers, indexes, or whatnot exist on that table in the secondary behave just as if you connected to the server d

Re: Is a VACUUM or ANALYZE necessary after logical replication?

2024-06-15 Thread Achilleas Mantzios
Στις 16/6/24 02:13, ο/η Adrian Klaver έγραψε: On 6/15/24 15:55, Koen De Groote wrote: I've gone over all of https://www.postgresql.org/docs/current/logical-replication.html and the only mentions of the word "index" I could find

  1   2   3   4   5   6   7   >