Lists: | pgsql-committerspgsql-hackers |
---|
From: | alvherre(at)postgresql(dot)org (Alvaro Herrera) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: We no longer need to palloc the VacuumStmt node; keeping it on |
Date: | 2007-03-23 20:56:40 |
Message-ID: | 20070323205640.0C01A9FB6B7@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Log Message:
-----------
We no longer need to palloc the VacuumStmt node; keeping it on the stack is
simpler.
Modified Files:
--------------
pgsql/src/backend/postmaster:
autovacuum.c (r1.34 -> r1.35)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/autovacuum.c.diff?r1=1.34&r2=1.35)
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: We no longer need to palloc the VacuumStmt node; keeping it on |
Date: | 2007-03-23 21:22:22 |
Message-ID: | 25086.1174684942@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
alvherre(at)postgresql(dot)org (Alvaro Herrera) writes:
> We no longer need to palloc the VacuumStmt node; keeping it on the stack is
> simpler.
If you're going to do that, you should at least set the nodeTag so that
the struct appears valid to onlookers. A memset wouldn't be out of
place either to make sure that any uninitialized fields behave sanely.
regards, tom lane
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: We no longer need to palloc the VacuumStmt node; keeping it on |
Date: | 2007-03-23 21:57:40 |
Message-ID: | 20070323215740.GE4507@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Tom Lane wrote:
> alvherre(at)postgresql(dot)org (Alvaro Herrera) writes:
> > We no longer need to palloc the VacuumStmt node; keeping it on the stack is
> > simpler.
>
> If you're going to do that, you should at least set the nodeTag so that
> the struct appears valid to onlookers. A memset wouldn't be out of
> place either to make sure that any uninitialized fields behave sanely.
Done, thanks.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support