Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Feature Request]: Support Temporary Tables with Full Transaction Semantics and No Persistence #3385

Copy link
Copy link

Description

@JinHai-CN
Issue body actions

Problem Statement

Currently, Infinity does not support temporary tables. There are many use cases where users need temporary tables that behave exactly like regular tables but without disk I/O, logging, or persistence — for example, in ETL pipelines, session-scoped temporary data, testing, or caching intermediate results.

Proposed Feature

Introduce temporary tables in Infinity with the following characteristics:

1. Syntax

Create a table using a new TEMPORARY keyword:

CREATE TEMPORARY TABLE table_name (...);

2. Same Operations as Physical Tables

Temporary tables support all standard SQL operations (SELECT, INSERT, UPDATE, DELETE, JOIN, etc.) just like regular persistent tables.

3. No Write-Ahead Log (WAL)

Operations on temporary tables are not logged to disk.

4. No Persistence

Data is lost when the table is dropped or the database restarts. No background flushing or checkpointing.

5. Full Transaction Support

Temporary tables should fully participate in transactions:

Support BEGIN, COMMIT, ROLLBACK

Transaction isolation (e.g., snapshot or serializable) applies to temporary tables as well

Cross-table transactions involving both temporary and physical tables should be allowed (though the temporary table portion won't be durable)

6. No Disk I/O for Operations

All DML/DDL on temporary tables happen purely in RAM, making them extremely fast.

Limitations

  • Temporary tables should respect temporary limits (e.g., max_temporary configuration) to prevent OOM
  • No recovery on restart — that's by design
  • Consider adding TEMPORARY_TABLE_MAX_ROWS or TEMPORARY_TABLE_MAX_SIZE session variable for safety
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.