Re: logical replication - still unstable after all these months

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: Erik Rijkers <er(at)xs4all(dot)nl>
Cc: 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-28 07:01:58
Message-ID: bfbf7017-13ec-0b0c-058b-ab754a8d1274@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27/05/17 20:30, Erik Rijkers wrote:

>
>
> Here is what I have:
>
> instances.sh:
> starts up 2 assert enabled sessions
>
> instances_fast.sh:
> alternative to instances.sh
> starts up 2 assert disabled 'fast' sessions
>
> testset.sh
> loop to call pgbench_derail2.sh with varying params
>
> pgbench_derail2.sh
> main test program
> can be called 'standalone'
> ./pgbench_derail2.sh $scale $clients $duration $date_str
> so for instance this should work:
> ./pgbench_derail2.sh 25 64 60 20170527_1019
> to remove publication and subscription from sessions, add a 5th
> parameter 'clean'
> ./pgbench_derail2.sh 1 1 1 1 'clean'
>
> pubsub.sh
> displays replication state. also called by pgbench_derail2.sh
> must be in path
>
> result.sh
> display results
> I keep this in a screen-session as:
> watch -n 20 './result.sh 201705'
>
>
> Peculiar to my setup also:
> server version at compile time stamped with date + commit hash
> I misuse information_schema.sql_packages at compile time to store
> patch information
> instances are in $pg_stuff_dir/pg_installations/pgsql.<project name>
>
> So you'll have to outcomment a line here and there, and adapt paths,
> ports, and things like that.
>
> It's a bit messy, I should have used perl from the beginning...
>

Considering it is all shell - pretty nice! I spent a bit of time today
getting this working in a vanilla Ubuntu 16.04 cloud server. I found a
few things that didn't work (suspect Erik has some default env variables
set for ports and databases). These were sufficient to stop logical
replication working for me at all - due to no dbname specified in the
subscription connection.

Given I had to make some changes anyway, I moved all the config into one
place (new file config.sh) - made all the programs use /bin/bash as
interpreter (/bin/sh just does not work for scripts on Ubuntu), added
ports and databases as reqd and fixed the need to mess too much with
PATH (see attached diff).

So running in cloud land now...so for no errors - will update.

regards

Mark

Attachment Content-Type Size
test.diff text/x-patch 7.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dang Minh Huong 2017-05-28 07:55:07 Re: Extra Vietnamese unaccent rules
Previous Message Michael Paquier 2017-05-28 05:15:43 Re: [JDBC] Channel binding support for SCRAM-SHA-256