Truncate data from whole cluster

From: Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Truncate data from whole cluster
Date: 2023-12-20 09:05:52
Message-ID: CAJk5Atah42SXmNFDJmP22XtTeov+aKfSSkzCAAqXYzMe0En-8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all,

I am using postgres 15.2. one leader and one replica. I have multiple dbs
and multiple tables. I want to keep definitions and only want to delete
'data only' from all dbs and tables.

Any command to do that instead of truncating all tables one by one?

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message hubert depesz lubaczewski 2023-12-20 10:23:41 Re: Truncate data from whole cluster
Previous Message SOzcn 2023-12-20 06:14:57 Re: Timestamps in outputs