Post gre sql database

ReCloudS 80 Reputation points
2023-05-22T13:36:10.1166667+00:00

Hello ,

we have post gre sql for database and we have been using n8n container is using Postgres as a metadata storage and the storage is getting full by every week .. is there any way we can delete or free up space in azure portal for the postgre sql database ?

Azure Database for PostgreSQL
0 comments No comments
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,542 Reputation points Microsoft Employee Moderator
    2023-05-22T14:38:03.8566667+00:00

    @ReCloudS Welcome to the Microsoft Q&A forum, Thanks for posting your question.

    To free up space in your Azure Database for PostgreSQL from the Azure portal, you can scale up the storage tier of your server. You can do this by selecting your server in the Azure portal, selecting Pricing tier, located in the Settings section, and changing the Storage setting.

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-scale-compute-storage-portal

    You can also identify and remove any data that is no longer needed, such as old records, logs, or temporary data. However, before deleting any data, it is important to take a backup to ensure that you can restore the data if needed and delete data, you can use SQL commands to remove rows from tables or drop tables entirely if no longer needed.

    Additionally, you can optimize your database by running the VACUUM command, using the ANALYZE command, or using the pg_repack extension to reorganize tables and indexes to reduce storage usage. However, these options would need to be executed using a tool such as psql or Azure CLI

    psql -h <server_name>.postgres.database.azure.com -U <username>@<server_name> -d <database_name> -p 5432 -W

    VACUUM FULL my_table;

    Please let me know if you need any additional information.

    Regards

    Geetha


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.