Support several postgres instances on top of a single pageserver.

Each postgres will use its own page cache with associated data
structures. Postgres system_id is used to distinguish instances.
That also means that backup should have valid system_id stashed
somewhere. For now I put '42' as sys_id during S3 restore, but
that ought to be fixed.

Also this commit introduces new way of starting WAL receivers:
postgres can initiate such connection by calling 'callmemaybe $url'
command in the page_service -- that will start appropriate wal-redo
and wal-receiver threads. This way page server may start without
a priori knowledge of compute node addreses.
This commit is contained in:
Stas Kelvich
2021-04-02 21:08:34 +03:00
parent 6eabe17e98
commit 2c308da4d2
12 changed files with 393 additions and 243 deletions

View File

@@ -27,4 +27,4 @@ jobs:
- name: Run test
run: |
cargo test --test test_pageserver -- --nocapture --test-threads=1
cargo test --test test_pageserver -- --nocapture --test-threads=1