0

While reading docs, I came across following:

When LOCAL is used, the client program reads the file and sends its contents to the server. The server creates a copy of the file in the directory where it stores temporary files. See Section B.3.3.5, “Where MySQL Stores Temporary Files”. Lack of sufficient space for the copy in this directory can cause the LOAD DATA LOCAL statement to fail.

I am using AWS RDS MySQL v8.0.28.

I have following 3 questions:

  1. Does MySQL server automatically cleans up the temp file storage without a reboot?
  2. How to find out how much temp file storage is allocated to my instance of database?
  3. How can I increase this temp file storage on AWS RDS instance?
4
  • #1 - Yes. #2 and #3 - ask your hoster.
    – Akina
    Commented Apr 25, 2022 at 4:31
  • @Akina Thanks for reply. For #1, does the cleanup happen after every "load data local infile" completion? Commented Apr 25, 2022 at 8:42
  • For #1, does the cleanup happen after every "load data local infile" completion? Tempfile removing is a step of LOAD DATA execution, and it does not depend on the loading result. Of course, if server hangs/fails then tempfile won't be removed.
    – Akina
    Commented Apr 25, 2022 at 10:09
  • On Linux(etc), a reboot clears all of "/tmp". However, MySQL may or may not be using that directory for "temp" stuff; see SHOW VARIABLES LIKE 'tmpdir'; That is, MySQL's tmpdir may or may not be cleared even on a reboot. (All of this is mostly irrelevant to the real question.)
    – Rick James
    Commented Apr 25, 2022 at 18:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.