Skip site navigation (1) Skip section navigation (2)

Re: CLONE TABLE DATA TO <new_table>

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CLONE TABLE DATA TO <new_table>
Date: 2012-01-13 13:12:16
Message-ID: CA+TgmoaGC4LG3Haut7d6tgKm17HhB2SbA73J-JG2nps3_b1Hpg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Jan 13, 2012 at 5:56 AM, Marc Mamin <M(dot)Mamin(at)intershop(dot)de> wrote:
> I wonder if it would be possible to have a fast table clone function (data
> only) while copying the corresponding data files
>
> instead of using the "CREATE TABLE AS"  way.
>
> pg_upgrade seems to have such a mechanisms, though it requires to first stop
> the server...
>
> This would of course require to lock the complete table and ensure that all
> latest changes are flushed to the plates.

I think it would be possible to implement this.  In fact, it could
probably be done as a contrib module.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

pgsql-hackers by date

Next:From: Marc MaminDate: 2012-01-13 13:25:22
Subject: Re: CLONE TABLE DATA TO <new_table>
Previous:From: Greg SmithDate: 2012-01-13 13:10:27
Subject: Re: pgbench post-connection command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group