WAL replication standby server: query

KK CHN <kkchn.in@gmail.com>

From: KK CHN <kkchn.in@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Date: 2024-10-15T17:10:53Z
Lists: pgsql-general
List ,

I am trying  to  configure a WAL replicated  standby server(EDB16) ..   In
the archive command  I used a dedicated  "/data/archive " directory  for
WAL archiving as follows, as I don't want any WAL overwriting in the
default WAL directory and loss of WAL files.

I have
archive_command=  ' cp %p /data/archive/%f '

pg_hba.conf    I have

host replication     all             10.255.10.0/24              md5

My doubt is whether the standby Postgres server(EDB16) reads WAL files by
itself   from the primary server's  explicit WAL archive folder
/data/archive  by its own  ?
OR
  The standby can read  only from the default WAL location  ie; pg_wal
 directory of primary server ?

Please  enlighten me.

If the standby can read only the default pg_wal folder, then how can we
make the standby server to read from the explicit  " /data/archive "
folder for WAL syncing automatically to the standby ?

Any input is much appreciated.

Thank you,
Krishane