Thread: got stuck in pglogical upgrade on FreeBSD

got stuck in pglogical upgrade on FreeBSD

From
Rahul Chordiya
Date:
Hi,

I'm trying to replicate data using pglogical

In my testing on local network machine and amazon linux test machine I have successfully setup the replication,

Now while trying for my DB which is running on FreeBSD I did setup everything installed pglogical and pglogical_output, the provider and master are setup properly but the replication is not working.

mydb=# SELECT subscription_name, status FROM pglogical.show_subscription_status();
    subscription_name    |    status
-------------------------+--------------
mydb_subscription | initializing
(1 row)

status is not moving to replicating since last 24 hours db size is 30MB of this database.

nothing found in log, please tell me how to get detailed log and help me solve this.

FYI: OS: FreeBSD 11.0
Master PG: 9.4
Slave PD: 11.3



--
Thanks & Regards

Rahul Chordiya
Tech-Geek && DevOps && Full Stack Developer
Mobile: +91 998 153 4313

🌳

 Please do not print this email unless absolutely necessary. Go GREEN, Go PAPERLESS 🌳



Re: got stuck in pglogical upgrade on FreeBSD

From
Adrian Klaver
Date:
On 6/21/19 6:42 AM, Rahul Chordiya wrote:
> Hi,
> 
> I'm trying to replicate data using pglogical
> https://2ndquadrant.com/en/resources/pglogical/pglogical-docs/ 
> <https://www.2ndquadrant.com/en/resources/pglogical/pglogical-docs/>
> 
> In my testing on local network machine and amazon linux test machine I 
> have successfully setup the replication,
> 
> Now while trying for my DB which is running on FreeBSD I did setup 
> everything installed pglogical and pglogical_output, the provider and 
> master are setup properly but the replication is not working.
> 
> mydb=# SELECT subscription_name, status FROM 
> pglogical.show_subscription_status();
>      subscription_name    |    status
> -------------------------+--------------
> mydb_subscription | initializing
> (1 row)
> 
> status is not moving to replicating since last 24 hours db size is 30MB 
> of this database.
> 
> nothing found in log, please tell me how to get detailed log and help me 
> solve this.
> 
> FYI: OS: FreeBSD 11.0
> Master PG: 9.4
> Slave PD: 11.3

Are both databases clusters on the same machine, different machines, 
different networks?

Can you connect in both directions manually using psql?

Have you looked in logs for both clusters?

> 
> 
> 
> -- 
> Thanks & Regards
> 
> Rahul Chordiya
> Tech-Geek && DevOps && Full Stack Developer
> 
> Mobile: +91 998 153 4313 <tel:919981534313>
> 
> *
> 🌳**
> 
> *Please do not print this email unless absolutely necessary. Go GREEN, 
> Go PAPERLESS *
> 
> **🌳*
> *
> *
> *
> *


-- 
Adrian Klaver
adrian.klaver@aklaver.com



Re: got stuck in pglogical upgrade on FreeBSD

From
Rahul Chordiya
Date:
Yes, 
Both machine in same network and I'm able to connect using psql from one machine to another.

Log only show that it is starting pglogical manager on database.

I tried to set log servirity to debug but I don't think it is set properly.


On Fri, 21 Jun, 2019, 7:45 PM Adrian Klaver, <adrian.klaver@aklaver.com> wrote:
On 6/21/19 6:42 AM, Rahul Chordiya wrote:
> Hi,
>
> I'm trying to replicate data using pglogical
> https://2ndquadrant.com/en/resources/pglogical/pglogical-docs/
> <https://www.2ndquadrant.com/en/resources/pglogical/pglogical-docs/>
>
> In my testing on local network machine and amazon linux test machine I
> have successfully setup the replication,
>
> Now while trying for my DB which is running on FreeBSD I did setup
> everything installed pglogical and pglogical_output, the provider and
> master are setup properly but the replication is not working.
>
> mydb=# SELECT subscription_name, status FROM
> pglogical.show_subscription_status();
>      subscription_name    |    status
> -------------------------+--------------
> mydb_subscription | initializing
> (1 row)
>
> status is not moving to replicating since last 24 hours db size is 30MB
> of this database.
>
> nothing found in log, please tell me how to get detailed log and help me
> solve this.
>
> FYI: OS: FreeBSD 11.0
> Master PG: 9.4
> Slave PD: 11.3

Are both databases clusters on the same machine, different machines,
different networks?

Can you connect in both directions manually using psql?

Have you looked in logs for both clusters?

>
>
>
> --
> Thanks & Regards
>
> Rahul Chordiya
> Tech-Geek && DevOps && Full Stack Developer
>
> Mobile: +91 998 153 4313 <tel:919981534313>
>
> *
> 🌳**
>
> *Please do not print this email unless absolutely necessary. Go GREEN,
> Go PAPERLESS *
>
> **🌳*
> *
> *
> *
> *


--
Adrian Klaver
adrian.klaver@aklaver.com

Re: got stuck in pglogical upgrade on FreeBSD

From
Adrian Klaver
Date:
On 6/21/19 8:45 AM, Rahul Chordiya wrote:
> Yes,
> Both machine in same network and I'm able to connect using psql from one 
> machine to another.
> 
> Log only show that it is starting pglogical manager on database.

On both clusters right?

> 
> I tried to set log servirity to debug but I don't think it is set properly.

Did you issue a reload to the server?

> 
> 
> On Fri, 21 Jun, 2019, 7:45 PM Adrian Klaver, <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 6/21/19 6:42 AM, Rahul Chordiya wrote:
>      > Hi,
>      >
>      > I'm trying to replicate data using pglogical
>      > https://2ndquadrant.com/en/resources/pglogical/pglogical-docs/
>      > <https://www.2ndquadrant.com/en/resources/pglogical/pglogical-docs/>
>      >
>      > In my testing on local network machine and amazon linux test
>     machine I
>      > have successfully setup the replication,
>      >
>      > Now while trying for my DB which is running on FreeBSD I did setup
>      > everything installed pglogical and pglogical_output, the provider
>     and
>      > master are setup properly but the replication is not working.
>      >
>      > mydb=# SELECT subscription_name, status FROM
>      > pglogical.show_subscription_status();
>      >      subscription_name    |    status
>      > -------------------------+--------------
>      > mydb_subscription | initializing
>      > (1 row)
>      >
>      > status is not moving to replicating since last 24 hours db size
>     is 30MB
>      > of this database.
>      >
>      > nothing found in log, please tell me how to get detailed log and
>     help me
>      > solve this.
>      >
>      > FYI: OS: FreeBSD 11.0
>      > Master PG: 9.4
>      > Slave PD: 11.3
> 
>     Are both databases clusters on the same machine, different machines,
>     different networks?
> 
>     Can you connect in both directions manually using psql?
> 
>     Have you looked in logs for both clusters?
> 
>      >
>      >
>      >
>      > --
>      > Thanks & Regards
>      >
>      > Rahul Chordiya
>      > Tech-Geek && DevOps && Full Stack Developer
>      >
>      > Mobile: +91 998 153 4313 <tel:919981534313>
>      >
>      > *
>      > 🌳**
>      >
>      > *Please do not print this email unless absolutely necessary. Go
>     GREEN,
>      > Go PAPERLESS *
>      >
>      > **🌳*
>      > *
>      > *
>      > *
>      > *
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



Re: got stuck in pglogical upgrade on FreeBSD

From
Rahul Chordiya
Date:
Yes and yes. 
Also tried to completely clear slave data directory and setup fresh subscribe & subscription.

On Fri, 21 Jun, 2019, 9:35 PM Adrian Klaver, <adrian.klaver@aklaver.com> wrote:
On 6/21/19 8:45 AM, Rahul Chordiya wrote:
> Yes,
> Both machine in same network and I'm able to connect using psql from one
> machine to another.
>
> Log only show that it is starting pglogical manager on database.

On both clusters right?

>
> I tried to set log servirity to debug but I don't think it is set properly.

Did you issue a reload to the server?

>
>
> On Fri, 21 Jun, 2019, 7:45 PM Adrian Klaver, <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     On 6/21/19 6:42 AM, Rahul Chordiya wrote:
>      > Hi,
>      >
>      > I'm trying to replicate data using pglogical
>      > https://2ndquadrant.com/en/resources/pglogical/pglogical-docs/
>      > <https://www.2ndquadrant.com/en/resources/pglogical/pglogical-docs/>
>      >
>      > In my testing on local network machine and amazon linux test
>     machine I
>      > have successfully setup the replication,
>      >
>      > Now while trying for my DB which is running on FreeBSD I did setup
>      > everything installed pglogical and pglogical_output, the provider
>     and
>      > master are setup properly but the replication is not working.
>      >
>      > mydb=# SELECT subscription_name, status FROM
>      > pglogical.show_subscription_status();
>      >      subscription_name    |    status
>      > -------------------------+--------------
>      > mydb_subscription | initializing
>      > (1 row)
>      >
>      > status is not moving to replicating since last 24 hours db size
>     is 30MB
>      > of this database.
>      >
>      > nothing found in log, please tell me how to get detailed log and
>     help me
>      > solve this.
>      >
>      > FYI: OS: FreeBSD 11.0
>      > Master PG: 9.4
>      > Slave PD: 11.3
>
>     Are both databases clusters on the same machine, different machines,
>     different networks?
>
>     Can you connect in both directions manually using psql?
>
>     Have you looked in logs for both clusters?
>
>      >
>      >
>      >
>      > --
>      > Thanks & Regards
>      >
>      > Rahul Chordiya
>      > Tech-Geek && DevOps && Full Stack Developer
>      >
>      > Mobile: +91 998 153 4313 <tel:919981534313>
>      >
>      > *
>      > 🌳**
>      >
>      > *Please do not print this email unless absolutely necessary. Go
>     GREEN,
>      > Go PAPERLESS *
>      >
>      > **🌳*
>      > *
>      > *
>      > *
>      > *
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>


--
Adrian Klaver
adrian.klaver@aklaver.com

Re: got stuck in pglogical upgrade on FreeBSD

From
Adrian Klaver
Date:
On 6/21/19 9:07 AM, Rahul Chordiya wrote:
> Yes and yes.
> Also tried to completely clear slave data directory and setup fresh 
> subscribe & subscription.
> 

I assume you compiled it from source. Where there any errors in the make 
and/or install stops?

Does the system log show anything relevant?



-- 
Adrian Klaver
adrian.klaver@aklaver.com



Re: got stuck in pglogical upgrade on FreeBSD

From
Rahul Chordiya
Date:
Yes, I did install via source using gmake as make command was not working.
I also need to include some (.h) header file as gmake throwing some dependency error.

On Fri, 21 Jun, 2019, 9:41 PM Adrian Klaver, <adrian.klaver@aklaver.com> wrote:
On 6/21/19 9:07 AM, Rahul Chordiya wrote:
> Yes and yes.
> Also tried to completely clear slave data directory and setup fresh
> subscribe & subscription.
>

I assume you compiled it from source. Where there any errors in the make
and/or install stops?

Does the system log show anything relevant?



--
Adrian Klaver
adrian.klaver@aklaver.com

Re: got stuck in pglogical upgrade on FreeBSD

From
Adrian Klaver
Date:
On 6/21/19 9:25 AM, Rahul Chordiya wrote:
> Yes, I did install via source using gmake as make command was not working.
> I also need to include some (.h) header file as gmake throwing some 
> dependency error.

The errors and the header files are?

> 
> On Fri, 21 Jun, 2019, 9:41 PM Adrian Klaver, <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 6/21/19 9:07 AM, Rahul Chordiya wrote:
>      > Yes and yes.
>      > Also tried to completely clear slave data directory and setup fresh
>      > subscribe & subscription.
>      >
> 
>     I assume you compiled it from source. Where there any errors in the
>     make
>     and/or install stops?
> 
>     Does the system log show anything relevant?
> 
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



Re: got stuck in pglogical upgrade on FreeBSD

From
Rahul Chordiya
Date:
Hi,
Sorry for delayed response.

The first error is:

pglogical_fe.c:54:7: error: implicit declaration of function 'WIFEXITED' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (WIFEXITED(ret))
^
pglogical_fe.c:55:124: error: implicit declaration of function 'WEXITSTATUS' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
 ...fprintf(stderr, "find_other_exec_version: couldn't read output of \"%s\": %d (exited with return code %d)\n", cmd, ret, WEXITSTATUS(ret));
^
pglogical_fe.c:56:12: error: implicit declaration of function 'WIFSIGNALED' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
else if (WIFSIGNALED(ret))
^
pglogical_fe.c:57:119: error: implicit declaration of function 'WTERMSIG' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
fprintf(stderr, "find_other_exec_version: couldn't read output of \"%s\": %d (exited with signal %d)\n", cmd, ret, WTERMSIG(ret));
  ^
4 errors generated.

Header Added are:   

pglogical_fe.c ==>  

#include <sys/types.h>
#include <sys/wait.h>


And Second error is:

pglogical_apply_spi.c:588:8: error: implicit declaration of function 'htonl' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
        buf = htonl((uint32) val);
              ^
pglogical_apply_spi.c:600:8: error: implicit declaration of function 'htons' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
        buf = htons((uint16) val);
              ^
2 errors generated.

Header Added is: 
pglogical_apply_spi.c  =>> #include <arpa/inet.h>


After adding these .h file we are able to successfully gmake and install.



On Fri, Jun 21, 2019 at 9:57 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 6/21/19 9:25 AM, Rahul Chordiya wrote:
> Yes, I did install via source using gmake as make command was not working.
> I also need to include some (.h) header file as gmake throwing some
> dependency error.

The errors and the header files are?

>
> On Fri, 21 Jun, 2019, 9:41 PM Adrian Klaver, <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     On 6/21/19 9:07 AM, Rahul Chordiya wrote:
>      > Yes and yes.
>      > Also tried to completely clear slave data directory and setup fresh
>      > subscribe & subscription.
>      >
>
>     I assume you compiled it from source. Where there any errors in the
>     make
>     and/or install stops?
>
>     Does the system log show anything relevant?
>
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


--
Thanks & Regards

Rahul Chordiya
Tech-Geek && DevOps && Full Stack Developer
Mobile: +91 998 153 4313

🌳

 Please do not print this email unless absolutely necessary. Go GREEN, Go PAPERLESS 🌳



Re: got stuck in pglogical upgrade on FreeBSD

From
Achilleas Mantzios
Date:
On 24/6/19 12:20 μ.μ., Rahul Chordiya wrote:
Hi,
Sorry for delayed response.

Hello, did you use gcc or clang/llvm?
I would suggest trying with gcc.






-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt