-
Notifications
You must be signed in to change notification settings - Fork 457
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
Implement CLI v2 #7
Conversation
As described in neondatabase/rfcs#5 This doesn't rely on any Postgres modifications, all the commands have been implemented in the most naive way possible, with lots of copying data around. For example, when you initialize a new data directory, we copy the last snapshot on that timeline to the data directory, instead of doing it lazily. Doesn't make use of a Page server either.
Playing with this I can see several areas how CLI v1 and v2 are different:
|
Superseded by #43 |
## Problem Running test_pageserver_restarts_under_workload in POR #7275 I get the following assertion failure in prefetch: ``` #5 0x00005587220d4bf0 in ExceptionalCondition ( conditionName=0x7fbf24d003c8 "(ring_index) < MyPState->ring_unused && (ring_index) >= MyPState->ring_last", fileName=0x7fbf24d00240 "/home/knizhnik/neon.main//pgxn/neon/pagestore_smgr.c", lineNumber=644) at /home/knizhnik/neon.main//vendor/postgres-v16/src/backend/utils/error/assert.c:66 #6 0x00007fbf24cebc9b in prefetch_set_unused (ring_index=1509) at /home/knizhnik/neon.main//pgxn/neon/pagestore_smgr.c:644 #7 0x00007fbf24cec613 in prefetch_register_buffer (tag=..., force_latest=0x0, force_lsn=0x0) at /home/knizhnik/neon.main//pgxn/neon/pagestore_smgr.c:891 #8 0x00007fbf24cef21e in neon_prefetch (reln=0x5587233b7388, forknum=MAIN_FORKNUM, blocknum=14110) at /home/knizhnik/neon.main//pgxn/neon/pagestore_smgr.c:2055 (gdb) p ring_index $1 = 1509 (gdb) p MyPState->ring_unused $2 = 1636 (gdb) p MyPState->ring_last $3 = 1636 ``` ## Summary of changes Check status of `prefetch_wait_for` ## Checklist before requesting a review - [ ] I have performed a self-review of my code. - [ ] If it is a core feature, I have added thorough tests. - [ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard? - [ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section. ## Checklist before merging - [ ] Do not forget to reformat commit message to not include the above checklist --------- Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
As described in neondatabase/rfcs#5
This doesn't rely on any Postgres modifications, all the commands have
been implemented in the most naive way possible, with lots of copying data
around. For example, when you initialize a new data directory, we copy
the last snapshot on that timeline to the data directory, instead of doing
it lazily. Doesn't make use of a Page server either.
Take a look at https://github.com/zenithdb/zenith/blob/laptop-cli-v2/cli-v2-story.md for a little walk-through of how to use this. It's close to the examples given in https://github.com/zenithdb/rfcs/blob/6bbca945327a6cb1b4fc09d987235e7c07589f0c/CLI.md.