# `ALTER CONNECTION` - Associated: - https://github.com/MaterializeInc/database-issues/issues/5128 ## Context A `CONNECTION` must be valid for a source to ingest data--however, in our current scheme, `CONNECTION`s are immutable so any change to the service hosting the source permanently wedges the source in Materialize. This is undesirable because the `DROP`/`CREATE` cycle for a source can be very painful for users because of rehydration. ## Goals Allow users to modify a `CONNECTION` s/t they can repair the TCP connection between MZ and their services. ## Non-Goals Allow users to meticulously control their sources' state changes. ## Overview We can perform a process similar to `ALTER SOURCE` wherein we update some state in memory, re-plan something, update it in the catalog, and then communicate the updated state throughout the system. ## Detailed description 1. Parse `ALTER CONNECTION AS (KAFKA|POSTGRES) SET