Feature/timelineid in clone section#1961
Conversation
| S3SecretAccessKey string `json:"s3_secret_access_key,omitempty"` | ||
| S3ForcePathStyle *bool `json:"s3_force_path_style,omitempty" defaults:"false"` | ||
| S3ForcePathStyle *bool `json:"s3_force_path_style,omitempty" defaults:"false"` | ||
| TimelineID string `json:"clone_target_timeline" defaults:"latest"` |
There was a problem hiding this comment.
Please use go.fmt for right code formatting. This is misaligned.
And type should better be int32. I know it's used as an environment variable later but we can enforece users to only specify numbers here.
There was a problem hiding this comment.
The type has been changed and the formatting is corrected.
|
I think, we should not use the same name as the Spilo environment variable. We have also omitted the |
| Format: "uuid", | ||
| }, | ||
| "clone_target_timeline": { | ||
| Type: "string", |
There was a problem hiding this comment.
Actually the timeline can be characters like A, B etc.. for eg C here: base_0000000C00000001000000A3
There was a problem hiding this comment.
@Sudeepta92 FxKu is right here. The actual ID can only be an integer. What you see in the WAL archive name is a hex value. So for instance 0000003400000000000000CD would be timeline_id 52. Nevertheless, one can also specify latest or current in the recovery.conf. Which is default if nothing is set.
So I think, you could use and int32 here.
There was a problem hiding this comment.
Oh yeahh its a hex value in the end. I will change to int32.
There was a problem hiding this comment.
@FxKu @thedatabaseme btw, on changing type to integer back from string it fails when no timeline id is passed as it can no longer receive "latest"/"current".
There was a problem hiding this comment.
Ok, so have removed the possibility for string value "latest" and in such a scenario it will calcuate the latest timeline id as integer. You may ignore my previous comment.
The parameter name has been changed to "wal_timeline_id" from "clone_target_timeline". And I am working on the docs. |
|
move to next milestone, because Spilo PR is still open |
Add timelineid in clone section in the cluster CRD.
In the cluster config we need timeline_id along with the existing possibility of timestamp and cluster name such as for eg: