On 11/24/26 8:04 AM, dinesh kumar wrote:
Hi Adrian,

Thank you for the details.

Since it creates a new file, updates the indexes, and deletes the old files, isn't that still a write operation at the file system level?

 From the documentation snippet you shared:

   - "REPACK copies the contents of the table ... into a new file" (Writes)
   - "...and also creates a new file for each index" (Writes)
  - "It then swaps the old and new files for the table and all the indexes, and deletes the old files." (Writes)

Given all these write operations on disk, shouldn't this activity be restricted inside a READ ONLY transaction?

https://www.postgresql.org/docs/19/sql-set-transaction.html

"The transaction access mode determines whether the transaction is read/write or read-only. Read/write is the default. [...] This is a high-level notion of read-only that does not prevent all writes to disk."


--




--
Adrian Klaver
[email protected]


Reply via email to