RE: Implement UNLOGGED clause for COPY FROM
От | tsunakawa.takay@fujitsu.com |
---|---|
Тема | RE: Implement UNLOGGED clause for COPY FROM |
Дата | |
Msg-id | TYAPR01MB29906AA32A73523EF0802264FE540@TYAPR01MB2990.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: Implement UNLOGGED clause for COPY FROM (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: Implement UNLOGGED clause for COPY FROM
(Amit Kapila <amit.kapila16@gmail.com>)
|
Список | pgsql-hackers |
Hello, I think it's worth thinking about a sophisticated feature like Oracle's UNRECOVERABLE data loading (because SQL Server'sBCP load utility also has such a feature, but for an empty table), how about an easier approach like MySQL? I expectthis won't complicate Postgres code much. The customer is using Oracle RAC for high availability of a data warehouse. Then, I think they can use the traditional shareddisk-based HA clustering, not the streaming replication when they migrate to Postgres. They load data into the data warehouse with the nightly ETL or ELT. The loading window is limited, so they run multipleconcurrent loading sessions, with the transaction logging off. They probably use all resources for the data loadingduring that period. Then, you might think "How about turning fsync and full_page_writes to off?" But the customer doesn't like to be worriedabout the massive amount of WAL generated during the loading. OTOH, the latest MySQL 8.0.21 introduced the following feature. This is for the initial data loading into a new databaseinstance, though. https://dev.mysql.com/doc/refman/8.0/en/innodb-redo-log.html#innodb-disable-redo-logging -------------------------------------------------- Disabling Redo Logging As of MySQL 8.0.21, you can disable redo logging using the ALTER INSTANCE DISABLE INNODB REDO_LOG statement. This functionalityis intended for loading data into a new MySQL instance. Disabling redo logging speeds up data loading by avoidingredo log writes and doublewrite buffering. Warning This feature is intended only for loading data into a new MySQL instance. Do not disable redo logging on a production system.It is permitted to shutdown and restart the server while redo logging is disabled, but an unexpected server stoppagewhile redo logging is disabled can cause data loss and instance corruption. Attempting to restart the server after an unexpected server stoppage while redo logging is disabled is refused with the followingerror: [ERROR] [MY-013578] [InnoDB] Server was killed when Innodb Redo logging was disabled. Data files could be corrupt. You can try to restart the database with innodb_force_recovery=6 In this case, initialize a new MySQL instance and start the data loading procedure again. -------------------------------------------------- Following this idea, what do you think about adding a new value "none" to wal_level, where no WAL is generated? The settingof wal_level is recorded in pg_control. The startup process can see the value and reject recovery after abnormalshutdown, emitting a message similar to MySQL's. Just a quick idea. I hope no devil will appear in the details. Regards Takayuki Tsunakawa
В списке pgsql-hackers по дате отправления:
Предыдущее
От: Masahiko SawadaДата:
Сообщение: Re: display offset along with block number in vacuum errors