Subject | Is this a normal behaviour for GTT? |
---|---|
Author | |
Post date | 2019-04-04T08:23:14Z |
Hello.
After few server crashes with low disk space we've found out that in the temporary directory there are many huge files for global temporary tables - fb_table_xxxxx.
We use GTT created with ON COMMIT DELETE ROWS.
We've noticed that for every GTT in the database only 1 file is created and all connections use it. There aren't separate files for different transactions or connections. After committing the transactions the files grow in size and keep getting bigger and bigger until they eat all disk space and server crash..
The only way to delete them is to close all active connections - but we have many users and simultaneous connections from different apps all the time.
The files are kept even if there is only an active connections but no active transactions - for example web API server with connection pool.
We are using SuperServer on Windows. Tested with 2.5.2 / 2.5.7 / 2.5.8
So I have some questions:
Is it normal to have only one file for a GTT for all connections/transactions?
Is normal to keep old data in the file when the GTT is declared with ON COMMIT DELETE ROWS and the transaction that inserted the data is committed and closed?
Is it normal for the file to persist even if there are no active transactions at all? Only connections.
What we can do to avoid the huge disk usage by the temporary files in a situation where we always have active connections to the database?