Sayfalar

27 Ağustos 2020 Perşembe

ASSERT: [025]: working path 'X' is not the same path as 'X'

Merhabalar Eğer loglarınızda aşağıdaki hatayı alıyorsanız muhtemel pgbackrest config dosyanız da uyuşmayan bir yer var demektir.

 ASSERT: [025]: working path 'X'  is not the same path as 'X'


primary de pgbackrest için tanımlı pgbackrest.conf dosyasında ayarlama yapıcağız. master instance da aşağıdaki path lerin doğru olduğuna emin olunuz.

checking the pgbackrest.conf of your primary instance

 [root_primary_instance]# cat /etc/pgbackrest.conf

[global]
repo1-path=/pgdata/backrest
repo1-retention-full=2
repo1-host=10.150.153.169
repo1-host-user=postgres

archive-async=y
log-level-file=detail

[global:archive-get]
process-max=8

[global:archive-push]
process-max=8

[pgtest1]
#pg1-path=/var/lib/pgsql/12/data
pg1-path=/pgdata/data
pg1-port=543


servisimizi restart edip hatanın kaybolduğunu göreceksiniz..
 
[root_primary_instance]# systemctl restart postgres-12

The transaction has already committed locally, but might not have been replicated to the standby

 Merhabalar Postgres de eğer aşağıdaki hatayı alıyorsanız;  muhtemelen bu sorun sizin Replication name'iniz yanlış olduğu anlamına geliyor.

DETAIL: The transaction has already committed locally, but might not have been replicated to the standby


 

Öncelikle check edelim.

primary DBde;
>postgres=# show synchronous_commit;
 synchronous_commit
--------------------
 on
(1 row)

senkronizasyonumuz açık görünüyor.. değilse off durumunda ise  postgres.conf dosyasından off kısmı on yapalım.

postgres=#
postgres=# select * from pg_stat_replication ;
 pid     usesysid     usename     application_name     client_addr     client_hostname     client_port     backend_start                  backend_xmin     state      sent_lsn     write_lsn     flush_lsn     replay_lsn     write_lag     flush_lag     replay_lag     sync_priority     sync_state     reply_time                    
 ------  -----------  ----------  -------------------  --------------  ------------------  --------------  -----------------------------  ---------------  ---------  -----------  ------------  ------------  -------------  ------------  ------------  -------------  ----------------  -------------  ----------------------------- 
 24330   16388        replikaci   walreceiver          10.150.153.167  (null)              42554           2020-08-27 11:43:52.374787+03  (null)           streaming  0/19010C88   0/19010C88    0/19010C88    0/19010C88     (null)        (null)        (null)         1                 sync           2020-08-27 13:43:42.137884+03 


postgres=# select application_name, sync_state from pg_stat_replication;
 application_name | sync_state
------------------+------------
 walreceiver      | async
(1 row)



postgres=# show synchronous_standby_names;
 synchronous_standby_names
---------------------------
 pgdbtest1

replication application name walreceiver  ise synchronous_standby_names inde aynı isim olması gerekir.  pgdbtest1 ismini değiştireceğiz.

Standby da 

postgres=# show synchronous_commit;
 synchronous_commit
--------------------
 local


olmasını bekleriz.

değişiklik için 

[root@pg_primary_instance]# vi postgresql.conf
#synchronous_standby_names = 'pgdbtest1'
synchronous_standby_names = 'walreceiver'

kayıt edip çıkıyoruz.
[root@pg_primary_instance]# systemctl restart postgresql-12

şimdi işlemlerinize devam edebilirsiniz.. /pgdata/log/ yada İnstance ınızı nereye kurduysanız oradan da log ları kontrol edebilirsiniz?