Package: amanda-client
Version: 1:3.5.1-7
Severity: important
Tags: patch upstream
X-Debbugs-Cc: kjo...@poczta.onet.pl

In newer (>=10) postgres version 
(https://www.postgresql.org/docs/10/release-10.html) 
"xlog" function renames to "wal" functions. 
This makes ampgsql script pretty unusable. 
here is rough patch adjusting it.

--- /usr/lib/amanda/application/ampgsql 2021-06-28 23:46:06.000000000 +0200
+++ /usr/lib/amanda/application/ampgsql.kj      2021-07-13 09:00:45.569729736 
+0200
@@ -977,9 +977,13 @@
 
    my $incremental_val = $self->{'props'}->{'pg-incremental'} || 'yes';
    my $incremental = string_to_boolean($incremental_val);
-
+   my $pg_version = $self->_get_pg_version();
    if ($self->{'action'} eq 'backup') {
-      _run_psql_command($self, "SELECT file_name from 
pg_xlogfile_name_offset(pg_switch_xlog())");
+          if ($pg_version < 100000 ) {
+          _run_psql_command($self, "SELECT file_name from 
pg_xlogfile_name_offset(pg_switch_xlog())");
+         } else {
+          _run_psql_command($self, "SELECT file_name from 
pg_walfile_name_offset(pg_switch_wal())");
+         }
       if (defined($self->{'switch_xlog_filename'})) {
         $self->_wait_for_wal($self->{'switch_xlog_filename'});
       }



-- System Information:
Debian Release: 11.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-8-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages amanda-client depends on:
ii  amanda-common       1:3.5.1-7
ii  libc6               2.31-13
ii  libglib2.0-0        2.66.8-1
ii  libreadline8        8.1-2
ii  libxml-simple-perl  2.25-1
ii  perl                5.32.1-4

amanda-client recommends no packages.

Versions of packages amanda-client suggests:
ii  dump                  0.4b47-1
ii  gnuplot               5.4.1+dfsg1-1
ii  gnuplot-qt [gnuplot]  5.4.1+dfsg1-1
ii  smbclient             2:4.13.5+dfsg-2

-- no debconf information

Reply via email to