Streaming replication issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Streaming replication issue

mallikarjun t

Dear All,

 

Iam doing streaming replication between PostgreSQL community version to EDB Advanced server. It is possible or not? Same versions for example PostgreSQL community version is 9.6.2 and EDB Advanced Server PostgreSQL compatability version is 9.6.2.7.  PostgreSQL community version taken as Master and EDB Advanced Server taken as Slave server.

 

I am already configured, streaming is also happens, but Slave server (EDB Advanced Server) I am trying to connect to ./psql I will get below error message.

 

ERROR: psql.bin: FATAL: role "postgres" is not permitted to log in

 

Iam try to access port number also I will get below error message.

 

./psql -p 5432 

psql.bin: could not connect to server: No such file or directory

               Is the server running locally and accepting connections on unix domain socket. 

              "/tmp/.s.PGSQL.5432"?

 

I checked the /tmp directory .s.PGSQL.5444  port number is running, and postmaster.pid also contains 5444 port number. But I am stop this database cluster and take the basebackup of PostgreSQL Community version and start the cluster. but postmaster.pid file contains port number is 5444. 

Why this  take 5444 port not in 5432 port ?

 

Please clarify the issuse?

 

Regards,

Malli.

Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

Luca Ferrari-2
On Thu, Sep 5, 2019 at 11:39 AM mallikarjun t <[hidden email]> wrote:
> ERROR: psql.bin: FATAL: role "postgres" is not permitted to log in

I don't know about EDB, but sounds like role postgres has not the
login privilege, that is they use another administrator?

> ./psql -p 5432
>
> psql.bin: could not connect to server: No such file or directory
>
>                Is the server running locally and accepting connections on unix domain socket.
>
>               "/tmp/.s.PGSQL.5432"?

Without the -h localhost option psql tries to connect to unix socket,
not TCP/IP, and it could be your server is not listening on unix
socket.

Luca


Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

mallikarjun t
I tried different ways it is not connected, but streaming replication is happening. IAM happily connected to master server, not the slave server, what reason I don't know? I think postgres user don't have login permission on Edb advanced server , by default Enterprise db user is there. That's why it's not connected I am thinking. Any one know about this one please clarify the issue.

Regards,
Malli.

On Thu, Sep 5, 2019, 3:26 PM Luca Ferrari <[hidden email]> wrote:
On Thu, Sep 5, 2019 at 11:39 AM mallikarjun t <[hidden email]> wrote:
> ERROR: psql.bin: FATAL: role "postgres" is not permitted to log in

I don't know about EDB, but sounds like role postgres has not the
login privilege, that is they use another administrator?

> ./psql -p 5432
>
> psql.bin: could not connect to server: No such file or directory
>
>                Is the server running locally and accepting connections on unix domain socket.
>
>               "/tmp/.s.PGSQL.5432"?

Without the -h localhost option psql tries to connect to unix socket,
not TCP/IP, and it could be your server is not listening on unix
socket.

Luca
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

soumitra
Create one postgres os user in slave similar in master and then try once 

Sent from my iPhone

On 05-Sep-2019, at 3:33 PM, mallikarjun t <[hidden email]> wrote:

I tried different ways it is not connected, but streaming replication is happening. IAM happily connected to master server, not the slave server, what reason I don't know? I think postgres user don't have login permission on Edb advanced server , by default Enterprise db user is there. That's why it's not connected I am thinking. Any one know about this one please clarify the issue.

Regards,
Malli.

On Thu, Sep 5, 2019, 3:26 PM Luca Ferrari <[hidden email]> wrote:
On Thu, Sep 5, 2019 at 11:39 AM mallikarjun t <[hidden email]> wrote:
> ERROR: psql.bin: FATAL: role "postgres" is not permitted to log in

I don't know about EDB, but sounds like role postgres has not the
login privilege, that is they use another administrator?

> ./psql -p 5432
>
> psql.bin: could not connect to server: No such file or directory
>
>                Is the server running locally and accepting connections on unix domain socket.
>
>               "/tmp/.s.PGSQL.5432"?

Without the -h localhost option psql tries to connect to unix socket,
not TCP/IP, and it could be your server is not listening on unix
socket.

Luca
Soumitra Bhandary Postgres Database Administrator
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

mallikarjun t
This is for testing purposes I am checking, we can do streaming replication between same server version is possible, but EDB Advanced servers is possible or not? I have doubt, but it is possible but these are the error messages are coming to connected. How to resolve this issue?

Regards,
Malli.

On Thu, Sep 5, 2019 at 4:04 PM soumitra bhandary <[hidden email]> wrote:
Create one postgres os user in slave similar in master and then try once 

Sent from my iPhone

On 05-Sep-2019, at 3:33 PM, mallikarjun t <[hidden email]> wrote:

I tried different ways it is not connected, but streaming replication is happening. IAM happily connected to master server, not the slave server, what reason I don't know? I think postgres user don't have login permission on Edb advanced server , by default Enterprise db user is there. That's why it's not connected I am thinking. Any one know about this one please clarify the issue.

Regards,
Malli.

On Thu, Sep 5, 2019, 3:26 PM Luca Ferrari <[hidden email]> wrote:
On Thu, Sep 5, 2019 at 11:39 AM mallikarjun t <[hidden email]> wrote:
> ERROR: psql.bin: FATAL: role "postgres" is not permitted to log in

I don't know about EDB, but sounds like role postgres has not the
login privilege, that is they use another administrator?

> ./psql -p 5432
>
> psql.bin: could not connect to server: No such file or directory
>
>                Is the server running locally and accepting connections on unix domain socket.
>
>               "/tmp/.s.PGSQL.5432"?

Without the -h localhost option psql tries to connect to unix socket,
not TCP/IP, and it could be your server is not listening on unix
socket.

Luca
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

Luca Ferrari-2
On Thu, Sep 5, 2019 at 12:45 PM mallikarjun t <[hidden email]> wrote:
>
> This is for testing purposes I am checking, we can do streaming replication between same server version is possible, but EDB Advanced servers is possible or not? I have doubt, but it is possible but these are the error messages are coming to connected. How to resolve this issue?

I think it is possible, but you better ask someone at EDB for details.
Just looking at the configuration of the EBD instance you should guess
on which port/sockets it is listening for incoming connections.
Also, when you installed the EDB instance, did you get any advice
about administrator user (may be you changed from postgres to
somethink else)?
Please take into account this is not a replication issue at all, it is
a more generic low-level problem.

Luca


Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

mallikarjun t
Dear All,

We already knows by default installing the data directory, Postgres is the Super user.
But EDB Advanced Server two flavours are there 

1) Oracle compatibility type  (By default port number is 5444 and Enterprisedb is Superuser)

2)PostgreSQL compatibility type (By default port number is 5432 and Postgresql is Superuser).

I tried these two compatibilities I will get the same issue.

Regards,
Malli.

On Thu, Sep 5, 2019 at 5:05 PM Luca Ferrari <[hidden email]> wrote:
On Thu, Sep 5, 2019 at 12:45 PM mallikarjun t <[hidden email]> wrote:
>
> This is for testing purposes I am checking, we can do streaming replication between same server version is possible, but EDB Advanced servers is possible or not? I have doubt, but it is possible but these are the error messages are coming to connected. How to resolve this issue?

I think it is possible, but you better ask someone at EDB for details.
Just looking at the configuration of the EBD instance you should guess
on which port/sockets it is listening for incoming connections.
Also, when you installed the EDB instance, did you get any advice
about administrator user (may be you changed from postgres to
somethink else)?
Please take into account this is not a replication issue at all, it is
a more generic low-level problem.

Luca
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

Luca Ferrari-2
On Thu, Sep 5, 2019 at 1:54 PM mallikarjun t <[hidden email]> wrote:
> I tried these two compatibilities I will get the same issue.

According to the installation guide available at
<https://www.enterprisedb.com/edb-docs/static/docs/epas/11/EDB_Postgres_Advanced_Server_Installation_Guide_Linux_v11.pdf>
the database to connect to is 'edb' with user 'enterprisedb'.
So does
psql -U enterprisedb edb
allow you to connect to your cluster?

Luca


Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

mallikarjun t
Dear  All,

Before streaming replication I will access EDB Advanced  Server below command by using psql

./psql  -p 5444 -d edb -U enterprisedb.

I am happily working.

When I am starting replication process stop the server and take the basebackup of PostgreSQL Community version and start the new cluster.

for example

/opt/edb/as9.6/bin/pg_basebackup  -D  /home/postgres/data_96  -h <master ip address>  -p 5432  -X stream -R

I am  taking basebackup then  after recovery.conf file I include trigger_file ='/tmp/primary_down',

If my master is down unexpectedly, I will promote my Slave to Master.

the after I start the server by using following commnad

/opt/edb/as9.6/bin/pg_ctl    -D    /home/postgres/data_96  start

server started and wal receiver is working properly, but  real problem is happens here only,

I want connect to sever by using following command  /opt/edb/as9.6/bin/psql 


role "postgres" not a log in permission error message  I am getting , I am try to put port number along with that 
error: could not connect to the server, locally running this port number 5432.

this is the error message I am getting.


Regards,
Malli.

On Thu, Sep 5, 2019 at 5:58 PM Luca Ferrari <[hidden email]> wrote:
On Thu, Sep 5, 2019 at 1:54 PM mallikarjun t <[hidden email]> wrote:
> I tried these two compatibilities I will get the same issue.

According to the installation guide available at
<https://www.enterprisedb.com/edb-docs/static/docs/epas/11/EDB_Postgres_Advanced_Server_Installation_Guide_Linux_v11.pdf>
the database to connect to is 'edb' with user 'enterprisedb'.
So does
psql -U enterprisedb edb
allow you to connect to your cluster?

Luca
Reply | Threaded
Open this post in threaded view
|

Re: [MASSMAIL]Re: Streaming replication issue

gilberto.castillo
Hello,

Please, you could check postgresql.log
or What is this : ./psql  -p 5444 -d edb -U enterprisedb.?

El 2019-09-05 08:45, mallikarjun t escribió:

> Dear  All,
>
> Before streaming replication I will access EDB Advanced  Server below
> command by using psql
>
> ./psql  -p 5444 -d edb -U enterprisedb.
>
> I am happily working.
>
> When I am starting replication process stop the server and take the
> basebackup of PostgreSQL Community version and start the new cluster.
>
> for example
>
> /opt/edb/as9.6/bin/pg_basebackup  -D  /home/postgres/data_96  -h
> <master ip address>  -p 5432  -X stream -R
>
> I am  taking basebackup then  after recovery.conf file I include
> trigger_file ='/tmp/primary_down',
>
> If my master is down unexpectedly, I will promote my Slave to Master.
>
> the after I start the server by using following commnad
>
> /opt/edb/as9.6/bin/pg_ctl    -D    /home/postgres/data_96  start
>
> server started and wal receiver is working properly, but  real problem
> is happens here only,
>
> I want connect to sever by using following command
> /opt/edb/as9.6/bin/psql
>
> role "postgres" not a log in permission error message  I am getting ,
> I am try to put port number along with that
> error: could not connect to the server, locally running this port
> number 5432.
>
> this is the error message I am getting.
>
> Regards,
> Malli.
>
> On Thu, Sep 5, 2019 at 5:58 PM Luca Ferrari <[hidden email]>
> wrote:
>
>> On Thu, Sep 5, 2019 at 1:54 PM mallikarjun t <[hidden email]>
>> wrote:
>>> I tried these two compatibilities I will get the same issue.
>>
>> According to the installation guide available at
>>
> <https://www.enterprisedb.com/edb-docs/static/docs/epas/11/EDB_Postgres_Advanced_Server_Installation_Guide_Linux_v11.pdf>
>> the database to connect to is 'edb' with user 'enterprisedb'.
>> So does
>> psql -U enterprisedb edb
>> allow you to connect to your cluster?
>>
>> Luca


Reply | Threaded
Open this post in threaded view
|

Re: [MASSMAIL]Re: Streaming replication issue

mallikarjun t
Dear Gilberto,

./psql  -p 5444 -d edb -U enterprisedb this one is accessing the EDB Advanced Server by using this command.  
Iam already checked the logs role "postgres" is not a login permission error message is there.

Regards,
Malli. 

On Thu, Sep 5, 2019 at 6:35 PM <[hidden email]> wrote:
Hello,

Please, you could check postgresql.log
or What is this : ./psql  -p 5444 -d edb -U enterprisedb.?

El 2019-09-05 08:45, mallikarjun t escribió:
> Dear  All,
>
> Before streaming replication I will access EDB Advanced  Server below
> command by using psql
>
> ./psql  -p 5444 -d edb -U enterprisedb.
>
> I am happily working.
>
> When I am starting replication process stop the server and take the
> basebackup of PostgreSQL Community version and start the new cluster.
>
> for example
>
> /opt/edb/as9.6/bin/pg_basebackup  -D  /home/postgres/data_96  -h
> <master ip address>  -p 5432  -X stream -R
>
> I am  taking basebackup then  after recovery.conf file I include
> trigger_file ='/tmp/primary_down',
>
> If my master is down unexpectedly, I will promote my Slave to Master.
>
> the after I start the server by using following commnad
>
> /opt/edb/as9.6/bin/pg_ctl    -D    /home/postgres/data_96  start
>
> server started and wal receiver is working properly, but  real problem
> is happens here only,
>
> I want connect to sever by using following command
> /opt/edb/as9.6/bin/psql
>
> role "postgres" not a log in permission error message  I am getting ,
> I am try to put port number along with that
> error: could not connect to the server, locally running this port
> number 5432.
>
> this is the error message I am getting.
>
> Regards,
> Malli.
>
> On Thu, Sep 5, 2019 at 5:58 PM Luca Ferrari <[hidden email]>
> wrote:
>
>> On Thu, Sep 5, 2019 at 1:54 PM mallikarjun t <[hidden email]>
>> wrote:
>>> I tried these two compatibilities I will get the same issue.
>>
>> According to the installation guide available at
>>
> <https://www.enterprisedb.com/edb-docs/static/docs/epas/11/EDB_Postgres_Advanced_Server_Installation_Guide_Linux_v11.pdf>
>> the database to connect to is 'edb' with user 'enterprisedb'.
>> So does
>> psql -U enterprisedb edb
>> allow you to connect to your cluster?
>>
>> Luca
Reply | Threaded
Open this post in threaded view
|

Re: [MASSMAIL]Re: Streaming replication issue

gilberto.castillo
El 2019-09-05 09:39, mallikarjun t escribió:
> Dear Gilberto,
>
> ./psql  -p 5444 -d edb -U enterprisedb this one is accessing the EDB
> Advanced Server by using this command.
> Iam already checked the logs role "postgres" is not a login permission
> error message is there.

Do you check it?
/opt/edb/as9.6/bin/pg_ctl -p 5444   -D    /home/postgres/data_96  start

>
> Regards,
> Malli.
>
> On Thu, Sep 5, 2019 at 6:35 PM <[hidden email]> wrote:
>
>> Hello,
>>
>> Please, you could check postgresql.log
>> or What is this : ./psql  -p 5444 -d edb -U enterprisedb.?
>>
>> El 2019-09-05 08:45, mallikarjun t escribió:
>>> Dear  All,
>>>
>>> Before streaming replication I will access EDB Advanced  Server
>> below
>>> command by using psql
>>>
>>> ./psql  -p 5444 -d edb -U enterprisedb.
>>>
>>> I am happily working.
>>>
>>> When I am starting replication process stop the server and take
>> the
>>> basebackup of PostgreSQL Community version and start the new
>> cluster.
>>>
>>> for example
>>>
>>> /opt/edb/as9.6/bin/pg_basebackup  -D  /home/postgres/data_96  -h
>>> <master ip address>  -p 5432  -X stream -R
>>>
>>> I am  taking basebackup then  after recovery.conf file I include
>>> trigger_file ='/tmp/primary_down',
>>>
>>> If my master is down unexpectedly, I will promote my Slave to
>> Master.
>>>
>>> the after I start the server by using following commnad
>>>
>>> /opt/edb/as9.6/bin/pg_ctl    -D    /home/postgres/data_96  start
>>>
>>> server started and wal receiver is working properly, but  real
>> problem
>>> is happens here only,
>>>
>>> I want connect to sever by using following command
>>> /opt/edb/as9.6/bin/psql
>>>
>>> role "postgres" not a log in permission error message  I am
>> getting ,
>>> I am try to put port number along with that
>>> error: could not connect to the server, locally running this port
>>> number 5432.
>>>
>>> this is the error message I am getting.
>>>
>>> Regards,
>>> Malli.
>>>
>>> On Thu, Sep 5, 2019 at 5:58 PM Luca Ferrari <[hidden email]>
>>> wrote:
>>>
>>>> On Thu, Sep 5, 2019 at 1:54 PM mallikarjun t
>> <[hidden email]>
>>>> wrote:
>>>>> I tried these two compatibilities I will get the same issue.
>>>>
>>>> According to the installation guide available at
>>>>
>>>
>>
> <https://www.enterprisedb.com/edb-docs/static/docs/epas/11/EDB_Postgres_Advanced_Server_Installation_Guide_Linux_v11.pdf>
>>>> the database to connect to is 'edb' with user 'enterprisedb'.
>>>> So does
>>>> psql -U enterprisedb edb
>>>> allow you to connect to your cluster?
>>>>
>>>> Luca


Reply | Threaded
Open this post in threaded view
|

Re: [MASSMAIL]Re: Streaming replication issue

mallikarjun t
It is not possible to start I am starting this server by using following this command

/opt/edb/as9.6/bin/pg_ctl  -D   /home/postgres/data_96  start   by default port is 5432 .

server is started.




On Thu, Sep 5, 2019 at 7:17 PM <[hidden email]> wrote:
El 2019-09-05 09:39, mallikarjun t escribió:
> Dear Gilberto,
>
> ./psql  -p 5444 -d edb -U enterprisedb this one is accessing the EDB
> Advanced Server by using this command.
> Iam already checked the logs role "postgres" is not a login permission
> error message is there.

Do you check it?
/opt/edb/as9.6/bin/pg_ctl -p 5444   -D    /home/postgres/data_96  start

>
> Regards,
> Malli.
>
> On Thu, Sep 5, 2019 at 6:35 PM <[hidden email]> wrote:
>
>> Hello,
>>
>> Please, you could check postgresql.log
>> or What is this : ./psql  -p 5444 -d edb -U enterprisedb.?
>>
>> El 2019-09-05 08:45, mallikarjun t escribió:
>>> Dear  All,
>>>
>>> Before streaming replication I will access EDB Advanced  Server
>> below
>>> command by using psql
>>>
>>> ./psql  -p 5444 -d edb -U enterprisedb.
>>>
>>> I am happily working.
>>>
>>> When I am starting replication process stop the server and take
>> the
>>> basebackup of PostgreSQL Community version and start the new
>> cluster.
>>>
>>> for example
>>>
>>> /opt/edb/as9.6/bin/pg_basebackup  -D  /home/postgres/data_96  -h
>>> <master ip address>  -p 5432  -X stream -R
>>>
>>> I am  taking basebackup then  after recovery.conf file I include
>>> trigger_file ='/tmp/primary_down',
>>>
>>> If my master is down unexpectedly, I will promote my Slave to
>> Master.
>>>
>>> the after I start the server by using following commnad
>>>
>>> /opt/edb/as9.6/bin/pg_ctl    -D    /home/postgres/data_96  start
>>>
>>> server started and wal receiver is working properly, but  real
>> problem
>>> is happens here only,
>>>
>>> I want connect to sever by using following command
>>> /opt/edb/as9.6/bin/psql
>>>
>>> role "postgres" not a log in permission error message  I am
>> getting ,
>>> I am try to put port number along with that
>>> error: could not connect to the server, locally running this port
>>> number 5432.
>>>
>>> this is the error message I am getting.
>>>
>>> Regards,
>>> Malli.
>>>
>>> On Thu, Sep 5, 2019 at 5:58 PM Luca Ferrari <[hidden email]>
>>> wrote:
>>>
>>>> On Thu, Sep 5, 2019 at 1:54 PM mallikarjun t
>> <[hidden email]>
>>>> wrote:
>>>>> I tried these two compatibilities I will get the same issue.
>>>>
>>>> According to the installation guide available at
>>>>
>>>
>>
> <https://www.enterprisedb.com/edb-docs/static/docs/epas/11/EDB_Postgres_Advanced_Server_Installation_Guide_Linux_v11.pdf>
>>>> the database to connect to is 'edb' with user 'enterprisedb'.
>>>> So does
>>>> psql -U enterprisedb edb
>>>> allow you to connect to your cluster?
>>>>
>>>> Luca
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

mallikarjun t
In reply to this post by mallikarjun t
Dear Team,

Please find the below commands,

[postgres@localhost bin]$ ps -ef | grep sender
postgres   3577   3521  0 19:33 ?        00:00:00 postgres: wal sender process postgres 192.168.211.149(59260) streaming 0/12D5AAA8
postgres   3622   3460  0 19:37 pts/1    00:00:00 grep --color=auto sender
[postgres@localhost bin]$
[postgres@localhost bin]$




[postgres@localhost pg_log]$ ps -ef | grep receiver
postgres   3600   3594  0 19:33 ?        00:00:01 postgres: wal receiver process   streaming 0/12D5AAA8
postgres   3660   3512  0 19:39 pts/0    00:00:00 grep --color=auto receiver
[postgres@localhost pg_log]$




In slave server process

[postgres@localhost pg_log]$ ps -ef | grep postgres
root       3511   3476  0 19:31 pts/0    00:00:00 su - postgres
postgres   3512   3511  0 19:31 pts/0    00:00:00 -bash
postgres   3594      1  0 19:33 pts/0    00:00:00 /opt/edb/as9.6/bin/edb-postgres -D /home/postgres/data_96
postgres   3595   3594  0 19:33 ?        00:00:00 postgres: logger process
postgres   3596   3594  0 19:33 ?        00:00:01 postgres: startup process   recovering 000000010000000000000012
postgres   3597   3594  0 19:33 ?        00:00:00 postgres: checkpointer process
postgres   3598   3594  0 19:33 ?        00:00:00 postgres: writer process
postgres   3599   3594  0 19:33 ?        00:00:00 postgres: stats collector process
postgres   3600   3594  0 19:33 ?        00:00:01 postgres: wal receiver process   streaming 0/12D5AAA8
postgres   3669   3512  0 19:39 pts/0    00:00:00 ps -ef
postgres   3670   3512  0 19:39 pts/0    00:00:00 grep --color=auto postgres
[postgres@localhost pg_log]$


Regards,
Malli.

On Thu, Sep 5, 2019 at 3:04 PM mallikarjun t <[hidden email]> wrote:

Dear All,

 

Iam doing streaming replication between PostgreSQL community version to EDB Advanced server. It is possible or not? Same versions for example PostgreSQL community version is 9.6.2 and EDB Advanced Server PostgreSQL compatability version is 9.6.2.7.  PostgreSQL community version taken as Master and EDB Advanced Server taken as Slave server.

 

I am already configured, streaming is also happens, but Slave server (EDB Advanced Server) I am trying to connect to ./psql I will get below error message.

 

ERROR: psql.bin: FATAL: role "postgres" is not permitted to log in

 

Iam try to access port number also I will get below error message.

 

./psql -p 5432 

psql.bin: could not connect to server: No such file or directory

               Is the server running locally and accepting connections on unix domain socket. 

              "/tmp/.s.PGSQL.5432"?

 

I checked the /tmp directory .s.PGSQL.5444  port number is running, and postmaster.pid also contains 5444 port number. But I am stop this database cluster and take the basebackup of PostgreSQL Community version and start the cluster. but postmaster.pid file contains port number is 5444. 

Why this  take 5444 port not in 5432 port ?

 

Please clarify the issuse?

 

Regards,

Malli.

Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

Luca Ferrari-2
In reply to this post by mallikarjun t
On Thu, Sep 5, 2019 at 2:45 PM mallikarjun t <[hidden email]> wrote:
> I want connect to sever by using following command  /opt/edb/as9.6/bin/psql
>
>
> role "postgres" not a log in permission error message  I am getting , I am try to put port number along with that
> error: could not connect to the server, locally running this port number 5432.
>

I'm sorry but it is quite hard to understand what you are doing.
If I'm getting right, from you description, you are replicating your
server and trying to connect as 'postgres' to such clone, but how can
the clone has a user that did not existed (or did not have
permissions) on the original server too?
I thinm you should connect to the "new master" with the same "old
master" credentials.

Luca


Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

mallikarjun t
No I am connected salve server details to connect

On Thu, Sep 5, 2019, 8:52 PM Luca Ferrari <[hidden email]> wrote:
On Thu, Sep 5, 2019 at 2:45 PM mallikarjun t <[hidden email]> wrote:
> I want connect to sever by using following command  /opt/edb/as9.6/bin/psql
>
>
> role "postgres" not a log in permission error message  I am getting , I am try to put port number along with that
> error: could not connect to the server, locally running this port number 5432.
>

I'm sorry but it is quite hard to understand what you are doing.
If I'm getting right, from you description, you are replicating your
server and trying to connect as 'postgres' to such clone, but how can
the clone has a user that did not existed (or did not have
permissions) on the original server too?
I thinm you should connect to the "new master" with the same "old
master" credentials.

Luca
Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

jwiencek3
H

When you set up streaming replication your read-only replica should be created using pg_basebackup.

for example;

Run this from the streamed/slave server.   Set variable $PGDATA.  Make sure directory structure exits and is empty( no file in $PGDATA on slave server)

pg_basebackup --pgdata=$PGDATA --label=standby --host 10.64.98.199--usernamerepuser --wal-method=stream --write-recovery-conf.


Your PGDATA direetory on the streamed/salve server needs to be empty.   The basebackup will copy ALL files from the master to the slave.   This would include PostgreSQL.conf , pg_hba.conf and all associated files for the databases.

Therefore the streaming/slave server will be EXACTLY the same as the master.   Same users, same port, same data.


Reagards

John Wiencek



On Sep 5, 2019, at 10:27 AM, mallikarjun t <[hidden email]> wrote:

No I am connected salve server details to connect

On Thu, Sep 5, 2019, 8:52 PM Luca Ferrari <[hidden email]> wrote:
On Thu, Sep 5, 2019 at 2:45 PM mallikarjun t <[hidden email]> wrote:
> I want connect to sever by using following command  /opt/edb/as9.6/bin/psql
>
>
> role "postgres" not a log in permission error message  I am getting , I am try to put port number along with that
> error: could not connect to the server, locally running this port number 5432.
>

I'm sorry but it is quite hard to understand what you are doing.
If I'm getting right, from you description, you are replicating your
server and trying to connect as 'postgres' to such clone, but how can
the clone has a user that did not existed (or did not have
permissions) on the original server too?
I thinm you should connect to the "new master" with the same "old
master" credentials.

Luca

Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

Juan José Santamaría Flecha
On Thu, Sep 5, 2019 at 5:54 PM John Wiencek <[hidden email]> wrote:

>
> H
>
> When you set up streaming replication your read-only replica should be created using pg_basebackup.
>
> for example;
>
> Run this from the streamed/slave server.   Set variable $PGDATA.  Make sure directory structure exits and is empty( no file in $PGDATA on slave server)
>
> pg_basebackup --pgdata=$PGDATA --label=standby --host 10.64.98.199--usernamerepuser --wal-method=stream --write-recovery-conf.
>
>
> Your PGDATA direetory on the streamed/salve server needs to be empty.   The basebackup will copy ALL files from the master to the slave.   This would include PostgreSQL.conf , pg_hba.conf and all associated files for the databases.
>
> Therefore the streaming/slave server will be EXACTLY the same as the master.   Same users, same port, same data.
>

I am under impression that what you are trying to do is merging two
Primary databases. If that is what you actually want then Streaming
Replication is not going to work for you. Maybe you should look for
some Multi-master replication tool, which is probably the way to go if
you want to mix PostgreSQL and EDB Advanced Server anyway.

Regards,

Juan José Santamaría Flecha


Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

jwiencek3
Multi master requires that you identify one node as the primary node.   Data is populated to the remote node via an initial snapshot.   Tables on the remote node cannot exist when you run the initial snapshot.  The snapshot will create all objects on the remote node .  


xDB(multi-master replication) will not merge two databases together.

Sent from my iPad

> On Sep 5, 2019, at 11:08 AM, Juan José Santamaría Flecha <[hidden email]> wrote:
>
>> On Thu, Sep 5, 2019 at 5:54 PM John Wiencek <[hidden email]> wrote:
>>
>> H
>>
>> When you set up streaming replication your read-only replica should be created using pg_basebackup.
>>
>> for example;
>>
>> Run this from the streamed/slave server.   Set variable $PGDATA.  Make sure directory structure exits and is empty( no file in $PGDATA on slave server)
>>
>> pg_basebackup --pgdata=$PGDATA --label=standby --host 10.64.98.199--usernamerepuser --wal-method=stream --write-recovery-conf.
>>
>>
>> Your PGDATA direetory on the streamed/salve server needs to be empty.   The basebackup will copy ALL files from the master to the slave.   This would include PostgreSQL.conf , pg_hba.conf and all associated files for the databases.
>>
>> Therefore the streaming/slave server will be EXACTLY the same as the master.   Same users, same port, same data.
>>
>
> I am under impression that what you are trying to do is merging two
> Primary databases. If that is what you actually want then Streaming
> Replication is not going to work for you. Maybe you should look for
> some Multi-master replication tool, which is probably the way to go if
> you want to mix PostgreSQL and EDB Advanced Server anyway.
>
> Regards,
>
> Juan José Santamaría Flecha



Reply | Threaded
Open this post in threaded view
|

Re: Streaming replication issue

Juan José Santamaría Flecha
On Thu, Sep 5, 2019 at 6:23 PM John Wiencek <[hidden email]> wrote:

>
> Multi master requires that you identify one node as the primary node.   Data is populated to the remote node via an initial snapshot.   Tables on the remote node cannot exist when you run the initial snapshot.  The snapshot will create all objects on the remote node .
>
>
> xDB(multi-master replication) will not merge two databases together.
>
> >
> > I am under impression that what you are trying to do is merging two
> > Primary databases. If that is what you actually want then Streaming
> > Replication is not going to work for you. Maybe you should look for
> > some Multi-master replication tool, which is probably the way to go if
> > you want to mix PostgreSQL and EDB Advanced Server anyway.
> >

By "you" I meant Mallikarjun and "merge" was meant to be as generic as
possible, since I do not have a clear picture of the problem.

Maybe if the original poster comments on the topic we can give him
better advice.

Regards,

Juan José Santamaría Flecha


12