Preserve wal acceptor logs in CI.

And generally make removal of everything-but-logs a bit simpler, with files
staying in place.

Also renames postgres log from 'log' to 'pg.log'.
This commit is contained in:
Arseny Sher
2021-06-15 15:52:08 +03:00
committed by arssher
parent 39c1d4896c
commit 7c5532303e
2 changed files with 3 additions and 12 deletions

View File

@@ -215,20 +215,11 @@ jobs:
# CircleCI artifacts are preserved one file at a time, so skipping
# this step isn't a good idea. If you want to extract the
# pageserver state, perhaps a tarball would be a better idea.
name: Delete pageserver data
name: Delete all data but logs
when: always
command: |
du -sh /tmp/test_output/*
for DIR in /tmp/test_output/*; do
mv $DIR/repo/pageserver.log $DIR/ || true # ignore errors
for PGDIR in $DIR/repo/pgdatadirs/*; do
echo "PGDIR: $PGDIR"
NEW_LOG="${PGDIR##*/}_log"
mv $PGDIR/log "$DIR/$NEW_LOG" || true # ignore errors
done
echo "rm $DIR/repo"
rm -rf $DIR/repo
done
find /tmp/test_output -type f ! -name "pg.log" ! -name "pageserver.log" ! -name "wal_acceptor.log" -delete
du -sh /tmp/test_output/*
- store_artifacts:
path: /tmp/test_output

View File

@@ -339,7 +339,7 @@ impl PostgresNode {
"-D",
self.pgdata().to_str().unwrap(),
"-l",
self.pgdata().join("log").to_str().unwrap(),
self.pgdata().join("pg.log").to_str().unwrap(),
"-w", //wait till pg_ctl actually does what was asked
],
args,