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 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?= >>> 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 Tom Lane
Heikki Linnakangas 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 a PANIC, and crash r

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 Fre

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 relatio

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 e

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?= writes: > >>>Do you think is difficult to implement "ALTER TABLE ... SET UNLOGGED" too? > >>>Thinkin

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?= 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

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?= 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

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 relatio

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 e

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 wa

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 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 proposal,

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

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 writi

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?= 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

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 > shoul

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 wrote: > =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= > 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 o

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 wrote: > > =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= 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 opti

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

2014-03-06 Thread Tom Lane
=?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= 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 than remove) an init

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 wrote: > > On Thu, Mar 6, 2014 at 2:52 PM, Fabrízio de Royes Mello > wrote: > > On Thu, Mar 6, 2014 at 4:42 PM, Robert Haas wrote: > >> I think this isn't a good design. Per the discussion between Andres > >> and I, I think that I think you should do

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 wrote: > > > > On Thu, Mar 6, 2014 at 2:52 PM, Fabrízio de Royes Mello > > wrote: > > > On Thu, Mar 6, 2014 at 4:42 PM, Robert Haas wrote: > > >> I think th

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 wrote: > > On Thu, Mar 6, 2014 at 2:52 PM, Fabrízio de Royes Mello > wrote: > > On Thu, Mar 6, 2014 at 4:42 PM, Robert Haas wrote: > >> I think this isn't a good design. Per the discussion between Andres > >> and I, I think that I think you should do

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 wrote: > On Thu, Mar 6, 2014 at 4:42 PM, Robert Haas 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,

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 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 different relpersistence

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

2014-03-06 Thread Thom Brown
On 6 March 2014 19:42, Robert Haas wrote: > On Wed, Mar 5, 2014 at 7:42 PM, Fabrízio de Royes Mello > wrote: > > On Tue, Mar 4, 2014 at 5:00 PM, Fabrízio de Royes Mello > > wrote: > >> On Tue, Mar 4, 2014 at 3:29 PM, Andres Freund > >> wrote: > >> > > >> > On 2014-03-04 12:54:02 -0500, Robert

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 wrote: > On Tue, Mar 4, 2014 at 5:00 PM, Fabrízio de Royes Mello > wrote: >> On Tue, Mar 4, 2014 at 3:29 PM, Andres Freund >> wrote: >> > >> > On 2014-03-04 12:54:02 -0500, Robert Haas wrote: >> > > On Tue, Mar 4, 2014 at 9:50 AM, Andres Fr

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 wrote: > > > > On 2014-03-04 12:54:02 -0500, Robert Haas wrote: > > > On Tue, Mar 4, 2014 at 9:50 AM, Andres Freund wrote: > > > > On 2014-03-04 09:47:08 -

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 wrote: > > On 2014-03-04 12:54:02 -0500, Robert Haas wrote: > > On Tue, Mar 4, 2014 at 9:50 AM, Andres Freund 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 > >

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 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, yes, but we need t

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 wrote: > On 2014-03-04 09:47:08 -0500, Robert Haas wrote: >> On Mon, Mar 3, 2014 at 12:08 PM, Stephen Frost wrote: >> > * Robert Haas (robertmh...@gmail.com) wrote: >> >> On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello >> >> wrote: >> >> > I

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 wrote: > > On 2014-03-04 09:47:08 -0500, Robert Haas wrote: > > On Mon, Mar 3, 2014 at 12:08 PM, Stephen Frost wrote: > > > * Robert Haas (robertmh...@gmail.com) wrote: > > >> On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello > > >> wrote: >

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 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) lock tabl

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 wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello > >> wrote: > >> > Is the TODO item "make an unlogged table logged" [1] a good GS

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 wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello >> wrote: >> > Is the TODO item "make an unlogged table logged" [1] a good GSoC project? >> >> I'm pretty sure we found some problems in

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 relpersis

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 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 > > > wrote: > > > > Is the TODO item "make an unlogged table logged" [1] a g

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 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 > > wrote: > > > Is the TODO item "make an unlogged table logged" [1] a good GSoC project? > > > > Another interesting 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 5:44 PM, Peter Geoghegan wrote: > > On Mon, Mar 3, 2014 at 8:28 AM, Fabrízio de Royes Mello > 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 u

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 wrote: > > On 03/03/2014 05:22 PM, Tom Lane wrote: > > Stephen Frost 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?".

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 > 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 unlog

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 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 something that there

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 > > wrote: > > > Is the TODO item "make an unlogged table logged" [1] a good GSoC project? > > > > I'm pretty sure we found some problems

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 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 table conten

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

2014-03-03 Thread Tom Lane
Stephen Frost writes: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Mon, Mar 3, 2014 at 11:28 AM, Fabrízio de Royes Mello >> 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 >> fi

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 > 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 d

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 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 -hackers discussion o

[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 >> B