Reputation: 1322
In postgres 9.3, the COPY FROM ... STDIN;
command is by far the quickest way to insert bulk data. Does this come at the cost of not writing these inserted rows to the transaction log? We're using Write-Ahead Logging to update secondary servers so it is important that it does.
Upvotes: 1
Views: 1320
Reputation: 324851
COPY
most certainly does write to WAL (unless you're COPY
ing to an UNLOGGED
or TEMPORARY
table, of course).
Data loaded with COPY
gets replicated normally.
About the only thing you can do that isn't properly replicated is write to a hash index, and the documentation for those is covered in warnings. Personally I'd like to just remove that feature.
Upvotes: 3