Update docs

This commit is contained in:
Bojan Serafimov
2022-06-20 13:29:14 -04:00
parent 1303cf77a3
commit 0a59884b75
2 changed files with 6 additions and 10 deletions

View File

@@ -585,9 +585,6 @@ impl PageServerHandler {
info!("flushing layers");
datadir_timeline.tline.checkpoint(CheckpointConfig::Flush)?;
// TODO Wait for s3 upload to complete
// info!("uploading layers");
info!("done");
Ok(())
}
@@ -630,9 +627,6 @@ impl PageServerHandler {
info!("flushing layers");
datadir_timeline.tline.checkpoint(CheckpointConfig::Flush)?;
// TODO Wait for s3 upload to complete
// info!("uploading layers");
info!("done");
Ok(())
}
@@ -944,6 +938,9 @@ impl postgres_backend::Handler for PageServerHandler {
// Import the `base` section (everything but the wal) of a basebackup.
// Assumes the tenant already exists on this pageserver.
//
// Files are scheduled to be persisted to remote storage, and the
// caller should poll the http api to check when that is done.
//
// Example import command:
// 1. Get start/end LSN from backup_manifest file
// 2. Run:
@@ -963,6 +960,9 @@ impl postgres_backend::Handler for PageServerHandler {
pgb.write_message_noflush(&BeMessage::CommandComplete(b"SELECT 1"))?;
} else if query_string.starts_with("import wal ") {
// Import the `pg_wal` section of a basebackup.
//
// Files are scheduled to be persisted to remote storage, and the
// caller should poll the http api to check when that is done.
let (_, params_raw) = query_string.split_at("import wal ".len());
let params = params_raw.split_whitespace().collect::<Vec<_>>();
ensure!(params.len() == 4);

View File

@@ -21,8 +21,6 @@ def test_import_from_vanilla(test_output_dir, pg_bin, vanilla_pg, neon_env_build
vanilla_pg.safe_psql('''create table t as select 'long string to consume some space' || g
from generate_series(1,300000) g''')
assert vanilla_pg.safe_psql('select count(*) from t') == [(300000, )]
# ensure that relation is larger than 1GB to test multisegment restore
# assert vanilla_pg.safe_psql("select pg_relation_size('t')")[0][0] > 1024 * 1024 * 1024
# Take basebackup
basebackup_dir = os.path.join(test_output_dir, "basebackup")
@@ -98,7 +96,6 @@ def test_import_from_vanilla(test_output_dir, pg_bin, vanilla_pg, neon_env_build
import_tar(base_tar, wal_tar)
# Wait for data to land in s3
env.pageserver.safe_psql(f"checkpoint {tenant.hex} {timeline.hex}")
wait_for_last_record_lsn(client, tenant, timeline, lsn_from_hex(end_lsn))
wait_for_upload(client, tenant, timeline, lsn_from_hex(end_lsn))
@@ -178,7 +175,6 @@ def test_import_from_pageserver(test_output_dir, pg_bin, vanilla_pg, neon_env_bu
])
# Wait for data to land in s3
env.pageserver.safe_psql(f"checkpoint {tenant.hex} {timeline}")
wait_for_last_record_lsn(client, tenant, UUID(timeline), lsn_from_hex(lsn))
wait_for_upload(client, tenant, UUID(timeline), lsn_from_hex(lsn))