Re: Recommendations for partitioning?
От | Alvaro Herrera |
---|---|
Тема | Re: Recommendations for partitioning? |
Дата | |
Msg-id | 20131220155954.GB22570@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: Recommendations for partitioning? (Dave Johansen <davejohansen@gmail.com>) |
Ответы |
Re: Recommendations for partitioning?
Re: Recommendations for partitioning? |
Список | pgsql-performance |
Dave Johansen escribió: > On Thu, Dec 19, 2013 at 10:27 AM, Scott Marlowe <scott.marlowe@gmail.com>wrote: > > That's pretty much it. What I did was to create the new month table > > and day tables, alter my triggers to reflect this, then move the data > > with insert into / select from query for each old day partition. Then > > once their data is moved you can just drop them. Since you changed the > > triggers first those tables are no long taking input so it's usually > > safe to drop them now. > > It would be nice if there was just a "move command", but that seems like > the type of model that we want and we'll probably move to that. Eh. Why can't you just do something like WITH moved AS ( DELETE FROM src WHERE .. RETURNING * ) INSERT INTO dst SELECT * FROM moved; -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-performance по дате отправления: