Skip to content

track other ddl commands in neon_ddl_handler #12719

New issue

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

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

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ruslantalpa
Copy link
Contributor

@ruslantalpa ruslantalpa commented Jul 24, 2025

Problem

The new rest broker service (neon proxy) added in this pr needs a way to be notified of schema changes (similar events to a ddl_command_end trigger) to refresh it's cache. We can't use the trigger+notify approach here because of scale to zero.

Summary of changes

Added a way to track the total number of ddl commands with other_ddl_count; counter in ddlHashTable since we are not interested in specifics, just that the schema changed.

The shape of the json sent to the control plane will look like this

{
  "dbs": [
    ...
  ],
  "roles": [
    ...
  ],
  "other": 15. <--- the new key
}

Copy link

If this PR added a GUC in the Postgres fork or neon extension,
please regenerate the Postgres settings in the cloud repo:

make NEON_WORKDIR=path/to/neon/checkout \
  -C goapp/internal/shareddomain/postgres generate

If you're an external contributor, a Neon employee will assist in
making sure this step is done.

Copy link

github-actions bot commented Jul 24, 2025

8976 tests run: 8327 passed, 0 failed, 649 skipped (full report)


Flaky tests (15)

Postgres 17

Postgres 16

Postgres 15

Postgres 14

Code coverage* (full report)

  • functions: 34.7% (8804 of 25340 functions)
  • lines: 45.8% (71298 of 155614 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
915229b at 2025-07-24T10:38:00.632Z :recycle:

@tristan957
Copy link
Member

I personally would like to see this move into its own extension. neon extension should just become what is necessary to enable serverless Postgres. No need to do any changes yet unless we can all agree.

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.

2 participants