Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-04 Thread Robert Haas
On Thu, Apr 3, 2014 at 7:26 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 04/01/2014 08:39 PM, Heikki Linnakangas wrote: On 03/07/2014 05:36 AM, Tom Lane wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: Do you think is difficult to implement ALTER

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Heikki Linnakangas
On 04/01/2014 08:58 PM, Andres Freund wrote: On 2014-04-01 12:56:04 -0500, Jim Nasby wrote: On 3/4/14, 8:50 AM, Andres Freund wrote: Can't that be solved by just creating the permanent relation in a new relfilenode? That's equivalent to a rewrite, yes, but we need to do that for anything but

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Andres Freund
On 2014-04-03 13:38:29 +0300, Heikki Linnakangas wrote: On 04/01/2014 08:58 PM, Andres Freund wrote: On 2014-04-01 12:56:04 -0500, Jim Nasby wrote: On 3/4/14, 8:50 AM, Andres Freund wrote: Can't that be solved by just creating the permanent relation in a new relfilenode? That's equivalent to

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Heikki Linnakangas
On 04/03/2014 01:44 PM, Andres Freund wrote: On 2014-04-03 13:38:29 +0300, Heikki Linnakangas wrote: On 04/01/2014 08:58 PM, Andres Freund wrote: On 2014-04-01 12:56:04 -0500, Jim Nasby wrote: On 3/4/14, 8:50 AM, Andres Freund wrote: Can't that be solved by just creating the permanent

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Andres Freund
On 2014-04-01 20:39:35 +0300, Heikki Linnakangas wrote: On 03/07/2014 05:36 AM, Tom Lane wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: Do you think is difficult to implement ALTER TABLE ... SET UNLOGGED too? Thinking in a scope of one GSoC, of course. I

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Heikki Linnakangas
On 04/01/2014 08:39 PM, Heikki Linnakangas wrote: On 03/07/2014 05:36 AM, Tom Lane wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: Do you think is difficult to implement ALTER TABLE ... SET UNLOGGED too? Thinking in a scope of one GSoC, of course. I think

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Andres Freund
On 2014-04-03 14:26:50 +0300, Heikki Linnakangas wrote: On 04/01/2014 08:39 PM, Heikki Linnakangas wrote: On 03/07/2014 05:36 AM, Tom Lane wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: Do you think is difficult to implement ALTER TABLE ... SET UNLOGGED too?

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Andres Freund
On 2014-04-03 13:38:29 +0300, Heikki Linnakangas wrote: On 04/01/2014 08:58 PM, Andres Freund wrote: On 2014-04-01 12:56:04 -0500, Jim Nasby wrote: On 3/4/14, 8:50 AM, Andres Freund wrote: Can't that be solved by just creating the permanent relation in a new relfilenode? That's equivalent to

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Heikki Linnakangas
On 04/03/2014 02:41 PM, Andres Freund wrote: On 2014-04-03 13:38:29 +0300, Heikki Linnakangas wrote: On 04/01/2014 08:58 PM, Andres Freund wrote: On 2014-04-01 12:56:04 -0500, Jim Nasby wrote: On 3/4/14, 8:50 AM, Andres Freund wrote: Can't that be solved by just creating the permanent

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Andres Freund
On 2014-04-03 15:02:27 +0300, Heikki Linnakangas wrote: On 04/03/2014 02:41 PM, Andres Freund wrote: On 2014-04-03 13:38:29 +0300, Heikki Linnakangas wrote: On 04/01/2014 08:58 PM, Andres Freund wrote: On 2014-04-01 12:56:04 -0500, Jim Nasby wrote: On 3/4/14, 8:50 AM, Andres Freund wrote:

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-03 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: No-one's replied yet, but perhaps the worry is that after you've written the commit record, you have to go ahead with removing/creating the init fork, and that is seen as too risky. If a creat() or unlink() call fails, that will have to be

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-02 Thread Fabrízio de Royes Mello
On Tue, Apr 1, 2014 at 1:40 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-01 13:37:57 -0300, Fabrízio de Royes Mello wrote: In the GSoC proposal page [1] I received some suggestions to strech goals: * ALTER TABLE name SET UNLOGGED. This is essentially the reverse of the core

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-01 Thread Fabrízio de Royes Mello
On Fri, Mar 7, 2014 at 12:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: Do you think is difficult to implement ALTER TABLE ... SET UNLOGGED too? Thinking in a scope of one GSoC, of course. I think it's basically the

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-01 Thread Andres Freund
On 2014-04-01 13:37:57 -0300, Fabrízio de Royes Mello wrote: In the GSoC proposal page [1] I received some suggestions to strech goals: * ALTER TABLE name SET UNLOGGED. This is essentially the reverse of the core proposal, which is ALTER TABLE name SET LOGGED. Yes, I think that should

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-01 Thread Heikki Linnakangas
On 03/07/2014 05:36 AM, Tom Lane wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: Do you think is difficult to implement ALTER TABLE ... SET UNLOGGED too? Thinking in a scope of one GSoC, of course. I think it's basically the same thing. You might hope to

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-01 Thread Jim Nasby
On 3/4/14, 8:50 AM, Andres Freund wrote: Can't that be solved by just creating the permanent relation in a new relfilenode? That's equivalent to a rewrite, yes, but we need to do that for anything but wal_level=minimal anyway. Maybe I'm missing something, but doesn't this actually involve

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-04-01 Thread Andres Freund
On 2014-04-01 12:56:04 -0500, Jim Nasby wrote: On 3/4/14, 8:50 AM, Andres Freund wrote: Can't that be solved by just creating the permanent relation in a new relfilenode? That's equivalent to a rewrite, yes, but we need to do that for anything but wal_level=minimal anyway. Maybe I'm missing

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Robert Haas
On Wed, Mar 5, 2014 at 7:42 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, Mar 4, 2014 at 5:00 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, Mar 4, 2014 at 3:29 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-04 12:54:02 -0500, Robert

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Thom Brown
On 6 March 2014 19:42, Robert Haas robertmh...@gmail.com wrote: On Wed, Mar 5, 2014 at 7:42 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, Mar 4, 2014 at 5:00 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, Mar 4, 2014 at 3:29 PM, Andres Freund

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Fabrízio de Royes Mello
On Thu, Mar 6, 2014 at 4:42 PM, Robert Haas robertmh...@gmail.com wrote: I think this isn't a good design. Per the discussion between Andres and I, I think that I think you should do is make ALTER TABLE .. SET LOGGED work just like VACUUM FULL, with the exception that it will set a

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Robert Haas
On Thu, Mar 6, 2014 at 2:52 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Thu, Mar 6, 2014 at 4:42 PM, Robert Haas robertmh...@gmail.com wrote: I think this isn't a good design. Per the discussion between Andres and I, I think that I think you should do is make ALTER TABLE ..

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Fabrízio de Royes Mello
On Thu, Mar 6, 2014 at 5:04 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 6, 2014 at 2:52 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Thu, Mar 6, 2014 at 4:42 PM, Robert Haas robertmh...@gmail.com wrote: I think this isn't a good design. Per the discussion

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Fabrízio de Royes Mello
On Thu, Mar 6, 2014 at 5:05 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Thu, Mar 6, 2014 at 5:04 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 6, 2014 at 2:52 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Thu, Mar 6, 2014 at 4:42 PM, Robert

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Fabrízio de Royes Mello
On Thu, Mar 6, 2014 at 5:04 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 6, 2014 at 2:52 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Thu, Mar 6, 2014 at 4:42 PM, Robert Haas robertmh...@gmail.com wrote: I think this isn't a good design. Per the discussion

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Tom Lane
=?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: Do you think is difficult to implement ALTER TABLE ... SET UNLOGGED too? Thinking in a scope of one GSoC, of course. I think it's basically the same thing. You might hope to optimize it; but you have to create (rather

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-06 Thread Fabrízio de Royes Mello
On Fri, Mar 7, 2014 at 12:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: Do you think is difficult to implement ALTER TABLE ... SET UNLOGGED too? Thinking in a scope of one GSoC, of course. I think it's basically the

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-05 Thread Fabrízio de Royes Mello
On Tue, Mar 4, 2014 at 5:00 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, Mar 4, 2014 at 3:29 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-04 12:54:02 -0500, Robert Haas wrote: On Tue, Mar 4, 2014 at 9:50 AM, Andres Freund and...@2ndquadrant.com wrote:

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-04 Thread Robert Haas
On Mon, Mar 3, 2014 at 12:08 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project? I'm pretty

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-04 Thread Andres Freund
On 2014-03-04 09:47:08 -0500, Robert Haas wrote: On Mon, Mar 3, 2014 at 12:08 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-04 Thread Fabrízio de Royes Mello
On Tue, Mar 4, 2014 at 3:31 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-04 01:10:50 -0300, Fabrízio de Royes Mello wrote: Today I do something like that: 1) create unlogged table tmp_foo ... 2) populate 'tmp_foo' table (ETL scripts or whatever) 3) start transaction 4)

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-04 Thread Fabrízio de Royes Mello
On Tue, Mar 4, 2014 at 11:50 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-04 09:47:08 -0500, Robert Haas wrote: On Mon, Mar 3, 2014 at 12:08 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-04 Thread Robert Haas
On Tue, Mar 4, 2014 at 9:50 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-04 09:47:08 -0500, Robert Haas wrote: On Mon, Mar 3, 2014 at 12:08 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-04 Thread Andres Freund
On 2014-03-04 12:54:02 -0500, Robert Haas wrote: On Tue, Mar 4, 2014 at 9:50 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-04 09:47:08 -0500, Robert Haas wrote: Can't that be solved by just creating the permanent relation in a new relfilenode? That's equivalent to a rewrite,

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-04 Thread Fabrízio de Royes Mello
On Tue, Mar 4, 2014 at 3:29 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-04 12:54:02 -0500, Robert Haas wrote: On Tue, Mar 4, 2014 at 9:50 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-04 09:47:08 -0500, Robert Haas wrote: Can't that be solved by just creating

[HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Fabrízio de Royes Mello
Hi all, Is the TODO item make an unlogged table logged [1] a good GSoC project? Regards, [1] http://www.postgresql.org/message-id/aanlktinenzbrxdcwohkqbba2bhubfy8_c5jwrxlod...@mail.gmail.com -- Fabrízio de Royes Mello Consultoria/Coaching PostgreSQL Timbira: http://www.timbira.com.br Blog

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Robert Haas
On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project? I'm pretty sure we found some problems in that design that we couldn't figure out how to solve. I don't have a pointer to the relevant

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project? I'm pretty sure we found some problems in that design that we couldn't figure out how

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project? I'm pretty sure we found some problems in that

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Hannu Krosing
On 03/03/2014 05:22 PM, Tom Lane wrote: Stephen Frost sfr...@snowman.net writes: ... ISTR the discussion going something along the lines of we'd have to WAL log the entire table to do that, and if we have to do that, what's the point?. IIRC, the reason you'd have to do that is to make the

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Andres Freund
On 2014-03-03 12:08:26 -0500, Stephen Frost wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project? I'm pretty sure we found some

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Peter Geoghegan
On Mon, Mar 3, 2014 at 8:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project? Another interesting project around unlogged tables would be to make it possible to have unlogged indexes on fully-logged tables. That is

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Andres Freund
On 2014-03-03 12:44:26 -0800, Peter Geoghegan wrote: On Mon, Mar 3, 2014 at 8:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project? Another interesting project around unlogged tables would be to make it

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Fabrízio de Royes Mello
On Mon, Mar 3, 2014 at 2:40 PM, Hannu Krosing ha...@2ndquadrant.com wrote: On 03/03/2014 05:22 PM, Tom Lane wrote: Stephen Frost sfr...@snowman.net writes: ... ISTR the discussion going something along the lines of we'd have to WAL log the entire table to do that, and if we have to do

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Fabrízio de Royes Mello
On Mon, Mar 3, 2014 at 5:44 PM, Peter Geoghegan p...@heroku.com wrote: On Mon, Mar 3, 2014 at 8:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project? Another interesting project around unlogged tables would be

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Fabrízio de Royes Mello
On Mon, Mar 3, 2014 at 5:47 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-03 12:44:26 -0800, Peter Geoghegan wrote: On Mon, Mar 3, 2014 at 8:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an unlogged table logged [1] a good GSoC project?

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Fabrízio de Royes Mello
On Mon, Mar 3, 2014 at 2:42 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-03-03 12:08:26 -0500, Stephen Frost wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Is the TODO item make an

Re: [HACKERS] GSoC proposal - make an unlogged table logged

2014-03-03 Thread Andres Freund
On 2014-03-04 01:10:50 -0300, Fabrízio de Royes Mello wrote: Today I do something like that: 1) create unlogged table tmp_foo ... 2) populate 'tmp_foo' table (ETL scripts or whatever) 3) start transaction 4) lock table tmp_foo in access exclusive mode 5) update pg_class set relpersistence