mirror of
https://github.com/neondatabase/neon.git
synced 2026-08-12 09:19:39 +00:00
* TenantConfigRequest now supports tenant_id as hex string input instead of bytes array * Config file is truncated in each creation/update
This commit is contained in:
@@ -133,3 +133,28 @@ tenant_config={checkpoint_distance = 10000, compaction_target_size = 1048576}"""
|
||||
"pitr_interval": 2592000,
|
||||
}.items()
|
||||
)
|
||||
|
||||
# update the config with very short config and make sure no trailing chars are left from previous config
|
||||
env.neon_cli.config_tenant(
|
||||
tenant_id=tenant,
|
||||
conf={
|
||||
"pitr_interval": "1 min",
|
||||
},
|
||||
)
|
||||
|
||||
# restart the pageserver and ensure that the config is still correct
|
||||
env.pageserver.stop()
|
||||
env.pageserver.start()
|
||||
|
||||
with closing(env.pageserver.connect()) as psconn:
|
||||
with psconn.cursor(cursor_factory=psycopg2.extras.RealDictCursor) as pscur:
|
||||
pscur.execute(f"show {tenant}")
|
||||
res = pscur.fetchone()
|
||||
log.info(f"after restart res: {res}")
|
||||
assert all(
|
||||
i in res.items()
|
||||
for i in {
|
||||
"compaction_period": 20,
|
||||
"pitr_interval": 60,
|
||||
}.items()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user