From 37b4592e522289a0523f03f8e9b144ff28fa21d3 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 24 Aug 2022 08:45:44 -0400 Subject: [PATCH] Allow host memory limits in the user guide to be disabled. These limits can cause errors in some environments, e.g. Docker in Docker on Mac M1. Entirely remove limits from the build, s3, and azure hosts since memory usage on these hosts is out of our control and not useful for testing. Also allow empty variables to be rendered as blank. --- doc/lib/pgBackRestDoc/Common/DocManifest.pm | 3 ++- doc/xml/user-guide.xml | 17 +++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/lib/pgBackRestDoc/Common/DocManifest.pm b/doc/lib/pgBackRestDoc/Common/DocManifest.pm index a441518b2..bc68fdf50 100644 --- a/doc/lib/pgBackRestDoc/Common/DocManifest.pm +++ b/doc/lib/pgBackRestDoc/Common/DocManifest.pm @@ -370,7 +370,8 @@ sub variableReplace foreach my $strName (sort(keys(%{$self->{oVariable}}))) { - my $strValue = $self->{oVariable}{$strName}; + # If the value is not defined then replace it as an empty string. This means the key *was* defined but no value given. + my $strValue = defined($self->{oVariable}{$strName}) ? $self->{oVariable}{$strName} : ''; $strBuffer =~ s/\{\[$strName\]\}/$strValue/g; } diff --git a/doc/xml/user-guide.xml b/doc/xml/user-guide.xml index 12f6cff0c..470c18067 100644 --- a/doc/xml/user-guide.xml +++ b/doc/xml/user-guide.xml @@ -177,6 +177,11 @@ -v /sys/fs/cgroup:/sys/fs/cgroup:rw -v /tmp/$(mktemp -d):/run + + y + -m 512m + + use English; getpwuid($UID) eq 'root' ? 'vagrant' : getpwuid($UID) . '' {[host-repo-path]}:{[pgbackrest-repo-path]} pgbackrest/test @@ -771,10 +776,10 @@ Introduction - + - +

This user guide is intended to be followed sequentially from beginning to end — each section depends on the last. For example, the Restore section relies on setup that is performed in the Quick Start section. Once is up and running then skipping around is possible but following the user guide in order is recommended the first time through.

@@ -869,7 +874,7 @@

{[user-guide-os]} packages for are available from Crunchy Data or yum.postgresql.org, but it is also easy to download the source and install manually.

- +

When building from source it is best to use a build host rather than building on production. Many of the tools required for the build should generally not be installed in production. consists of a single executable so it is easy to copy to a new host once it is built.

@@ -941,7 +946,7 @@

A new host named {[host-pg1]} is created to contain the demo cluster and run examples.

- +