Re: Reduce WAL logging of INSERT SELECT
От | Tom Lane |
---|---|
Тема | Re: Reduce WAL logging of INSERT SELECT |
Дата | |
Msg-id | 14069.1312647818@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Reduce WAL logging of INSERT SELECT (Jaime Casanova <jaime@2ndquadrant.com>) |
Список | pgsql-hackers |
Jaime Casanova <jaime@2ndquadrant.com> writes: > On Sat, Aug 6, 2011 at 11:05 AM, Heikki Linnakangas > <heikki.linnakangas@enterprisedb.com> wrote: >> It can be very helpful when loading a lot of data, so I'm not in favor of >> removing it altogether. Maybe WAL-log the first 10000 rows or such normally, >> and skip WAL after that. Of course, loading 10001 rows becomes the worst >> case then, but something along those lines... > why 10000 rows? Yeah; any particular number is wrong. Perhaps it'd be better to put the behavior under user control. In the case of COPY, where we already have a place to stick random options, you could imagine writing something like COPY ... WITH (bulk) to cue the system that a lot of data is coming in. But I don't see any nice way to do something similar for INSERT/SELECT. I hesitate to suggest a GUC, but something like "SET bulk_load = on" would be pretty straightforward to use in pg_dump for instance. regards, tom lane
В списке pgsql-hackers по дате отправления: