| 252 | } |
| 253 | |
| 254 | static bool db_postgres_vacuum(struct db *db) |
| 255 | { |
| 256 | PGresult *res; |
| 257 | |
| 258 | /* This can use a lot of diskspacem breaking CI! */ |
| 259 | if (getenv("LIGHTNINGD_POSTGRES_NO_VACUUM") |
| 260 | && streq(getenv("LIGHTNINGD_POSTGRES_NO_VACUUM"), "1")) |
| 261 | return true; |
| 262 | |
| 263 | res = PQexec(db->conn, "VACUUM FULL;"); |
| 264 | if (PQresultStatus(res) != PGRES_COMMAND_OK) { |
| 265 | db->error = tal_fmt(db, "VACUUM command failed: %s", |
| 266 | PQerrorMessage(db->conn)); |
| 267 | PQclear(res); |
| 268 | return false; |
| 269 | } |
| 270 | PQclear(res); |
| 271 | return true; |
| 272 | } |
| 273 | |
| 274 | static bool db_postgres_rename_column(struct db *db, |
| 275 | const char *tablename, |
nothing calls this directly
no outgoing calls
no test coverage detected