Re: Upgrading from v12.7 to v15.7

2024-07-08 Thread Ruben Morais
Hi,

Cstore -https://github.com/citusdata/cstore_fdw


Oracle_fdw -
https://github.com/laurenz/oracle_fdw/releases/tag/ORACLE_FDW_2_6_0

On Mon, Jul 8, 2024, 19:52 Yongye Serkfem  wrote:

> Hello Engineers,
> After upgrading from v12.7 to v15.7, I ran the following command and got
> this error message.
>
> postgres_upgrade_work_area]$ /usr/pgsql-15/bin/pg_upgrade \
> > --check \
> --old-datadir=/data/postgres12 \
> > --old-datadir=/data/postgres12 \
> > --new-datadir=/data/postgres \
> > --old-bindir=/usr/pgsql-12/bin \
> > --new-bindir=/usr/pgsql-15/bin \
> > --old-options '-c config_file=/data/postgres12/postgresql.conf' \
> > --new-options '-c config_file=/data/postgres/postgresql.conf' \
> > --old-port=5433 \
> > --new-port=5432
> Performing Consistency Checks on Old Live Server
> 
> Checking cluster versions   ok
> Checking database user is the install user  ok
> Checking database connection settings   ok
> Checking for prepared transactions  ok
> Checking for system-defined composite types in user tables  ok
> Checking for reg* data types in user tables ok
> Checking for contrib/isn with bigint-passing mismatch   ok
> Checking for user-defined encoding conversions  ok
> Checking for user-defined postfix operators ok
> Checking for incompatible polymorphic functions ok
> Checking for presence of required libraries fatal
>
>  Your installation references loadable libraries that are missing from the
>
> new installation.  You can add these libraries to the new installation,
> or remove the functions using them from the old installation.  A list of
> problem libraries is in the file:
>
> /data/postgres/pg_upgrade_output.d/20240708T141557.291/loadable_libraries.txt
>
>  Failure, exiting
>
> [postgres@AWPPLCOLEDBXL01 postgres_upgrade_work_area]$ ll
> total 0
> [postgres@AWPPLCOLEDBXL01 postgres_upgrade_work_area]$ cat
> /data/postgres/pg_upgrade_output.d/20240708T141557.291/loadable_libraries.txt
> could not load library "$libdir/cstore_fdw": ERROR:  could not access file
> "$libdir/cstore_fdw": No such file or directory
> In database: postgres
> In database: logicole
> could not load library "$libdir/oracle_fdw": ERROR:  could not access file
> "$libdir/oracle_fdw": No such file or directory
> In database: postgres
> In database: logicole
>
> Does anyone know where I can download rpm cstore_fdw and oracle_fdw. I
> have searched and can't find the rpm for v15.7.
>
> I will greatly appreciate any help.
>


Re: PgbackRest and EDB Query

2024-07-18 Thread Ruben Morais
In the documentatio you have how to do it:

https://pgbackrest.org/user-guide.html#repo-host/setup-ssh

On Thu, Jul 18, 2024, 14:10 KK CHN  wrote:

>
>
> Hi list,
>
> Thank you all for your  inputs, I am trying pgbacrest with
> Enterprised DB.  Locally pgbackrest works for  EDB but when I am trying for
> remote repository I am facing an issue ( from the remote host to  EDB
> server  password less authentication part )
>
> Trying to  use a remote host  as Repo Server I am facing the issue of
> passwordless  authentication(Public key private key).
>
> 1.  From the EDB server  I  added the user pgbackrest directory and
> generated ssh-keys and copied the id_rsa.pub   to  the Repo server
> (pgbackrest user's .ssh dir with necessary permissions)
> everything(passwordless auth) working to one side.
>
> From the EDB Postgres Advanced Server nodes
> $ sudo -u enterprisedb ssh pgbackrest@backup-server
>
> This works from  EDB server machine without any issue(password less auth
> works)
>
>
>
> 2 But   from the reposerver
> $sudo -u pgbackrest   ssh enterprisedb@EDB_Server_IP   unable to do
> password less auth( Its asking password for enterpridb@EDB_Server )
>
> How to do the passwordless auth  from the  Repo server to the EDB server
> for the default "enterprisedb" user of  EDB ? ( enterprisedb user doesn't
> have any home dir  I mean /home/enterprisedb, so I am not sure where to
> create .ssh dir and authorized_keys for  passwordless auth  )
>
> Any one who has already tackled this kindly guide  me on how to achieve
> this .
>
>
> Thank you,
> Krishane
>
>
>
>
>
>
>
> On Wed, Jul 17, 2024 at 9:07 PM Kashif Zeeshan 
> wrote:
>
>> Hi
>>
>> On Wed, Jul 17, 2024 at 5:21 PM KK CHN  wrote:
>>
>>> Hi ,
>>>
>>> I am trying pgbackrest(2.52.1)  with postgresql( version 16)  on  a lab
>>> setup on RHEL-9. Both  PostgreSQL server and a remote Repository host
>>> configured with pgbackrest and everything working fine as specified in the
>>> documentation.
>>>
>>> note:  here I am running postgres server and pgbackrest everything as
>>> postgres user and no issues in  backup and recovery.
>>>
>>>
>>>
>>> Query
>>> 1. Is it possible to use  PgBackrest with  EnterpriseDB(EDB -16) for the
>>> backup and recovery process? Or pgback works only with the community
>>> PostgreSQL database ?
>>>
>> It support both community PG and EDB PG.
>>
>>>
>>>
>>> [ when I ran  initdb script of EDB while installing EDB it creates the
>>> enterpisedb  as user and edb as initial  database by the script. ]
>>>
>> Enterprisedb is the default user created by EDB.
>>
>>>
>>>
>>> when I try to create the stanza on the EDB server it throws error
>>> (pasted at bottom ).
>>>
>>>
>>>
>>> NOTE:
>>> I know that  my EDB  running on  port 5444 instead of  5432 and the
>>> dbname = edb instead of postgres, and user as  enterpisedb instead of
>>> postgres how to specify these changes in the stanza creation step if  EDB
>>> Supports pgbackrest tool ?
>>>
>> You can enter this connection information in the PbBackRest Conf file for
>> the stanza you create for your EDB Instance.
>>
>> e.g
>>
>> [global]repo1-path=/var/lib/edb/as15/backups
>> [demo]pg1-path=/var/lib/edb/as15/datapg1-user=enterprisedbpg1-port=5444pg-version-force=15
>>
>> Refer to following edb documentation
>>
>>
>> https://www.enterprisedb.com/docs/supported-open-source/pgbackrest/03-quick_start/
>>
>>
>>> OR   Am I doing a waste exercise  [if pgbackrest won't go ahead with EDB
>>> ] ?
>>>
>>>
>>> Any hints much appreciated.
>>>
>>> Thank you,
>>> Krishane
>>>
>>>
>>> ERROR:
>>> root@uaterssdrservice01 ~]# sudo -u postgres pgbackrest --stanza=OD_DM2
>>> --log-level-console=info  stanza-create
>>> 2024-07-17 17:42:13.935 P00   INFO: stanza-create command begin 2.52.1:
>>> --exec-id=1301876-7e055256 --log-level-console=info --log-level-file=debug
>>> --pg1-path=/var/lib/pgsql/16/data --repo1-host=10.x.y.7
>>> --repo1-host-user=postgres --stanza=OD_DM2
>>> WARN: unable to check pg1: [DbConnectError] unable to connect to
>>> 'dbname='postgres' port=5432': connection to server on socket
>>> "/tmp/.s.PGSQL.5432" failed: No such file or directory
>>> Is the server running locally and accepting connections on that
>>> socket?
>>> ERROR: [056]: unable to find primary cluster - cannot proceed
>>>HINT: are all available clusters in recovery?
>>> 2024-07-17 17:42:13.936 P00   INFO: stanza-create command end: aborted
>>> with exception [056]
>>> [root@uaterssdrservice01 ~]#
>>>
>>>
>>>
>>>
>>>


Re: WAL replication and Archive command for pgbackrest on same server conf

2024-08-19 Thread Ruben Morais
hi,

you can combine:

archive_command = 'pgbackrest --stanza=Demo  archive-push  %p && cp %p
/data/archive/%f '

You need to change your standby replica to consume the wals from pgbackrest
if you want instead to use both commands.

*Rúben Morais*

 *(+351) 965775713*

*ruben.gmor...@gmail.com
*


On Mon, Aug 19, 2024 at 2:10 PM KK CHN  wrote:

> Hi List ,
>
> I am trying to configure the pgbackrest  on a live server ( RHEL9, EPAS16
> and Pgbacrest .2.52)  which is having a working   WAL archive
> configuration  to a standby server in postgresql.conf as follows
>
>
> 1. archive_mod =on
> 2. archive_level=replica
> 3. archive_command = 'cp %p /data/archive/%f'
>
>
> To do the pgbackrest conf on the same   archive_command   directive (So
> both the existing WAL configuration as well as my new pgbackrest option
> both will work smoothly.   how to add an entry  in line 3  ??
>
> archive_command = 'pgbackrest --stanza=Demo  archive-push  cp %p
> /data/archive/%f '
>
>
>
> Please correct me If I am doing wrong in the above line..
>
>
> Thank you,
> Krish
>