Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow fetching of WALs using both restore_command and streaming replication #538

Closed
jonjomckay opened this issue Jul 31, 2018 · 3 comments
Closed

Comments

@jonjomckay
Copy link

Submission type

  • Request for enhancement (RFE)

Environment

Stolon version

v0.12.0

Additional environment information if useful to understand the bug

Enhancement Description

It would be incredibly helpful to allow fetching of WALs using both the restore_command and streaming replication (primary_conninfo) for standby clusters.

Currently, Stolon only supports fetching WALs using streaming replication after the initial PITR, but PostgreSQL itself supports combining both inside the recovery.conf. It's helpful for people who already have their WALs shipped to somewhere external (e.g. using wal-e), and don't want to (or can't) duplicate those WALs on the master using replication slots.

sgotti added a commit to sgotti/stolon that referenced this issue Aug 10, 2018
Rename cluster spec `StandbySettings` to `StandbyConfig`. `StandbyConfig` has
two fields: `StandbySettings` and `ArchiveRecoverySettings`.

In this way when defining a standby cluster user can also provide a recover
command inside the StandybConfig.ArchiveRecoverySettings option.

Resolves sorintlab#538
sgotti added a commit to sgotti/stolon that referenced this issue Aug 13, 2018
Rename cluster spec `StandbySettings` to `StandbyConfig`. `StandbyConfig` has
two fields: `StandbySettings` and `ArchiveRecoverySettings`.

In this way when defining a standby cluster user can also provide a recover
command inside the StandybConfig.ArchiveRecoverySettings option.

Resolves sorintlab#538
sgotti added a commit to sgotti/stolon that referenced this issue Aug 13, 2018
Rename cluster spec `StandbySettings` to `StandbyConfig`. `StandbyConfig` has
two fields: `StandbySettings` and `ArchiveRecoverySettings`.

In this way when defining a standby cluster user can also provide a recover
command inside the StandybConfig.ArchiveRecoverySettings option.

Resolves sorintlab#538
sgotti added a commit to sgotti/stolon that referenced this issue Aug 13, 2018
Rename cluster spec `StandbySettings` to `StandbyConfig`. `StandbyConfig` has
two fields: `StandbySettings` and `ArchiveRecoverySettings`.

In this way when defining a standby cluster user can also provide a recover
command inside the StandybConfig.ArchiveRecoverySettings option.

Resolves sorintlab#538
@sgotti
Copy link
Member

sgotti commented Aug 13, 2018

@jonjomckay I implemented this in #543 . Do you have time test that PR to see if this works correctly for you and fits your needs? (I added an integration tests that creates a standby cluster recovering only using the archived wals).

Please note that standbySettings has been renamed to standbyConfig and it accepts two sub options: standbySettings (where you can set the primary_conninfo) and archiveRecoverySettings (the same of pitr, where you can set the restore_command).

You can omit one of them (or also both ending with a cluster not syncing) so you can use only the streaming replication or the wal restore.

sgotti added a commit to sgotti/stolon that referenced this issue Aug 13, 2018
Rename cluster spec `StandbySettings` to `StandbyConfig`. `StandbyConfig` has
two fields: `StandbySettings` and `ArchiveRecoverySettings`.

In this way when defining a standby cluster user can also provide a recover
command inside the StandybConfig.ArchiveRecoverySettings option.

Resolves sorintlab#538
@jonjomckay
Copy link
Author

Thanks @sgotti! I'm out of the country this week, but I'll make sure to test it out when I'm back in the office next week.

sgotti added a commit to sgotti/stolon that referenced this issue Aug 16, 2018
Rename cluster spec `StandbySettings` to `StandbyConfig`. `StandbyConfig` has
two fields: `StandbySettings` and `ArchiveRecoverySettings`.

In this way when defining a standby cluster user can also provide a recover
command inside the StandybConfig.ArchiveRecoverySettings option.

Resolves sorintlab#538
sgotti added a commit to sgotti/stolon that referenced this issue Aug 16, 2018
Rename cluster spec `StandbySettings` to `StandbyConfig`. `StandbyConfig` has
two fields: `StandbySettings` and `ArchiveRecoverySettings`.

In this way when defining a standby cluster user can also provide a recover
command inside the StandybConfig.ArchiveRecoverySettings option.

Resolves sorintlab#538
sgotti added a commit to sgotti/stolon that referenced this issue Aug 17, 2018
Rename cluster spec `StandbySettings` to `StandbyConfig`. `StandbyConfig` has
two fields: `StandbySettings` and `ArchiveRecoverySettings`.

In this way when defining a standby cluster user can also provide a recover
command inside the StandybConfig.ArchiveRecoverySettings option.

Resolves sorintlab#538
@sgotti
Copy link
Member

sgotti commented Aug 24, 2018

Resolved by #543

@jonjomckay Feel free to test it and report if if works for you.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants