Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bdd643c

Browse files
committed
Merge branch 'nik-pgbackrest-delta-option' into 'master'
fix: pgBackRest – rename "forceInit" option to "delta" See merge request postgres-ai/database-lab!513
2 parents a37d8e1 + 7b25846 commit bdd643c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

‎configs/config.example.physical_pgbackrest.yml

Whitespace-only changes.

‎engine/configs/config.example.physical_pgbackrest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ retrieval:
238238
# Defines pgBackRest configuration options.
239239
pgbackrest:
240240
stanza: stanzaName
241-
forceInit: false
241+
delta: false
242242

243243
physicalSnapshot:
244244
options:

‎engine/internal/retrieval/engine/postgres/physical/pgbackrest.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ type pgbackrest struct {
2020
}
2121

2222
type pgbackrestOptions struct {
23-
Stanza string `yaml:"stanza"`
24-
ForceInitbool `yaml:"forceInit"`
23+
Stanza string `yaml:"stanza"`
24+
Deltabool `yaml:"delta"`
2525
}
2626

2727
func newPgBackRest(options pgbackrestOptions) *pgbackrest {
@@ -35,7 +35,7 @@ func (p *pgbackrest) GetRestoreCommand() string {
3535
restoreCmd := fmt.Sprintf("sudo -Eu postgres pgbackrest --type=standby --pg1-path=${PGDATA} --stanza=%[1]s restore "+
3636
"--recovery-option=restore_command='pgbackrest --pg1-path=${PGDATA} --stanza=%[1]s archive-get %%f %%p'", p.options.Stanza)
3737

38-
if p.options.ForceInit {
38+
if p.options.Delta {
3939
restoreCmd += " --delta"
4040
}
4141

‎engine/internal/retrieval/engine/postgres/physical/pgbackrest_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestPgBackRestRestoreCommand(t *testing.T) {
3131
"--recovery-option=restore_command='pgbackrest --pg1-path=${PGDATA} --stanza=stanzaName archive-get %f %p'"
3232
assert.Equal(t, expectedResponse, restoreCmd)
3333

34-
pgbackrest.options.ForceInit = true
34+
pgbackrest.options.Delta = true
3535
restoreCmd = pgbackrest.GetRestoreCommand()
3636
expectedResponse = "sudo -Eu postgres pgbackrest --type=standby --pg1-path=${PGDATA} --stanza=stanzaName restore " +
3737
"--recovery-option=restore_command='pgbackrest --pg1-path=${PGDATA} --stanza=stanzaName archive-get %f %p' --delta"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /