View Issue Details

IDProjectCategoryView StatusLast Update
0006620SymmetricDSImprovementpublic2024-11-20 21:00
Reporterpbelov Assigned Topbelov  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.15.0 
Target Version3.15.10Fixed in Version3.15.10 
Summary0006620: Turn on UNLOGGED table mode during initial load into an empty PostgreSQL table
DescriptionCurrently the UNLOGGED table mode is not used for initial load into PostgreSQL.
The UNLOGGED mode is helpful in reducing amount of Write-Ahead Logging that PostgreSQL database is doing - because data is recoverable (in the event of failure of the target database , the initial load data can be re-sent from the source).
This mode is estimated to reduce load time by about 10%, which may be significant for very large initial loads.
In case either the source of target table had been already specified as UNLOGGED, this trait should be preserved.
Steps To ReproduceCREATE UNLOGGED TABLE source.test6620(
col1key INTEGER NOT NULL
,col2nullablekey CHAR(3) NULL
,col3 INTEGER NULL
,col4 TIMESTAMPTZ NOT NULL
);
alter TABLE symtest_pgcentral1.test6620 set unlogged;
alter TABLE symtest_pgcentral1.test6620 set logged;
-- Query current mode of a table:
select n.nspname , t.relname, t.relpersistence
from pg_class t join pg_namespace n on n.oid=t.relnamespace and n.nspname = 'symtest_pgcentral1'
where t.relname = 'test6620'.
-- The relpersistence='u' for an unlogged table
-- and relpersistence='p' for a logged table.
Additional InformationThe drawback of the UNLOGGED mode is that the contents of such table are also not replicated (to standby PostgreSQL servers).
This mode is specific to PostgreSQL database and is not present in ANSI/ISO specification.
Oracle database has a similar table-level mode called NO LOGGING, but only applies to the insert statement with the /*+ APPEND */ hint or SQL*Loader. The parents database ARCHIVELOG / NO ARCHIVE LOG configuration is also important in Oracle, but not in PostgreSQL.
TagsNo tags attached.

Activities

pbelov

2024-10-28 17:21

manager   ~0002516

Merged into 3.15

Related Changesets

SymmetricDS: 3.16 793aa7dc

2024-10-31 11:16:38

pbelov


Committer: GitHub Details Diff
6620 The UNLOGGED table mode during initial load into an empty PostgreSQL table (0000207)

* Table-level logging attribute (implemented as UNLOGGED in PostgreSQL)
* Parameter to enable table-level logging manipulation initial.load.defer.table.logging (default =true)
* Update unit test PostgreSqlDdlReaderTest
* New unit test for DTD validation of database schema XML. Plus check for table-level logging.
* Upgrade and Rollback recommendations in user guide
Affected Issues
0006620
mod - symmetric-assemble/src/asciidoc/installation.ad Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/common/ParameterConstants.java Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/extract/SelectFromSymDataSource.java Diff File
mod - symmetric-core/src/main/resources/symmetric-default.properties Diff File
add - symmetric-db/src/main/java/org/jumpmind/db/alter/AddTableLoggingChange.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/alter/ModelComparator.java Diff File
add - symmetric-db/src/main/java/org/jumpmind/db/alter/RemoveTableLoggingChange.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/io/DatabaseXmlUtil.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/model/Table.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/DatabaseInfo.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlBuilder95.java Diff File
mod - symmetric-db/src/test/java/org/jumpmind/db/io/DatabaseXmlUtilTest.java Diff File
add - symmetric-db/src/test/java/org/jumpmind/db/model/DatabaseXmlTest.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultDatabaseWriter.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlReader.java Diff File
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlReaderTest.java Diff File

SymmetricDS: 3.15 2a18fd44

2024-11-20 20:37:46

pbelov


Committer: GitHub Details Diff
0006620: Turn on UNLOGGED table mode during initial load into an empty PostgreSQL table (0000201)

* Logging table attribute, change detection and UNLOGGED Postgresql command
* Parameter initial.load.defer.table.logging=true
* User guide - add cluster upgrade and regular downgrade steps.
Affected Issues
0006620
mod - symmetric-assemble/src/asciidoc/installation.ad Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/common/ParameterConstants.java Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/extract/SelectFromSymDataSource.java Diff File
mod - symmetric-core/src/main/resources/symmetric-default.properties Diff File
add - symmetric-db/src/main/java/org/jumpmind/db/alter/AddTableLoggingChange.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/alter/ModelComparator.java Diff File
add - symmetric-db/src/main/java/org/jumpmind/db/alter/RemoveTableLoggingChange.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/io/DatabaseXmlUtil.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/model/Table.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/DatabaseInfo.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlBuilder95.java Diff File
mod - symmetric-db/src/test/java/org/jumpmind/db/io/DatabaseXmlUtilTest.java Diff File
add - symmetric-db/src/test/java/org/jumpmind/db/model/DatabaseXmlTest.java Diff File
mod - symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultDatabaseWriter.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlReader.java Diff File
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlReaderTest.java Diff File

Issue History

Date Modified Username Field Change
2024-10-15 11:03 pbelov New Issue
2024-10-15 11:03 pbelov Status new => assigned
2024-10-15 11:03 pbelov Assigned To => pbelov
2024-10-15 11:34 pbelov Steps to Reproduce Updated View Revisions
2024-10-15 11:34 pbelov Additional Information Updated View Revisions
2024-10-28 17:21 pbelov Status assigned => resolved
2024-10-28 17:21 pbelov Resolution open => fixed
2024-10-28 17:21 pbelov Fixed in Version => 3.15.10
2024-10-28 17:21 pbelov Note Added: 0002516
2024-10-31 12:00 pbelov Changeset attached => SymmetricDS 3.16 793aa7dc
2024-11-13 20:31 pbelov Status resolved => closed
2024-11-20 21:00 pbelov Changeset attached => SymmetricDS 3.15 2a18fd44