When a layer is put into editing mode , all operations performed through the form—such as inserting, updating, or deleting records—are not written directly to the data source.
QGIS uses an edit buffer, an in‑memory structure that:
Warning
The contents of the buffer are temporary: if the editing session ends without saving, the buffer is discarded.
Saving occurs when the user clicks Save Layer Edits
. At this stage, QGIS performs a commit of the edit buffer to the underlying data source (GeoPackage, Shapefile, PostGIS, etc.).
During the commit:
If validation succeeds, the buffer is cleared and the dataset is updated.
Caution
Errors are displayed in a banner within the map canvas. However, the banner may not always be visible when some panels are in a floating (undocked) state, which can partially cover or obscure the map canvas.
Make sure to check the map canvas if error messages are not immediately visible.
Tip
In case of an error, to understand its cause it is necessary to locate the corresponding message directly within the trigger section of the table associated with the form where the error occurred.
When editing mode is disabled
, QGIS prompts the user to either:
If the user chooses not to save, QGIS performs a rollback:
This process is similar to rolling back a transaction in a relational database.
When a layer is part of a relational structure (e.g., a GeoPackage with related tables), forms may include sub‑forms for editing child records.
Technically:
At the end of a successful commit:
The dataset now reflects the final state of the editing session.