-
Notifications
You must be signed in to change notification settings - Fork 12
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
Large last written lsn cache #177
Merged
Merged
Changes from all commits
Commits
Show all changes
168 commits
Select commit
Hold shift + click to select a range
6c5225e
[smgr_api] [community] smgr_api.patch
lubennikovaav 4dc7b76
[contrib/zenith] contrib_zenith.patch
lubennikovaav 7448697
[walredo] zenith_wal_redo.patch
lubennikovaav 4783dfc
lastWrittenPageLSN.patch
lubennikovaav 0fd9474
Fix GetPage requests right after replaying CREATE DATABASE
hlinnaka c178d58
handle_eviction_of_non_wal_logged_pages.patch
lubennikovaav 3ee8149
[walproposer] wal_proposer.patch
lubennikovaav 782eacf
persist_unlogged_tables.patch
lubennikovaav 31a077b
fix_pg_table_size.patch
lubennikovaav 917462d
[walredo] fix_gin_redo.patch
lubennikovaav 7276b7f
[walredo] fix_brin_redo.patch
lubennikovaav 6d7bafb
speculative_records_workaround.patch
lubennikovaav 87b826f
wallog_t_ctid.patch
lubennikovaav 9f457bf
vacuumlazy_debug_stub.patch
lubennikovaav ac7bd68
[test] zenith_test_evict.patch
lubennikovaav 74ae59f
fix_sequence_wallogging.patch
lubennikovaav e27aaea
Bring back change that got lost in refactoring. silence ReadBuffer_co…
lubennikovaav 6ac8b6e
[contrib/zenith] [refer #225] if insert WAL position points at the en…
knizhnik 8360d74
[walproposer] Create replication slot for walproposer to avoid loose …
knizhnik b9e24d1
[walproposer] Skip absent WAL segment removed by pg_resetwal
lubennikovaav 232d876
[walproposer] Fix breaking out of WalProposerPoll and WaitEventSetWai…
arssher 45e9074
[walproposer] Make it possible to start postgres without reading chec…
knizhnik 5085205
[walproposer] Simplify WL_LATCH_SET testing in the walproposer
ololobus 1f5c11d
[walredo] Add basic support for Seccomp BPF mode
funbringer fb8c2a1
[smgr_api] [contrib/zenith] 1. Do not call mdinit from smgrinit() bec…
knizhnik 15becb6
[walproposer] [contrib/zenith] support zenith_tenant
LizardWizzard 87797bb
[walproposer] Remove graceful termination of COPY during walproposer …
arssher 4319a6f
[walproposer] [contrib/zenith] [refer #395] Do no align sart replicat…
knizhnik 48fc26e
[test] Add contrib/zenith_test_utils with helpers for testing and deb…
lubennikovaav 9dedb55
[walproposer] Change condition for triggering recovery
knizhnik eae6cb8
[contrib/zenith] Use authentication token passed as environment varia…
LizardWizzard 4c15b7c
[contrib/zenith] Fix race condition while WAL-logging page, leading t…
hlinnaka 209d0c0
[walproposer] Rework walkeeper protocol to use libpq (#60)
sharnoff 743848e
Build zenithdb/compute-node:latest in CI (zenithdb/console#125)
ololobus 657c3ed
zenith_regression_tests.patch
lubennikovaav 9310468
Add test function to flush the shared buffer cache.
hlinnaka a4359e6
Basic safekeeper refactoring and bug fixing.
arssher 3287dbb
Rename VCL to epochStartLsn and restart_lsn to truncate_lsn.
arssher 09a8680
[refer #27] Implement shared relsize cache to improve zenith performa…
knizhnik 82d969e
Cleanup walproposer changes from #60
sharnoff 7d06d8f
pass tenant id in connection string to safekeeper
LizardWizzard 6a45e63
Ask pageserver only with LSN's aligned on record boundary.
kelvich ffa97f0
[refer #506] Correctly initialize all fields of WAL page header for f…
knizhnik 3600cce
Add --sync-safekeepers starting standalone walproposer to sync safeke…
knizhnik 7e3d867
Update Dockerfile
ololobus b661532
Fix compiler warnings in walproposer.c
ololobus cc87ff1
Always advance truncateLsn to commitLsn, keeping it on record boundary.
arssher 43dcc39
Minor logging editing.
arssher 40c109b
Fix walproposer starting streaming point.
arssher 3e79e7b
Mark all recovery messages as received by the donor.
arssher 2750bac
Don't FATAL in walproposer when EOF arrives in SS_IDLE state.
arssher 153d0f6
Optimize walproposer starting streaming point.
arssher 7648f05
Silence a compiler warning.
hlinnaka afaad8f
Remove unused functions for reading non-rel pages.
hlinnaka ae5ee63
Misc cleanup in the code that communicates with the page server.
hlinnaka bf4c0cb
Improve the protocol between Postgres and page server.
hlinnaka 3dc6bfb
Silence compiler warning when building without --enable-seccomp
hlinnaka 75dc8ea
Run 'pgindent' on zenith-specific code in contrib/zenith and in walpr…
hlinnaka 316ff47
Silence compiler warning
hlinnaka 2ea36fd
Fix a badly worded comment
hlinnaka fd61df8
Simplify a2e929e by storing starting point in walkeeper itself.
arssher 484ac78
Catch walkeeper ErrorResponse in PQgetCopyData
sharnoff 5edfd25
Use buffered I/O for reading commands from stdin.
hlinnaka 139a5b6
Replace fread() with plain read() and a hand-written buffer.
hlinnaka c4bd89e
Store unlogged tables locally, and replace PD_WAL_LOGGED.
hlinnaka 7a6caaa
Fix queue cleanup in proposer (#93)
petuhovskiy f38fd05
Support read-only nodes
hlinnaka 3642beb
Remove a drop of syncSafekeepers complexity.
arssher 4744ed7
Fix compiler warning.
arssher b9e8a5c
Implement backpressure for compute node to avoid WAL overflow
knizhnik c7ce764
Initialize FSM/VM pages through buffer cache
ololobus 6e5f8d6
Turn off back pressure by default
ololobus d6cb3fa
ShutdownConnection instead of ResetConnection in more places.
arssher bcbf12c
Handle partial writes to stdout in WAL redo process.
hlinnaka a3e992f
Handle keepalives while receiving WAL in recovery.
arssher 1bb6aa9
Fix truncateLsn update (#101)
petuhovskiy b2e8da8
[walproposer] Get rid of SAB_Error after rebase
ololobus d4e813b
Add term history to safekeepers.
arssher 7fb4e66
Clarify the meaning of StandbyReply LSNs used for backpressure
lubennikovaav 3e0c8a3
Use max_replication_apply_lag instead of max_replication_write_lag.
lubennikovaav 2c00fed
Forward pageserver connection string to safekeeper
LizardWizzard 9e50f21
Move backpressure throttling to ProcessInterrupts()
lubennikovaav 41e38c0
Stop building docker images in this repo.
kelvich 9bbc511
[walproposer] Async WAL append (#105)
petuhovskiy 9ba395f
Fix walsender to work with zenith style standbyReply that sends non-z…
lubennikovaav 6d88bd2
Do not copy the obsolete apply_conf binary into Docker image
ololobus 39d07f0
Reorder walproposer code in a more natural order (#112)
petuhovskiy 326dbd7
Simplify walproposer code (#114)
petuhovskiy 85b65e4
Don't change propTerm after quorum is acquired (#107)
petuhovskiy 8e82eae
walproposer renames (#116)
petuhovskiy cb04c36
Report back-pressure trottling status of backend
knizhnik 808848d
Add max_replication_write_lag
knizhnik 27f713e
Do not throttle wal sender
knizhnik 8f9af18
Do no throttle wal sender
knizhnik c2e8404
Don't track acks in walproposer (#119)
petuhovskiy c68dc1f
Silence excessively noisy logging from walproposer.
hlinnaka 8916e66
Extend replication protocol with ZenithFeedback message.
lubennikovaav e7322f1
Allow to join empty safekeeper to existing cluster (#123)
petuhovskiy 0df3071
Use local relation cache for smgr_exists
knizhnik a5db530
Reduce walproposer logging after ca5e7beaf.
arssher c0845f9
Implement cluster size quota for zenith compute node.
lubennikovaav 14aaa50
Revert "Use local relation cache for smgr_exists"
arssher 952a94e
Change the unit of cluster size limit GUC to MB, and other fixes.
hlinnaka d881913
Improve error handling while connecting to page server.
hlinnaka 580c034
Make getpage requests interruptible.
hlinnaka e056fb6
Fix memory leak of messages received from safekeepers.
hlinnaka 8524105
Initialize pgxactoff for walproposer
knizhnik 7b5ee1c
Fix compilation warning after 8524105dc.
arssher d914790
Fix more compiler warnings.
arssher b426ffe
Remove dead code in handling ZenithFeedback part of an AppendResponse.
hlinnaka ecbcefb
Prevent recursive call of XLogBeginInsert
knizhnik d455371
Update src/backend/access/gin/ginfast.c
knizhnik 2c2b362
Expose reading a relation page at a specific LSN (#131)
antons-antons a3709cc
Add backpressure_lsns() function. Fix zenith feedback processing
lubennikovaav 1872ba6
Fix zenith_test_utils linkage on macOS
kelvich 31dc24a
Add warning fr unrecgonized GUCs with zenith prefix
knizhnik ce7ff2d
Count WAL flushes in walreceiver (#139)
petuhovskiy 093aa16
Use local relation cache for smgr_exists
knizhnik 9a2d4ca
Populate relsize cache when relation is created.
hlinnaka 756a01a
Fix pg_table_size() on a view
hlinnaka 5c278ed
Don't set commitLsn to truncateLsn.
arssher 1dc6535
Raise fatal error on failed recovery (#147)
petuhovskiy a260728
Enable dumping corrupt WAL segments (#145)
antons-antons 8481459
Don't hold walproposer WAL in memory (#141)
petuhovskiy 841376a
Add --sysid parameter to initdb
knizhnik d1be792
Add utilities for recovery database fmro WAL
knizhnik 12f4e4e
Calculate wal position in restore_from_wal scripts
knizhnik 8a364c1
Remove absolute pathes from restore_from_wal scripts
knizhnik 5b3852f
Remove absolute pathes from restore_from_wal scripts
knizhnik 4ffb3bd
Update scripts for recovery from WAL
knizhnik cc12d19
Make it possible to specify port and datadir for restore_from_wal
knizhnik 61afbf9
Move recovery scripts to main repo
knizhnik d7c8426
Give up connection attempt to safekeeper after timeout.
arssher 17213ed
Avoid redundand memory allocation and sycnhronization in walredo (#144)
knizhnik 3256ff3
Fix missed include for InRecovery (#149)
knizhnik 223652c
Avoid "bad syscall 39" on assertion failure in WAL redo process.
hlinnaka 3d143d4
Add error context, if replaying a WAL record fails in WAL redo process.
hlinnaka 352e286
Add WARNING for debugging purposes.
hlinnaka d2afbf7
Turn Assertion into elog(ERROR), to help with debugging.
hlinnaka 20c37c0
Fix errors in WAL redo about relpersistence mismatch.
hlinnaka fcd2af7
Don't log 'last written LSN ahead of flushed'.
arssher a13fe64
Perform inmem_smgr cleaup after processing each record (#154)
knizhnik 868e7be
Avoid extending relation in the WAL redo process.
hlinnaka ae5f314
Send timeline_start_lsn in Elected and receive it in VoteResponse mes…
arssher ce30579
Verify basebackup LSN against consensus LSN in walproposer.
arssher d35bd71
Implement pg_database_size():
lubennikovaav 9a9459a
Shut down instance on basebackup LSN mismatch.
arssher d62ec22
Use compute-tools from the new neondatabase Docker Hub repo
ololobus 5a595fd
zenith_test_utils extension: add neon_xlogflush()
yeputons 1db115c
Reduce noise in the logs from inmem_write()
hlinnaka 79af2fa
Use compute_ctl instead of zenith_ctl (#162)
ololobus 038b2b9
Improve error messages on seccomp loading errors.
hlinnaka bb306d9
Rename contrib/zenith to contrib/neon. Rename custom GUCs:
lubennikovaav a424e3c
Rename 'wal_acceptors' GUC to 'safekeepers'
lubennikovaav 64bed04
Cache last written LSN for last updated relations to reduce wait LSN…
knizhnik f96d40b
Store only relfilenode in last written LSN cache
knizhnik c9d8ec7
Add forknum as a part of the lastWrittenPageCacheOid[] key
lubennikovaav beace5d
Undo using of forknumber in last written page LSN cache
knizhnik f27f1fc
Path relNode to zenith_get_request_lsn
knizhnik 37a0325
Fix caching in SetLastWrittenLsn function
knizhnik c871760
Keep last written LSN for each relation chunk to handle uploads of mu…
knizhnik 2e9ce7a
Update contrib/neon/pagestore_smgr.c
knizhnik c977ff5
Adjust max last written LSN of non cached relations in case of evicti…
knizhnik 2e4bf14
Update comments
knizhnik 70c79ef
Update src/backend/access/transam/xlog.c
knizhnik b329959
Update contrib/neon/pagestore_smgr.c
knizhnik a9422b7
Add requested comment
knizhnik 5ae9d59
Merge wih main
knizhnik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, so you don't remove the cache entries for the truncated blocks? Is that ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it is ok: LRU replacement algorithm is used to avoid cache overflow.
And if OID is reused for some other relation, then - see above: nothing critical can happen because of max(relid) assignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Please add a brief comment to explain that.