Skip to content

Restore with open database #104

Open
@Brandejs

Description

@Brandejs

Hi.

I came across your instrument and I love it. Thank you in advance for all the hard work you've done with this.

I would like to make one comment here about restoration.

If I am creating a backup of the database (including the schema). So when I perform a restore, the UI shows that the restore went fine, even though it didn't.

--data-only=no --schema-only=no --clean=yes --if-exists-no --create=yes --no-comments=yes

One of the erorr I'm struggling with is.

ERROR:  cannot drop the currently open database
STATEMENT:  DROP DATABASE IF EXISTS my_database;

This essentially makes the restore fail. And no restore will occur. But in the UI it is shown as a success.

Ideally, it would be possible to terminate the active connection before starting the recovery?
eg.

SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions