Here's what he documentation says;
Messages persist in memory or in a database until they cross a threshold of time, typically on the order of days.
... Or wait...
Oops, that was from Simplex, who has a database, that didn't come from Signal's documentation
https://github.com/simplex-chat/simplexmq/blob/master/protocol/overview-tjr.md