Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Tom Lane
KaiGai Kohei writes: > Is it an expected behavior that PostgreSQL tries to execute foo() with > privileges of the owner of language call handler because of its security > definer property? This server crash is just a result. A language call handler has no function properties of its own --- which

[HACKERS] 9.0 release notes done

2010-03-19 Thread Bruce Momjian
I have completed the 9.0 release notes: http://developer.postgresql.org/pgdocs/postgres/release-9-0.html I kept the 9.0-alpha release notes in the SGML because people might want to compare them with the release notes I did, and because the introductory text will be needed for the next alp

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Robert Haas
On Fri, Mar 19, 2010 at 10:29 PM, KaiGai Kohei wrote: > Is it an expected behavior that PostgreSQL tries to execute foo() with > privileges of the owner of language call handler because of its security > definer property? This server crash is just a result. I'm inclined to feel (and Tom's respons

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Josh Berkus
On 3/19/10 5:18 AM, Tom Lane wrote: >> When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), >> > it makes server process crashed. > > So don't do that. Whatever possessed you to think that's a sensible > idea anyway? PATIENT: Doctor, it hurts when I do this! DOCTOR: So stop do

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread KaiGai Kohei
(2010/03/20 11:17), Robert Haas wrote: On Fri, Mar 19, 2010 at 8:11 PM, Tom Lane wrote: Robert Haas writes: On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane wrote: KaiGai Kohei writes: When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), it makes server process crashed. So do

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Robert Haas
On Fri, Mar 19, 2010 at 8:11 PM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane wrote: >>> KaiGai Kohei writes: When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), it makes server process crashed. >>> >>> So don't do that.  Whatev

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Tom Lane
Robert Haas writes: > On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane wrote: >> KaiGai Kohei writes: >>> When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), >>> it makes server process crashed. >> >> So don't do that.  Whatever possessed you to think that's a sensible >> idea anywa

Re: [HACKERS] C libpq frontend library fetchsize

2010-03-19 Thread Robert Haas
On Thu, Mar 18, 2010 at 1:21 PM, Yeb Havinga wrote: > Tom Lane wrote: >> >> Yeb Havinga writes: >> >>> >>> What if the default operation of e.g. php using libpq would be as >>> follows: set some default fetchsize (e.g. 1000 rows), then just issue >>> getrow. In the php pg handling, a function lik

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Robert Haas
On Fri, Mar 19, 2010 at 8:18 AM, Tom Lane wrote: > KaiGai Kohei writes: >> When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), >> it makes server process crashed. > > So don't do that.  Whatever possessed you to think that's a sensible > idea anyway? It might not be sensible,

[HACKERS] Call for translations

2010-03-19 Thread Peter Eisentraut
In anticipation of the release of PostgreSQL 9.0, it is once again time to update the message translations. We are not very near a string freeze yet, which has traditionally been associated with the first release candidate, but I feel that things are already stable enough to begin this work now.

[HACKERS] Repeating Append operation

2010-03-19 Thread Gurjeet Singh
Hi all, explain select v from ( select array( select 1 union all select 2) as v from (select 1) ) as s where v is not null; The plan looks like: QUERY PLAN Result (cost=0.08..0.10 rows=1 wid

[HACKERS] Postgres officially accepted in to 2010 Google Summer of Code program

2010-03-19 Thread Robert Treat
Howdy folks, I'm very happy to announce that the Postgres project has been selected to participate in this years Google Summer of Code program. Over the next couple weeks we'll be looking to solidify our mentor base; if you work on Postgres and would be willing to mentor a student, p

[HACKERS] Re: [COMMITTERS] pgsql: Reset btpo.xact following recovery of btree delete page.

2010-03-19 Thread Simon Riggs
On Fri, 2010-03-19 at 08:41 -0400, Tom Lane wrote: > sri...@postgresql.org (Simon Riggs) writes: > > Log Message: > > --- > > Reset btpo.xact following recovery of btree delete page. Add btpo_xact > > field into WAL record and reset it from there, rather than using > > FrozenTransactionId w

Re: [HACKERS] Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

2010-03-19 Thread Heikki Linnakangas
Alvaro Herrera wrote: > Heikki Linnakangas escribió: > >> When recovery reaches an invalid WAL record, typically caused by a >> half-written WAL file, it closes the file and moves to the next source. >> If an error is found in a file restored from archive or in a portion >> just streamed from mast

Re: [HACKERS] Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

2010-03-19 Thread Alvaro Herrera
Heikki Linnakangas escribió: > When recovery reaches an invalid WAL record, typically caused by a > half-written WAL file, it closes the file and moves to the next source. > If an error is found in a file restored from archive or in a portion > just streamed from master, however, a PANIC is thrown

Re: [HACKERS] Getting to beta1

2010-03-19 Thread Csaba Nagy
Hi all, On Thu, 2010-03-18 at 10:18 -0700, Josh Berkus wrote: > Or, let's put it another way: I've made my opinion clear in the past > that I think that we ought to ship with a minimal postgresql.conf with > maybe 15 items in it. If we are going to continue to ship with > postgresql.conf "kitchen

Re: [HACKERS] Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

2010-03-19 Thread Heikki Linnakangas
Tom Lane wrote: > Heikki Linnakangas writes: >> Simon Riggs wrote: >>> We might also have written half a file many times. The files in pg_xlog >>> are suspect whereas the files in the archive are not. If we have both we >>> should prefer the archive. > >> Yep. > > Really? That will result in a

Re: [HACKERS] Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

2010-03-19 Thread Tom Lane
Heikki Linnakangas writes: > Simon Riggs wrote: >> We might also have written half a file many times. The files in pg_xlog >> are suspect whereas the files in the archive are not. If we have both we >> should prefer the archive. > Yep. Really? That will result in a change in the longstanding be

Re: [HACKERS] [COMMITTERS] pgsql: Reset btpo.xact following recovery of btree delete page.

2010-03-19 Thread Tom Lane
sri...@postgresql.org (Simon Riggs) writes: > Log Message: > --- > Reset btpo.xact following recovery of btree delete page. Add btpo_xact > field into WAL record and reset it from there, rather than using > FrozenTransactionId which can lead to some corner case bugs. Simon, you can't just

Re: [HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread Tom Lane
KaiGai Kohei writes: > When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), > it makes server process crashed. So don't do that. Whatever possessed you to think that's a sensible idea anyway? regards, tom lane -- Sent via pgsql-hackers mailing list (p

Re: [HACKERS] Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

2010-03-19 Thread Heikki Linnakangas
Simon Riggs wrote: > On Thu, 2010-03-18 at 23:27 +0900, Fujii Masao wrote: > >> I agree that this is a bigger problem. Since the standby always starts >> walreceiver before replaying any WAL files in pg_xlog, walreceiver tries >> to receive the WAL files following the REDO starting point even if t

Re: [HACKERS] explain and PARAM_EXEC

2010-03-19 Thread Yeb Havinga
Tom Lane wrote: Robert Haas writes: So I guess there are two issues here: (1) somehow I feel like we should be telling the user what expression is being used to initialize $0, $1, etc. when they are PARAM_EXEC parameters; Maybe, but the only reasonable place to put it would be within

Re: [HACKERS] Getting to beta1

2010-03-19 Thread Simon Riggs
On Sat, 2010-03-13 at 16:58 +, Simon Riggs wrote: > On Fri, 2010-03-12 at 22:28 -0500, Bruce Momjian wrote: > > > Where are we in getting to beta1? I know people are looking to me for > > 9.0 release notes and I will have them done in about a week, but what > > about open issues? I don't see

[HACKERS] Re: [COMMITTERS] pgsql: Introduce WAL records to log reuse of btree pages, allowing

2010-03-19 Thread Simon Riggs
On Thu, 2010-02-18 at 14:23 +0200, Heikki Linnakangas wrote: > Simon Riggs wrote: > > Introduce WAL records to log reuse of btree pages, allowing conflict > > resolution during Hot Standby. Page reuse interlock requested by Tom. > > Analysis and patch by me. > > There's still a theoretical possibi

[HACKERS] WIP: preloading of ispell dictionary

2010-03-19 Thread Pavel Stehule
Hello I wrote some small patch, that allow preloading of selected ispell dictionary. It solve the problem with slow tsearch initialisation with some language configuration. This patch is most simple - simpler than variant with shared memory and it is usable on Linux platform. I registered some

Re: [HACKERS] Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

2010-03-19 Thread Simon Riggs
On Thu, 2010-03-18 at 23:27 +0900, Fujii Masao wrote: > I agree that this is a bigger problem. Since the standby always starts > walreceiver before replaying any WAL files in pg_xlog, walreceiver tries > to receive the WAL files following the REDO starting point even if they > have already been in

[HACKERS] [BUG] SECURITY DEFINER on call handler makes daemon crash

2010-03-19 Thread KaiGai Kohei
It is a bug report in a corner case. When we assign "SECURITY DEFINER" attribute on plpgsql_call_handler(), it makes server process crashed. postgres=# ALTER FUNCTION plpgsql_call_handler() security definer; ALTER FUNCTION postgres=# CREATE FUNCTION foo(text) RETURNS text AS $$ BEGIN R