File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#ifndef DUCKDB_PATCH_VERSION
2- #define DUCKDB_PATCH_VERSION " 3-dev132 "
2+ #define DUCKDB_PATCH_VERSION " 3-dev136 "
33#endif
44#ifndef DUCKDB_MINOR_VERSION
55#define DUCKDB_MINOR_VERSION 4
88#define DUCKDB_MAJOR_VERSION 1
99#endif
1010#ifndef DUCKDB_VERSION
11- #define DUCKDB_VERSION " v1.4.3-dev132 "
11+ #define DUCKDB_VERSION " v1.4.3-dev136 "
1212#endif
1313#ifndef DUCKDB_SOURCE_ID
14- #define DUCKDB_SOURCE_ID " 9c1f71da3a "
14+ #define DUCKDB_SOURCE_ID " 136dd6ada5 "
1515#endif
1616#include " duckdb/function/table/system_functions.hpp"
1717#include " duckdb/main/database.hpp"
Original file line number Diff line number Diff line change @@ -118,6 +118,15 @@ void SingleFileTableDataWriter::FinalizeTable(const TableStatistics &global_stat
118118 if (!v1_0_0_storage) {
119119 options.emplace (" v1_0_0_storage" , v1_0_0_storage);
120120 }
121+
122+ // If there is a context available, bind indexes before serialization.
123+ // This is necessary so that buffered index operations are replayed before we checkpoint, otherwise
124+ // we would lose them if there was a restart after this.
125+ if (context && context->transaction .HasActiveTransaction ()) {
126+ info.BindIndexes (*context);
127+ }
128+ // FIXME: If we do not have a context, however, the unbound indexes have to be serialized to disk.
129+
121130 auto index_storage_infos = info.GetIndexes ().SerializeToDisk (context, options);
122131
123132 auto debug_verify_blocks = DBConfig::GetSetting<DebugVerifyBlocksSetting>(GetDatabase ());
You can’t perform that action at this time.
0 commit comments