From c012a71decf65fd91e4179bc02b7b24cb379c54c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 13 Oct 2021 14:16:28 +1030 Subject: [PATCH] CI: suppress postgres vaccuuming. ``` [gw1] [ 98%] PASSED tests/test_wallet.py::test_hsmtool_dump_descriptors tests/test_wallet.py::test_fundchannel_listtransaction [gw0] [ 98%] PASSED tests/test_plugin.py::test_channel_opened_notification tests/test_wallet.py::test_hsmtool_generatehsm [gw0] [ 98%] PASSED tests/test_wallet.py::test_hsmtool_generatehsm tests/test_wallet.py::test_withdraw_nlocktime_fuzz [gw1] [ 98%] ERROR tests/test_wallet.py::test_fundchannel_listtransaction tests/test_wallet.py::test_fundchannel_listtransaction tests/test_wallet.py::test_withdraw_nlocktime_fuzz tests/test_wallet.py::test_fundchannel_listtransaction [gw0] [ 99%] ERROR tests/test_wallet.py::test_withdraw_nlocktime_fuzz tests/test_wallet.py::test_multiwithdraw_simple [gw1] [ 99%] ERROR tests/test_wallet.py::test_fundchannel_listtransaction tests/test_wallet.py::test_withdraw_nlocktime tests/test_wallet.py::test_multiwithdraw_simple tests/test_wallet.py::test_withdraw_nlocktime tests/test_wallet.py::test_multiwithdraw_simple tests/test_wallet.py::test_withdraw_nlocktime [gw0] [ 99%] ERROR tests/test_wallet.py::test_multiwithdraw_simple tests/test_wallet.py::test_repro_4258 [gw1] [ 99%] ERROR tests/test_wallet.py::test_withdraw_nlocktime ... 2021-10-12 06:36:09.203 UTC [224552] STATEMENT: SELECT version FROM version LIMIT 1 2021-10-12 06:36:09.566 UTC [224523] PANIC: could not write to file "pg_wal/xlogtemp.224523": No space left on device 2021-10-12 06:36:09.566 UTC [224523] STATEMENT: VACUUM FULL; Error vacuuming db: BEGIN command failed: PANIC: could not write to file "pg_wal/xlogtemp.224523": No space left on device server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. ``` --- .github/scripts/build.sh | 1 + wallet/db_postgres.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh index 861f30b83..f74f2f646 100755 --- a/.github/scripts/build.sh +++ b/.github/scripts/build.sh @@ -19,6 +19,7 @@ export TEST_NETWORK=${NETWORK:-"regtest"} export TIMEOUT=900 export VALGRIND=${VALGRIND:-0} export FUZZING=${FUZZING:-0} +export LIGHTNINGD_POSTGRES_NO_VACUUM=1 pip3 install --user -U \ -r requirements.lock diff --git a/wallet/db_postgres.c b/wallet/db_postgres.c index 29920a358..973097fe1 100644 --- a/wallet/db_postgres.c +++ b/wallet/db_postgres.c @@ -254,6 +254,14 @@ static void db_postgres_teardown(struct db *db) static bool db_postgres_vacuum(struct db *db) { PGresult *res; + +#if DEVELOPER + /* This can use a lot of diskspacem breaking CI! */ + if (getenv("LIGHTNINGD_POSTGRES_NO_VACUUM") + && streq(getenv("LIGHTNINGD_POSTGRES_NO_VACUUM"), "1")) + return true; +#endif + res = PQexec(db->conn, "VACUUM FULL;"); if (PQresultStatus(res) != PGRES_COMMAND_OK) { db->error = tal_fmt(db, "BEGIN command failed: %s",