public inbox for [email protected]help / color / mirror / Atom feed
Regarding vacuum freeze locking mechanism 3+ messages / 3 participants [nested] [flat]
* Regarding vacuum freeze locking mechanism @ 2024-07-18 05:27 Durgamahesh Manne <[email protected]> 2024-07-18 05:28 ` Re: Regarding vacuum freeze locking mechanism Kashif Zeeshan <[email protected]> 2024-07-18 05:53 ` Re: Regarding vacuum freeze locking mechanism David G. Johnston <[email protected]> 0 siblings, 2 replies; 3+ messages in thread From: Durgamahesh Manne @ 2024-07-18 05:27 UTC (permalink / raw) To: [email protected]; +Cc: [email protected] Hi Do new inserts block while performing vacuum freeze operations ? when autovacuum runs , it will freeze the transaction ID (TXID) of the table it's working on. This means that any transactions that started before autovacuum began will be allowed to complete.but new transactions will be blocked until the autovacuum finishes. Could you please provide more clarity on this? Which lock triggers on the tables are being used by freeze? Your response is highly appreciated Regards, Durga Mahesh ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Regarding vacuum freeze locking mechanism 2024-07-18 05:27 Regarding vacuum freeze locking mechanism Durgamahesh Manne <[email protected]> @ 2024-07-18 05:28 ` Kashif Zeeshan <[email protected]> 1 sibling, 0 replies; 3+ messages in thread From: Kashif Zeeshan @ 2024-07-18 05:28 UTC (permalink / raw) To: Durgamahesh Manne <[email protected]>; +Cc: [email protected]; [email protected] Hi On Thu, Jul 18, 2024 at 10:26 AM Durgamahesh Manne < [email protected]> wrote: > Hi > > Do new inserts block while performing vacuum freeze operations ? > Generally, VACUUM FREEZE does not block inserts as PG uses Multi-Version Concurrency Control (MVCC) which allows multiple transactions to operate on the same table without interfering with each other. > > when autovacuum runs , it will freeze the transaction ID (TXID) of the > table it's working on. This means that any transactions that started before > autovacuum began will be allowed to complete.but new transactions will be > blocked until the autovacuum finishes. > > Could you please provide more clarity on this? Which lock triggers on the > tables are being used by freeze? > > Your response is highly appreciated > > Regards, > Durga Mahesh > > > ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Regarding vacuum freeze locking mechanism 2024-07-18 05:27 Regarding vacuum freeze locking mechanism Durgamahesh Manne <[email protected]> @ 2024-07-18 05:53 ` David G. Johnston <[email protected]> 1 sibling, 0 replies; 3+ messages in thread From: David G. Johnston @ 2024-07-18 05:53 UTC (permalink / raw) To: Durgamahesh Manne <[email protected]>; +Cc: [email protected] <[email protected]>; [email protected] <[email protected]> On Wednesday, July 17, 2024, Durgamahesh Manne <[email protected]> wrote: > when autovacuum runs , it will freeze the transaction ID (TXID) of the > table it's working on. > This statement is incorrect. A table as a whole does not have a txid. Freezing makes it so individual tuples get assigned an always-in-the-past txid. Then, the table can recompute how far away its furthest back txid is from being considered in-the-future. That gap should increase since the furthest away txids were the ones being frozen. Inserts might get delayed a brief moment if it just happens the page they want to insert onto is presently being worked on. But the odds there seem low. David J. ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-07-18 05:53 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-07-18 05:27 Regarding vacuum freeze locking mechanism Durgamahesh Manne <[email protected]> 2024-07-18 05:28 ` Kashif Zeeshan <[email protected]> 2024-07-18 05:53 ` David G. Johnston <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox