neondatabase / neon

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.
https://neon.tech
Apache License 2.0
14.78k stars 430 forks source link

Do not require compute restart to change pageserver connection string #4578

Closed LizardWizzard closed 11 months ago

LizardWizzard commented 1 year ago

Most of the relocation time is spent to stop/start compute endpoints. Lets avoid that.

We can still detach tenant from pageserver compute is being connected to. (I think this is fine, need to discuss it).

At this point reconnections on smgr side should hide the disconnects from user.

When attach is completed we change the connection string and restart compute.

For that we need to add support in postgres to allow changing this config variable with SIGHUP.

Context: https://neondb.slack.com/archives/C03H1K0PGKH/p1687866020116189

jcsp commented 1 year ago

Unassigning self: we think it makes sense for the compute team to do this work, pending @vadim2404 confirming.

knizhnik commented 1 year ago

Pageserver connection string is defined now as PGC_POSTMASTER GUC "neon.pageserver_connstring". To be able to change it with alter system pg_reload_conf it is necessary to change it to PGC_SIGHUP. Is it the only thing which should be done in this ticket? If so, why it was not addressed in 3 month? I can create online PR...

stepashka commented 11 months ago

notes from Nov 6th 2023: this is worked by Sasha in compute team, but for visibility putting 'in progress' in Storage team project too.

vadim2404 commented 11 months ago

@save-buffer has already merged these changes

jcsp commented 11 months ago

A change landed, but it doesn't fully work yet -- keeping this ticket open to track that.

https://github.com/neondatabase/neon/pull/5693

jcsp commented 11 months ago

completed in https://github.com/neondatabase/neon/pull/5693