Skip to content

Commit 9d953bd

Browse files
authored
docs: versions 1.25.1 and 1.24.3 (#263)
Removed 1.23 Closes #262 Signed-off-by: Gabriele Bartolini <[email protected]>
1 parent d5691cf commit 9d953bd

File tree

87 files changed

+1843
-1428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1843
-1428
lines changed

assets/documentation/1.24/benchmarking/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,14 @@ <h3 id="pgbench">pgbench</h3>
357357
cluster-example \
358358
-- --time 30 --client 1 --jobs 1
359359
</code></pre>
360+
<p>By default, jobs do not expire. You can enable automatic deletion with the
361+
<code>--ttl</code> flag. The job will be deleted after the specified duration (in seconds).</p>
362+
<pre><code class="language-shell">kubectl cnpg pgbench \
363+
--job-name pgbench-run \
364+
--ttl 600 \
365+
cluster-example \
366+
-- --time 30 --client 1 --jobs 1
367+
</code></pre>
360368
<p>If you want to run a <code>pgbench</code> job on a specific worker node, you can use
361369
the <code>--node-selector</code> option. Suppose you want to run the previous
362370
initialization job on a node having the <code>workload=pgbench</code> label, you can run:</p>

assets/documentation/1.24/bootstrap/index.html

Lines changed: 92 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -329,31 +329,32 @@
329329
<div class="section" itemprop="articleBody">
330330

331331
<h1 id="bootstrap">Bootstrap</h1>
332-
<p>This section describes the options you have to create a new
332+
<p>This section describes the options available to create a new
333333
PostgreSQL cluster and the design rationale behind them.
334334
There are primarily two ways to bootstrap a new cluster:</p>
335335
<ul>
336336
<li>from scratch (<code>initdb</code>)</li>
337337
<li>from an existing PostgreSQL cluster, either directly (<code>pg_basebackup</code>)
338338
or indirectly through a physical base backup (<code>recovery</code>)</li>
339339
</ul>
340-
<p>The <code>initdb</code> bootstrap also offers the possibility to import one or more
341-
databases from an existing Postgres cluster, even outside Kubernetes, and
342-
having a different major version of Postgres.
340+
<p>The <code>initdb</code> bootstrap also provides the option to import one or more
341+
databases from an existing PostgreSQL cluster, even if it's outside
342+
Kubernetes or running a different major version of PostgreSQL.
343343
For more detailed information about this feature, please refer to the
344344
<a href="../database_import/">"Importing Postgres databases"</a> section.</p>
345345
<div class="admonition important">
346346
<p class="admonition-title">Important</p>
347-
<p>Bootstrapping from an existing cluster opens up the possibility
348-
to create a <strong>replica cluster</strong>, that is an independent PostgreSQL
349-
cluster which is in continuous recovery, synchronized with the source
350-
and that accepts read-only connections.</p>
347+
<p>Bootstrapping from an existing cluster enables the creation of a
348+
<strong>replica cluster</strong>—an independent PostgreSQL cluster that remains in
349+
continuous recovery, stays synchronized with the source cluster, and
350+
accepts read-only connections.
351+
For more details, refer to the <a href="../replica_cluster/">Replica Cluster section</a>.</p>
351352
</div>
352353
<div class="admonition warning">
353354
<p class="admonition-title">Warning</p>
354355
<p>CloudNativePG requires both the <code>postgres</code> user and database to
355-
always exists. Using the local Unix Domain Socket, it needs to connect
356-
as <code>postgres</code> user to the <code>postgres</code> database via <code>peer</code> authentication in
356+
always exist. Using the local Unix Domain Socket, it needs to connect
357+
as the <code>postgres</code> user to the <code>postgres</code> database via <code>peer</code> authentication in
357358
order to perform administrative tasks on the cluster.<br />
358359
<strong>DO NOT DELETE</strong> the <code>postgres</code> user or the <code>postgres</code> database!!!</p>
359360
</div>
@@ -375,26 +376,30 @@ <h2 id="the-bootstrap-section">The <code>bootstrap</code> section</h2>
375376
existing cluster and, if needed, replaying all the available WAL files or up to
376377
a given <em>point in time</em></li>
377378
<li><code>pg_basebackup</code>: create a PostgreSQL cluster by cloning an existing one of
378-
the same major version using <code>pg_basebackup</code> via streaming replication protocol -
379-
useful if you want to migrate databases to CloudNativePG, even
380-
from outside Kubernetes.</li>
379+
the same major version using <code>pg_basebackup</code> through the streaming
380+
replication protocol. This method is particularly useful for migrating
381+
databases to CloudNativePG, although meeting all requirements can be
382+
challenging. Be sure to review the warnings in the
383+
<a href="#bootstrap-from-a-live-cluster-pg_basebackup"><code>pg_basebackup</code> subsection</a>
384+
carefully.</li>
381385
</ul>
382-
<p>Differently from the <code>initdb</code> method, both <code>recovery</code> and <code>pg_basebackup</code>
386+
<p>In contrast to the <code>initdb</code> method, both <code>recovery</code> and <code>pg_basebackup</code>
383387
create a new cluster based on another one (either offline or online) and can be
384388
used to spin up replica clusters. They both rely on the definition of external
385-
clusters.</p>
386-
<p>Given that there are several possible backup methods and combinations of backup
387-
storage that the CloudNativePG operator provides, please refer to the
388-
<a href="../recovery/">"Recovery" section</a> for guidance on each method.</p>
389+
clusters.
390+
Refer to the <a href="../replica_cluster/">replica cluster section</a> for more information.</p>
391+
<p>Given the amount of possible backup methods and combinations of backup
392+
storage that the CloudNativePG operator provides for <code>recovery</code>, please refer to
393+
the dedicated <a href="../recovery/">"Recovery" section</a> for guidance on each method.</p>
389394
<div class="admonition seealso">
390395
<p class="admonition-title">API reference</p>
391396
<p>Please refer to the <a href="../cloudnative-pg.v1/#postgresql-cnpg-io-v1-BootstrapConfiguration">"API reference for the <code>bootstrap</code> section</a>
392397
for more information.</p>
393398
</div>
394399
<h2 id="the-externalclusters-section">The <code>externalClusters</code> section</h2>
395-
<p>The <code>externalClusters</code> section provides a mechanism for specifying one or more
396-
PostgreSQL clusters associated with the current configuration. Its primary use
397-
cases include:</p>
400+
<p>The <code>externalClusters</code> section of the cluster manifest can be used to configure
401+
access to one or more PostgreSQL clusters as <em>sources</em>.
402+
The primary use cases include:</p>
398403
<ol>
399404
<li><strong>Importing Databases:</strong> Specify an external source to be utilized during
400405
the <a href="../database_import/">importation of databases</a> via logical backup and
@@ -416,7 +421,7 @@ <h2 id="the-externalclusters-section">The <code>externalClusters</code> section<
416421
to define the source PostgreSQL cluster for either the <code>pg_basebackup</code>
417422
method or the <code>recovery</code> one. An external cluster needs to have:</p>
418423
<ul>
419-
<li>a name that identifies the origin cluster, to be used as a reference via the
424+
<li>a name that identifies the external cluster, to be used as a reference via the
420425
<code>source</code> option</li>
421426
<li>
422427
<p>at least one of the following:</p>
@@ -433,13 +438,40 @@ <h2 id="the-externalclusters-section">The <code>externalClusters</code> section<
433438
</ul>
434439
<div class="admonition note">
435440
<p class="admonition-title">Note</p>
436-
<p>A recovery object store is normally an AWS S3, or an Azure Blob Storage,
437-
or a Google Cloud Storage source that is managed by Barman Cloud.</p>
441+
<p>A recovery object store is normally an AWS S3, Azure Blob Storage,
442+
or Google Cloud Storage source that is managed by Barman Cloud.</p>
438443
</div>
439444
<p>When only the streaming connection is defined, the source can be used for the
440445
<code>pg_basebackup</code> method. When only the recovery object store is defined, the
441-
source can be used for the <code>recovery</code> method. When both are defined, any of the
442-
two bootstrap methods can be chosen.</p>
446+
source can be used for the <code>recovery</code> method. When both are defined, any of
447+
the two bootstrap methods can be chosen. The following table summarizes your
448+
options:</p>
449+
<table>
450+
<thead>
451+
<tr>
452+
<th style="text-align: left;">Content of externalClusters</th>
453+
<th style="text-align: center;">pg_basebackup</th>
454+
<th style="text-align: center;">recovery</th>
455+
</tr>
456+
</thead>
457+
<tbody>
458+
<tr>
459+
<td style="text-align: left;">Only streaming</td>
460+
<td style="text-align: center;"></td>
461+
<td style="text-align: center;"></td>
462+
</tr>
463+
<tr>
464+
<td style="text-align: left;">Only object store</td>
465+
<td style="text-align: center;"></td>
466+
<td style="text-align: center;"></td>
467+
</tr>
468+
<tr>
469+
<td style="text-align: left;">Streaming and object store</td>
470+
<td style="text-align: center;"></td>
471+
<td style="text-align: center;"></td>
472+
</tr>
473+
</tbody>
474+
</table>
443475
<p>Furthermore, in case of <code>pg_basebackup</code> or full <code>recovery</code> point in time, the
444476
cluster is eligible for replica cluster mode. This means that the cluster is
445477
continuously fed from the source, either via streaming, via WAL shipping
@@ -453,7 +485,7 @@ <h3 id="password-files">Password files</h3>
453485
<p>Whenever a password is supplied within an <code>externalClusters</code> entry,
454486
CloudNativePG autonomously manages a <a href="https://www.postgresql.org/docs/current/libpq-pgpass.html">PostgreSQL password file</a>
455487
for it, residing at <code>/controller/external/NAME/pgpass</code> in each instance.</p>
456-
<p>This approach empowers CloudNativePG to securely establish connections with an
488+
<p>This approach enables CloudNativePG to securely establish connections with an
457489
external server without exposing any passwords in the connection string.
458490
Instead, the connection safely references the aforementioned file through the
459491
<code>passfile</code> connection parameter.</p>
@@ -670,9 +702,9 @@ <h3 id="executing-queries-after-initialization">Executing Queries After Initiali
670702
Comments can be included, but internal commands like <code>psql</code> cannot.</p>
671703
</div>
672704
<h2 id="bootstrap-from-another-cluster">Bootstrap from another cluster</h2>
673-
<p>CloudNativePG enables the bootstrap of a cluster starting from
705+
<p>CloudNativePG enables bootstrapping a cluster starting from
674706
another one of the same major version.
675-
This operation can happen by connecting directly to the source cluster via
707+
This operation can be carried out either connecting directly to the source cluster via
676708
streaming replication (<code>pg_basebackup</code>), or indirectly via an existing
677709
physical <em>base backup</em> (<code>recovery</code>).</p>
678710
<p>The source cluster must be defined in the <code>externalClusters</code> section, identified
@@ -687,16 +719,35 @@ <h2 id="bootstrap-from-another-cluster">Bootstrap from another cluster</h2>
687719
value of <code>name</code> in the external cluster definition).</p>
688720
</div>
689721
<h3 id="bootstrap-from-a-backup-recovery">Bootstrap from a backup (<code>recovery</code>)</h3>
690-
<p>Given the several possibilities, methods, and combinations that the
691-
CloudNativePG operator provides in terms of backup and recovery, please refer
692-
to the <a href="../recovery/">"Recovery" section</a>.</p>
722+
<p>Given the variety of backup methods and combinations of backup storage
723+
options provided by the CloudNativePG operator for <code>recovery</code>, please refer
724+
to the dedicated <a href="../recovery/">"Recovery" section</a> for detailed guidance on
725+
each method.</p>
693726
<h3 id="bootstrap-from-a-live-cluster-pg_basebackup">Bootstrap from a live cluster (<code>pg_basebackup</code>)</h3>
694727
<p>The <code>pg_basebackup</code> bootstrap mode lets you create a new cluster (<em>target</em>) as
695728
an exact physical copy of an existing and <strong>binary compatible</strong> PostgreSQL
696729
instance (<em>source</em>), through a valid <em>streaming replication</em> connection.
697730
The source instance can be either a primary or a standby PostgreSQL server.</p>
698-
<p>The primary use case for this method is represented by <strong>migrations</strong> to CloudNativePG,
699-
either from outside Kubernetes or within Kubernetes (e.g., from another operator).</p>
731+
<ul>
732+
<li>Reporting and business intelligence clusters that need to be regenerated
733+
periodically (daily, weekly)</li>
734+
<li>Test databases containing live data that require periodic regeneration
735+
(daily, weekly, monthly) and anonymization</li>
736+
<li>Rapid spin-up of a standalone replica cluster</li>
737+
<li>Physical migrations of CloudNativePG clusters to different namespaces or
738+
Kubernetes clusters</li>
739+
</ul>
740+
<div class="admonition important">
741+
<p class="admonition-title">Important</p>
742+
<p>Avoid using this method, based on physical replication, to migrate an
743+
existing PostgreSQL cluster outside of Kubernetes into CloudNativePG, unless you
744+
are completely certain that all <a href="#requirements">requirements</a> are met and
745+
the operation has been
746+
thoroughly tested. The CloudNativePG community does not endorse this approach
747+
for such use cases, and recommends using logical import instead. It is
748+
exceedingly rare that all requirements for physical replication are met in a
749+
way that seamlessly works with CloudNativePG.</p>
750+
</div>
700751
<div class="admonition warning">
701752
<p class="admonition-title">Warning</p>
702753
<p>The current implementation creates a <em>snapshot</em> of the origin PostgreSQL
@@ -792,7 +843,7 @@ <h4 id="usernamepassword-authentication">Username/Password authentication</h4>
792843
<pre><code># A more restrictive rule for TLS and IP of origin is recommended
793844
host replication streaming_replica all md5
794845
</code></pre>
795-
<p>The following manifest creates a new PostgreSQL 17.2 cluster,
846+
<p>The following manifest creates a new PostgreSQL 17.4 cluster,
796847
called <code>target-db</code>, using the <code>pg_basebackup</code> bootstrap method
797848
to clone an external PostgreSQL cluster defined as <code>source-db</code>
798849
(in the <code>externalClusters</code> array). As you can see, the <code>source-db</code>
@@ -805,7 +856,7 @@ <h4 id="usernamepassword-authentication">Username/Password authentication</h4>
805856
name: target-db
806857
spec:
807858
instances: 3
808-
imageName: ghcr.io/cloudnative-pg/postgresql:17.2
859+
imageName: ghcr.io/cloudnative-pg/postgresql:17.4
809860

810861
bootstrap:
811862
pg_basebackup:
@@ -824,7 +875,7 @@ <h4 id="usernamepassword-authentication">Username/Password authentication</h4>
824875
key: password
825876
</code></pre>
826877
<p>All the requirements must be met for the clone operation to work, including
827-
the same PostgreSQL version (in our case 17.2).</p>
878+
the same PostgreSQL version (in our case 17.4).</p>
828879
<h4 id="tls-certificate-authentication">TLS certificate authentication</h4>
829880
<p>The second authentication method supported by CloudNativePG
830881
with the <code>pg_basebackup</code> bootstrap is based on TLS client certificates.
@@ -836,7 +887,7 @@ <h4 id="tls-certificate-authentication">TLS certificate authentication</h4>
836887
<p>This example can be easily adapted to cover an instance that resides
837888
outside the Kubernetes cluster.</p>
838889
</div>
839-
<p>The manifest defines a new PostgreSQL 17.2 cluster called <code>cluster-clone-tls</code>,
890+
<p>The manifest defines a new PostgreSQL 17.4 cluster called <code>cluster-clone-tls</code>,
840891
which is bootstrapped using the <code>pg_basebackup</code> method from the <code>cluster-example</code>
841892
external cluster. The host is identified by the read/write service
842893
in the same cluster, while the <code>streaming_replica</code> user is authenticated
@@ -849,7 +900,7 @@ <h4 id="tls-certificate-authentication">TLS certificate authentication</h4>
849900
name: cluster-clone-tls
850901
spec:
851902
instances: 3
852-
imageName: ghcr.io/cloudnative-pg/postgresql:17.2
903+
imageName: ghcr.io/cloudnative-pg/postgresql:17.4
853904

854905
bootstrap:
855906
pg_basebackup:
@@ -923,6 +974,8 @@ <h5 id="snapshot-copy">Snapshot copy</h5>
923974
and diverge from the source.
924975
For this reason, it is advised to stop all write operations to the source database
925976
before migrating to the target database in Kubernetes.</p>
977+
<p>Note that this limitation applies only if the target cluster is not defined as
978+
a replica cluster.</p>
926979
<div class="admonition important">
927980
<p class="admonition-title">Important</p>
928981
<p>Before you attempt a migration, you must test both the procedure

assets/documentation/1.24/cloudnative-pg.v1/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3536,6 +3536,14 @@ <h2 id="postgresql-cnpg-io-v1-PluginConfiguration">PluginConfiguration</h2>
35363536
<p>Name is the plugin name</p>
35373537
</td>
35383538
</tr>
3539+
<tr><td><code>isWALArchiver</code><br/>
3540+
<i>bool</i>
3541+
</td>
3542+
<td>
3543+
<p>Only one plugin can be declared as WALArchiver.
3544+
Cannot be active if &quot;.spec.backup.barmanObjectStore&quot; configuration is present.</p>
3545+
</td>
3546+
</tr>
35393547
<tr><td><code>parameters</code><br/>
35403548
<i>map[string]string</i>
35413549
</td>

0 commit comments

Comments
 (0)