Skip to content
This repository was archived by the owner on Jul 22, 2026. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sqliteai/sqlite-sync-dev
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 288db90
Choose a base ref
...
head repository: sqliteai/sqlite-sync-dev
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 586f5d0
Choose a head ref
  • 3 commits
  • 8 files changed
  • 3 contributors

Commits on Jan 30, 2026

  1. refactor(postgres): use palloc in TopMemoryContext for memory allocation

    Replace malloc/free with palloc/pfree in the PostgreSQL dbmem_* abstraction layer. This integrates cloudsync memory management with PostgreSQL's memory context system.
    
    Benefits:
      - Memory tracking via MemoryContextStats() for debugging
      - Automatic cleanup when PostgreSQL connection terminates
      - Consistent memory management across the extension
      - Respects PostgreSQL memory configuration and limits
    andinux committed Jan 30, 2026
    Configuration menu
    Copy the full SHA
    d8b062b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    16d967d View commit details
    Browse the repository at this point in the history
  3. perf(postgres): use SQL template casting for non-PK column types (#4)

    * perf(postgres): use SQL template casting for non-PK column types
    
    Refactor type conversion for non-PK columns to use SQL template casting ($n::typename) instead of per-value SPI_execute_with_args("SELECT $1::typename") calls. This matches the pattern already used for primary key columns.
    
    Changes:
      - sql_postgresql.c: Add format_type() lookup and $n::coltype casting to SQL_BUILD_UPSERT_PK_AND_COL for non-PK column values
      - cloudsync_postgresql.c: Simplify cloudsync_decode_bytea_to_pgvalue() to return base types only (INT8, FLOAT8, TEXT, BYTEA) without SPI casting
      - cloudsync_postgresql.c: Remove lookup_column_type_oid() function
      - Add test 19 (19_uuid_pk_with_unmapped_cols.sql) covering UUID PK with unmapped non-PK types (JSONB, UUID, INET, CIDR) and all CRUD operations: INSERT, UPDATE non-PK, UPDATE mapped cols, DELETE, RESURRECT, UPDATE PK
    
    Performance benefit: Eliminates one SPI_execute call per non-PK column value during payload application, reducing overhead for unmapped PostgreSQL types.
    
    * test(postgres): new tests
    andinux authored Jan 30, 2026
    Configuration menu
    Copy the full SHA
    586f5d0 View commit details
    Browse the repository at this point in the history
Loading