diff --git a/intervention.md b/intervention.md index ea1a43f..d41b76f 100644 --- a/intervention.md +++ b/intervention.md @@ -1,11 +1,13 @@ # intervention 20231027 +## Troubleshoot My first action was check the shared drive where `archive_commad` is supposed to be sending _WAL_ files (archivelog): `\\10.6.1.3\archivelog`. That share does *not* exist anymore. I check both servers for the existance of such drive and noone of them has that share. +## first solution implementation Then I look for a place to write archivelogs, I saw that servers have a `R:\` drive with plenty of space. So I decided to use a cross copy between both servers, that is: * Primary will copy to backup as: `\\10.6.1.3\R$\postgresql` @@ -24,7 +26,29 @@ archive_command = 'copy "%p" "Z:\\archivelog\\%f"' This setting also create a good configuration, We will not care about switchover/failover in terms of config changes. -The problem here + +## The problem + +I perform all my tests on the _backup_ server. + +Summary: No matter which command I set on `postgresql.conf->archive_command`, postgresql report *Permission Denied* . + +I try all the options I can imagine: + * My prefered solution using `Z:\` + * Direct copy to `\\10.6.0.3\R$` + * Add a new shared drive on the _primary_, for example I shared `\\10.6.0.3\postgresql` + * Grant permissions to `network service` windows "user" + * Grant permissions to `Everyone` windows group. + * Combinations of the above options + +Until I run out of options. +Of course when I copied the file via powershell with the Admin user, it worked. All the time. +So I'm sure the problem comes from the user which runs PostgreSQL service, I had faced similar problems in the past. +The problem is that I'm not a windows admin, my knowledge is limited here, I tried everything I could think, but maybe a windows sysadmin will know how to solve that permission problem. + + + + I modified postgresql.conf so archivecommand is: