postgresql/src/backend/commands
Fujii Masao e6d8069522 Make DROP DATABASE command generate less WAL records.
Previously DROP DATABASE generated as many XLOG_DBASE_DROP WAL records
as the number of tablespaces that the database to drop uses. This caused
the scans of shared_buffers as many times as the number of the tablespaces
during recovery because WAL replay of one XLOG_DBASE_DROP record needs
that full scan. This could make the recovery time longer especially
when shared_buffers is large.

This commit changes DROP DATABASE so that it generates only one
XLOG_DBASE_DROP record, and registers the information of all the tablespaces
into it. Then, WAL replay of XLOG_DBASE_DROP record needs full scan of
shared_buffers only once, and which may improve the recovery performance.

Author: Fujii Masao
Reviewed-by: Kirk Jamison, Simon Riggs
Discussion: https://postgr.es/m/CAHGQGwF8YwNH0ZaL+2wjZPkj+ji9UhC+Z4ScnG97WKtVY5L9iw@mail.gmail.com
2019-11-21 21:10:37 +09:00
..
aggregatecmds.c Implement OR REPLACE option for CREATE AGGREGATE. 2019-03-19 01:16:50 +00:00
alter.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
amcmds.c Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
analyze.c Allow setting statistics target for extended statistics 2019-09-11 00:25:51 +02:00
async.c PG_FINALLY 2019-11-01 11:18:03 +01:00
cluster.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
collationcmds.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
comment.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
constraint.c Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
conversioncmds.c Remove dead encoding-conversion functions. 2019-07-05 14:17:27 -04:00
copy.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
createas.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
dbcommands.c Make DROP DATABASE command generate less WAL records. 2019-11-21 21:10:37 +09:00
define.c Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
discard.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
dropcmds.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
event_trigger.c Have LookupFuncName accept NULL argtypes for 0 args 2019-11-12 17:06:58 -03:00
explain.c Represent Lists as expansible arrays, not chains of cons-cells. 2019-07-15 13:41:58 -04:00
extension.c PG_FINALLY 2019-11-01 11:18:03 +01:00
foreigncmds.c Have LookupFuncName accept NULL argtypes for 0 args 2019-11-12 17:06:58 -03:00
functioncmds.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
indexcmds.c Handle interrupts within a transaction context in REINDEX CONCURRENTLY 2019-10-25 10:20:08 +09:00
lockcmds.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
matview.c tableam: Rename wrapper functions to match callback names. 2019-05-23 16:32:36 -07:00
opclasscmds.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
operatorcmds.c Fix inconsistencies and typos in the tree 2019-07-29 12:28:30 +09:00
policy.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
portalcmds.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
prepare.c Fix inconsistencies and typos in the tree, take 9 2019-08-05 12:14:58 +09:00
proclang.c Have LookupFuncName accept NULL argtypes for 0 args 2019-11-12 17:06:58 -03:00
publicationcmds.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
schemacmds.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
seclabel.c Represent Lists as expansible arrays, not chains of cons-cells. 2019-07-15 13:41:58 -04:00
sequence.c Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
statscmds.c Remove last traces of heap_open/close in the tree 2019-10-19 11:18:15 +09:00
subscriptioncmds.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
tablecmds.c Split handling of reloptions for partitioned tables 2019-11-14 12:34:28 +09:00
tablespace.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
trigger.c Fix silly initializations (cosmetic only). 2019-11-13 15:26:54 -05:00
tsearchcmds.c Represent Lists as expansible arrays, not chains of cons-cells. 2019-07-15 13:41:58 -04:00
typecmds.c Avoid using lcons and list_delete_first where it's easy to do so. 2019-07-17 11:15:34 -04:00
user.c Add an enforcement mechanism for global object names in regression tests. 2019-06-29 11:34:00 -04:00
vacuum.c PG_FINALLY 2019-11-01 11:18:03 +01:00
variable.c Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
view.c Allow ALTER VIEW command to rename the column in the view. 2019-11-21 19:55:13 +09:00