public inbox for [email protected]
help / color / mirror / Atom feedFrom: PetSerAl <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: [email protected]
Subject: Re: About backups
Date: Thu, 29 Jan 2026 22:04:25 +0300
Message-ID: <CAKygsHQutckTNjVaxhOKmP3x8C-dG6C-RiR8XapEo8Ozng1nhg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAKygsHTWYHSE+UkNb0dzRXOOsm5tu=BZJ0SH0qAuCvSw2U8GjQ@mail.gmail.com>
<[email protected]>
On Thu, Jan 29, 2026 at 9:37 PM Adrian Klaver <[email protected]> wrote:
> The window for this sort of thing isn't very large,
That window can be arbitrary large. It includes time waiting for locks
to be released from tables of interest.
--to reduce deadlocks take strongest lock first
--TRUNCATE requare ACCESS EXCLUSIVE
LOCK tablename;
--large amount of work
SELECT pg_sleep(10);
TRUNCATE tablename;
Now you have +10 seconds for the window for tablename and all
following tables in lock order.
IMHO, hidden data loss from TRUNCATE is much more sinister, than error
from ALTER TABLE.
view thread (10+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: About backups
In-Reply-To: <CAKygsHQutckTNjVaxhOKmP3x8C-dG6C-RiR8XapEo8Ozng1nhg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox