View Revisions: Issue #6620
Summary | 0006620: Turn on UNLOGGED table mode during initial load into an empty PostgreSQL table | ||
---|---|---|---|
Revision | 2024-10-15 11:03 by pbelov | ||
Steps To Reproduce | |||
Revision | 2024-10-15 11:34 by pbelov | ||
Steps To Reproduce | CREATE 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. |
||
Revision | 2024-10-15 11:03 by pbelov | ||
Additional Information | The 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. |
||
Revision | 2024-10-15 11:34 by pbelov | ||
Additional Information | The 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. |