Re: logical replication - still unstable after all these months

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: Erik Rijkers <er(at)xs4all(dot)nl>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: logical replication - still unstable after all these months
Date: 2017-05-26 12:17:01
Message-ID: 67450f3a-6686-deea-1b0a-22d205777c4d@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/26/2017 12:57 PM, Erik Rijkers wrote:
> The failure is that in the result state the replicated tables differ
> from the original tables.
I am also getting similar behavior

Master=
run pgbench with scaling factor =1 (./pg_bench -i -s 1 postgres )
delete rows from pgbench_history ( delete from pgbench_history)
create publication (create publication pub for table pgbench_history)

Slave=
run pgbench with scaling factor =1 (./pg_bench -i -s 1 postgres -p 5000 )
delete rows from pgbench_history ( delete from pgbench_history)
create subscription (create subscription sub connection 'dbname=postgres
host=localhost user=centos) publication pub;

create a test.sql file , having an insert statement
[centos(at)centos-cpula bin]$ cat test.sql
insert into pgbench_history values (1,1,1,1,now(),'anv');

now run pgbench with -T / -c / -j options
First time = ./pgbench -t 5 -c 90 -j 90 -f test.sql postgres

count on Master/slave are SAME .

run second time =
./pgbench -T 20 -c 90 -j 90 -f test.sql postgres

check the row count on master/standby
Master=
postgres=# select count(*) from pgbench_history ;
count
--------
536836
(1 row)

Standby =

postgres=# select count(*) from pgbench_history ;
count
---------
1090959
(1 row)

--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-05-26 12:20:45 Re: retry shm attach for windows (WAS: Re: OK, so culicidae is *still* broken)
Previous Message Konstantin Knizhnik 2017-05-26 09:23:56 Logical replication & corrupted pages recovery