Skip to content

Commit f6ba131

Browse files
committed
fix: custom physical restore_command (#153)
1 parent 8873f08 commit f6ba131

File tree

1 file changed

+4
-2
lines changed
  • pkg/retrieval/engine/postgres/physical

1 file changed

+4
-2
lines changed

pkg/retrieval/engine/postgres/physical/custom.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ func (c *custom) GetRestoreCommand() string {
4949
func (c *custom) GetRecoveryConfig() []byte {
5050
buffer := bytes.Buffer{}
5151

52-
buffer.WriteString("standby_mode = 'on'\n")
53-
buffer.WriteString(fmt.Sprintf("restore_command = '%s'\n", c.options.RestoreCommand))
52+
if c.options.RestoreCommand != "" {
53+
buffer.WriteString("standby_mode = 'on'\n")
54+
buffer.WriteString(fmt.Sprintf("restore_command = '%s'\n", c.options.RestoreCommand))
55+
}
5456

5557
return buffer.Bytes()
5658
}

0 commit comments

Comments
 (0)