Re: [HACKERS] logical replication - still unstable after all thesemonths - Mailing list pgsql-hackers

From Mark Kirkwood
Subject Re: [HACKERS] logical replication - still unstable after all thesemonths
Date
Msg-id bfbf7017-13ec-0b0c-058b-ab754a8d1274@catalyst.net.nz
Whole thread Raw
In response to Re: [HACKERS] logical replication - still unstable after all thesemonths  (Erik Rijkers <er@xs4all.nl>)
Responses Re: [HACKERS] logical replication - still unstable after all thesemonths  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
List 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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256
Next
From: Dang Minh Huong
Date:
Subject: Re: [HACKERS] Extra Vietnamese unaccent rules