You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to delete backups according to our retention policy of 30 days.
We've been doing this with retain FULL 3 as we make full backups every 2 weeks, this is however never really 30 days ago.
Now i've been trying to get the --after option to work with retain FULL 1 so we always have a full backup, and everything from the last 30 days.
Describe your problem
the --after argument is not working at all, it gives the error as you can see in the logs below
Please provide steps to reproduce
wal-g delete retain FULL 1 --after 2024-03-20T00:00:00
Please add config and wal-g stdout/stderr logs for debug purpose
command log
```bash
wal-g delete retain 5 --after 2024-03-20T00:00:00
INFO: 2024/04/22 13:27:14.232305 Backup to delete will be searched in storages: [default]
INFO: 2024/04/22 13:27:14.232423 retrieving permanent objects
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x18fe24c]
Database name
PostgreSQL
Issue description
Trying to delete backups according to our retention policy of 30 days.
We've been doing this with retain FULL 3 as we make full backups every 2 weeks, this is however never really 30 days ago.
Now i've been trying to get the
--after
option to work withretain FULL 1
so we always have a full backup, and everything from the last 30 days.Describe your problem
the --after argument is not working at all, it gives the error as you can see in the logs below
Please provide steps to reproduce
wal-g delete retain FULL 1 --after 2024-03-20T00:00:00
Please add config and wal-g stdout/stderr logs for debug purpose
command log
```bash
INFO: 2024/04/22 13:27:14.232305 Backup to delete will be searched in storages: [default]
INFO: 2024/04/22 13:27:14.232423 retrieving permanent objects
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x18fe24c]
goroutine 1 [running]:
github.com/wal-g/wal-g/internal/databases/postgres.timelineAndSegmentNoLess({0x7fd8846e05c0?, 0xc0001b4700?}, {0x0, 0x0})
/root/go/src/github.com/wal-g/wal-g/internal/databases/postgres/delete.go:204 +0x4c
github.com/wal-g/wal-g/internal.NewDeleteHandler.func1({0x0?, 0x0?}, {0x7fd8846e05c0?, 0xc0001b4700?})
/root/go/src/github.com/wal-g/wal-g/internal/delete_handler.go:91 +0x43
github.com/wal-g/wal-g/internal.(*DeleteHandler).FindTargetRetainAfterName(0xc000d8f840, 0x19?, {0x7fff8c61fb71, 0x13}, 0x0)
/root/go/src/github.com/wal-g/wal-g/internal/delete_handler.go:303 +0x23c
github.com/wal-g/wal-g/internal.(*DeleteHandler).FindTargetRetainAfter(0x7fff8c61fb67?, 0x1?, {0x7fff8c61fb71, 0x13}, 0x6c?)
/root/go/src/github.com/wal-g/wal-g/internal/delete_handler.go:275 +0x76
github.com/wal-g/wal-g/internal.(*DeleteHandler).HandleDeleteRetainAfter(0x25abc40?, {0xc000b37920?, 0xac?, 0xab?}, 0x0?)
/root/go/src/github.com/wal-g/wal-g/internal/delete_handler.go:148 +0x229
github.com/wal-g/wal-g/cmd/pg.runDeleteRetain(0x3b83ee0?, {0xc000b37920?, 0x1, 0x3})
/root/go/src/github.com/wal-g/wal-g/cmd/pg/delete.go:91 +0x1f2
github.com/spf13/cobra.(*Command).execute(0x3b83ee0, {0xc000b378f0, 0x3, 0x3})
/root/go/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x3b80f60)
/root/go/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/root/go/src/github.com/wal-g/wal-g/vendor/github.com/spf13/cobra/command.go:902
github.com/wal-g/wal-g/cmd/pg.Execute()
/root/go/src/github.com/wal-g/wal-g/cmd/pg/pg.go:53 +0x25
main.main()
/root/go/src/github.com/wal-g/wal-g/main/pg/main.go:8 +0x17
root@a67b4670221f:/# root@a67b4670221f:/# wal-g delete retain 5 --after 2024-03-20T00:00:00
INFO: 2024/04/22 13:27:14.232305 Backup to delete will be searched in storages: [default]
INFO: 2024/04/22 13:27:14.232423 retrieving permanent objects
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x18fe24c]
The text was updated successfully, but these errors were encountered: