Skip to content

Conversation

@FxKu
Copy link
Member

@FxKu FxKu commented Feb 27, 2023

In #2187 the flow for configuring Postgres for streams was moved to syncStatefulSet, because it's the only place right now where we restart Postgres on config changes. The restart is required to set wal_level to logical before creating publications and replication slots.

However, syncStatefulSet is not executed during Create. Whem a new cluster is added with stream section we face the same error as before - creation of publication during syncStreams will fail because wal_level has not been adjusted, yet. It happens only during next SYNC when it's too late.

Therefore, this PR proposed to call syncStatefulSet inside Create method, if streams are defined.

In case the sync of statefulset will fail return an error. I moved setting replicationSlots before the syncing of streams to have it set even when there is this error.

@FxKu FxKu added this to the 1.9.1 milestone Feb 27, 2023
@FxKu
Copy link
Member Author

FxKu commented Feb 28, 2023

👍

1 similar comment
@idanovinda
Copy link
Member

👍

@FxKu FxKu merged commit 9973262 into master Feb 28, 2023
@FxKu FxKu deleted the cluster-create-w-streams branch February 28, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants