Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mavenPassword=YourPassword
# here-naksha-lib-psql/src/commonMain/kotlin/naksha/psql/LibPsql.kt (adminVersion property)
# Warning: Only update LibPsql version, if there is a change in SQL functions!
# The reason is, that this version is encoded in the database, and when updated, forced an upgrade!
version=3.0.0-beta.30
version=3.0.0-beta.31

org.gradle.jvmargs=-Xmx12g
kotlin.code.style=official
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ servers:
info:
title: "Naskha Hub-API"
description: "Naksha Hub-API is a REST API to provide simple access to geo data."
version: "3.0.0-beta.30"
version: "3.0.0-beta.31"

security:
- AccessToken: [ ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class NakshaVersion(
* The current version as string to constant usage cases.
* @since 3.0
*/
const val CURRENT = "3.0.0-beta.30"
const val CURRENT = "3.0.0-beta.31"
// WARNING: Do not update this property manually, it is automatically modified when building!
// Edit version only in `gradle.properties` file, which is used as well to create artifacts!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,6 @@ abstract class PgAdminMap internal constructor(
val config_version = config.version
val psql_version = if (config_version != null) NakshaVersion.of(config_version) else adminVersion

// This only creates the logical structure, no database access is yet done!
transactions = PgNakshaTransactions(this)
dictionaries = PgNakshaDictionaries(this)
maps = PgNakshaMaps(this)

// Switch to admin context.
val conn = storage.newConnection(Naksha.adminOptions, false)
conn.use {
Expand Down Expand Up @@ -245,6 +240,13 @@ SELECT basics.*, procs.* FROM basics, procs;
has_naksha_storage_id = cursor.column("has_naksha_storage_id") as Boolean?
has_naksha_storage_number = cursor.column("has_naksha_storage_number") as Boolean?
}

// This only creates the logical structure, no database access is yet done!
// Beware: We need to do this here, because `PgCollection` back-refers to `maxTupleSize` !
transactions = PgNakshaTransactions(this)
dictionaries = PgNakshaDictionaries(this)
maps = PgNakshaMaps(this)

if (admin_schema_oid == null) {
if (!doCreate) throw forbidden("Creation of admin-map needed, but forbidden by config")
logger.info("Install Naksha admin-map in version $psql_version for storage $id / $number")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ open class PgTable(
) {

companion object PgTableCompanion {
private const val toast_tuple_target: Int = 32736

/**
* Tests if this is any HEAD table _(either root or a performance-partition)_.
* @param name the table name.
Expand Down Expand Up @@ -203,6 +201,8 @@ open class PgTable(
//
// Now, PostgresQL maximum page size is 32768 (configurable at compile time), therefore, setting TOAST_TUPLE_TARGET to 32767
// will ensure that whatever size a page is, PostgresQL will try to insert the row completely, before falling back to TOAST !
val map = collection.map;
val toast_tuple_target = if (map is PgAdminMap) map.maxTupleSize else map.storage.adminMap.maxTupleSize;

// Copy to stack, makes possible for the compiler to remember when values are not null!
val partitionCount = this.partitionCount
Expand Down
Loading