*8264* Fixed upgrade and temp files transition for PostgreSQL