Re: [HACKERS] WIP: preloading of ispell dictionary

2010-03-23 Thread Heikki Linnakangas
Takahiro Itagaki wrote: Pavel Stehule pavel.steh...@gmail.com wrote: I wrote some small patch, that allow preloading of selected ispell dictionary. It solve the problem with slow tsearch initialisation with some language configuration. I afraid so this module doesn't help on MS Windows.

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

2010-03-23 Thread Fujii Masao
Sorry for the delay. On Fri, Mar 19, 2010 at 8:37 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Here's a patch I've been playing with. Thanks! I'm reading the patch. The idea is that in standby mode, the server keeps trying to make progress in the recovery by: a)

Re: [HACKERS] Windowing Qual Pushdown

2010-03-23 Thread Hitoshi Harada
2010/3/21 Daniel Farina drfar...@acm.org: In the function subquery_is_pushdown_safe, there is an immediate false returned if the subquery has a windowing function.  While that seems true in general, are there cases where we can push down a qual if it is on the partitioning key?  Or do NULLs or

Re: [HACKERS] Windowing Qual Pushdown

2010-03-23 Thread Daniel Farina
On Tue, Mar 23, 2010 at 12:19 AM, Hitoshi Harada umi.tan...@gmail.com wrote: If you implement that optimization, we need have kind of implicit, homologous qual information. Sure, it's possible. I'm not sure precisely what you mean here. Do you predict the mechanism will be complicated? It's

Re: [HACKERS] Windowing Qual Pushdown

2010-03-23 Thread Hitoshi Harada
2010/3/23 Daniel Farina drfar...@acm.org: On Tue, Mar 23, 2010 at 12:19 AM, Hitoshi Harada umi.tan...@gmail.com wrote: If you implement that optimization, we need have kind of implicit, homologous qual information. Sure, it's possible. I'm not sure precisely what you mean here.  Do you

Re: [HACKERS] WIP: preloading of ispell dictionary

2010-03-23 Thread Pavel Stehule
2010/3/23 Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp: Pavel Stehule pavel.steh...@gmail.com wrote: I wrote some small patch, that allow preloading of  selected ispell dictionary. It solve the problem with slow tsearch initialisation with some language configuration. I afraid so this

Re: [HACKERS] WIP: preloading of ispell dictionary

2010-03-23 Thread Nicolas Barbier
2010/3/23 Pavel Stehule pavel.steh...@gmail.com: 2010/3/23 Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp: The fundamental issue seems to be in the slow initialization of dictionaries. If so, how about adding a pre-complile tool to convert a dictionary into a binary file, and each backend

Re: [HACKERS] proposal: more practical view on function's source code

2010-03-23 Thread Pavel Stehule
Modification of proposal: I think so from discussion can take some two points: a) enhancing editing \ef funcname, line ... edit function and move cursor on line \ef... edit function - name and line take from error message b) enhancing view \sf funcname ...

Re: [HACKERS] WIP: preloading of ispell dictionary

2010-03-23 Thread Pavel Stehule
2010/3/23 Nicolas Barbier nicolas.barb...@gmail.com: 2010/3/23 Pavel Stehule pavel.steh...@gmail.com: 2010/3/23 Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp: The fundamental issue seems to be in the slow initialization of dictionaries. If so, how about adding a pre-complile tool to

Re: [HACKERS] Windowing Qual Pushdown

2010-03-23 Thread Daniel Farina
On Tue, Mar 23, 2010 at 12:40 AM, Hitoshi Harada umi.tan...@gmail.com wrote: I believe the changes will probably not be 2-3 lines (ie. a member added to Query structure, etc) if I try it. But the optimizer part is too complicated to me so that I am not sure, either. My idea above is that the

Re: [HACKERS] Ragged latency log data in multi-threaded pgbench

2010-03-23 Thread Magnus Hagander
On Tue, Mar 23, 2010 at 05:10, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Greg Smith g...@2ndquadrant.com wrote: By the way: the pgbench.sgml that you committed looks like it passed through a system that added a CR to every line in it.  Probably not the way you intended to commit

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Dimitri Fontaine
Peter Eisentraut pete...@gmx.net writes: Well, sudo is pretty useful, and this would be quite similar. +1. I guess one of the big difficulties would be to be able to match a given random query with the list of queries we have in any Jail, given that we put in there generic queries and we want

[HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Gokulakannan Somasundaram
Hi, With the implementation of deferred unique constraints, we need to go back to the index second time to check whether the unique check is valid. Say a situation occurs like this a) the first session doing the unique check finds out that there is a unique check required second time and just

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Heikki Linnakangas
Gokulakannan Somasundaram wrote: Hi, With the implementation of deferred unique constraints, we need to go back to the index second time to check whether the unique check is valid. Say a situation occurs like this a) the first session doing the unique check finds out that there is a unique

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Gokulakannan Somasundaram
Can you also explain how are we avoiding duplicates in this scenario? a) Say there are three pages(P,Q, R) full of duplicate tuples, that are deleted but not dead of id x(due to some long running transaction). b) Now Session A gets in and checks the duplicate tuples for their liveliness with the

Re: [HACKERS] Windowing Qual Pushdown

2010-03-23 Thread Hitoshi Harada
2010/3/23 Daniel Farina drfar...@acm.org: On Tue, Mar 23, 2010 at 12:40 AM, Hitoshi Harada umi.tan...@gmail.com wrote: I believe the changes will probably not be 2-3 lines (ie. a member added to Query structure, etc) if I try it. But the optimizer part is too complicated to me so that I am not

Re: [HACKERS] Windowing Qual Pushdown

2010-03-23 Thread Tom Lane
Hitoshi Harada umi.tan...@gmail.com writes: I believe the changes will probably not be 2-3 lines (ie. a member added to Query structure, etc) if I try it. But the optimizer part is too complicated to me so that I am not sure, either. My idea above is that the similar mechanism you see in GROUP

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Tom Lane
Gokulakannan Somasundaram gokul...@gmail.com writes: Can you also explain how are we avoiding duplicates in this scenario? a) Say there are three pages(P,Q, R) full of duplicate tuples, that are deleted but not dead of id x(due to some long running transaction). b) Now Session A gets in and

Re: [HACKERS] Windowing Qual Pushdown

2010-03-23 Thread Daniel Farina
On Tue, Mar 23, 2010 at 8:23 AM, Tom Lane t...@sss.pgh.pa.us wrote: The real question is what benefit you expect to get.  If the filter condition can't be pushed below the window functions (which AFAICS Even on the partition key? Right now if you define a view with a windowing + PARTITION BY

[HACKERS] Mismatch in libpqwalreceiver

2010-03-23 Thread Hitoshi Harada
There's a mismatch in HEAD between README and the actual definition in replication/libpqwalreceiver. In README, bool walrcv_receive(int timeout, XLogRecPtr *recptr, char **buffer, int *len) but in walreceiver.h, typedef bool (*walrcv_receive_type) (int timeout, unsigned char *type,

Re: [HACKERS] 9.0 release notes done

2010-03-23 Thread Josh Berkus
Bruce, I thought this year we were going to start using people's full names instead of the first names, for clarity. No? -- -- Josh Berkus PostgreSQL Experts Inc.

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Josh Berkus
On 3/21/10 9:36 PM, Joseph Adams wrote: Inside of the jail definition is a series of pseudo-statements that indicate the space of queries the user can perform. Simply creating a jail does not make it go into effect. A jail is activated using another query, and it remains in effect for the

Re: [HACKERS] 9.0 release notes done

2010-03-23 Thread Robert Haas
On Tue, Mar 23, 2010 at 1:09 PM, Josh Berkus j...@agliodbs.com wrote: I thought this year we were going to start using people's full names instead of the first names, for clarity.  No? +1 for that approach. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Robert Haas
On Tue, Mar 23, 2010 at 1:28 PM, Josh Berkus j...@agliodbs.com wrote: I don't think that the idea of turning on the jail mode via a session-level switch works, given the realities of connection pooling. Also, I do not believe that we currently have any USERSET variable which can be turned on

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Gokulakannan Somasundaram
Are you talking about exclusion constraints or btree uniqueness constraints? This doesn't seem to be a particularly accurate description of the implementation of either one. The way btree deals with this is explained in _bt_doinsert: Unique constraints * NOTE: obviously,

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Tom Lane
Gokulakannan Somasundaram gokul...@gmail.com writes: This is fine, if the second session has to pass through the page, where the first session inserted the record. But as i said if the second session finds a free slot before hitting on the page where the first session inserted, then it will

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Gokulakannan Somasundaram
No, you don't understand how it works. All would-be inserters will hit the same target page to begin with, ie, the first one that the new key could legally be inserted on. The lock that protects against this problem is the lock on that page, regardless of which page the key actually ends up

Re: [HACKERS] Repeating Append operation

2010-03-23 Thread Gurjeet Singh
On Sun, Mar 21, 2010 at 4:29 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 19, 2010 at 2:09 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: Is there a way to avoid this double evaluation? Maybe with a CTE? WITH x AS (...) SELECT ... It does look like surprising behavior.

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Tom Lane
Gokulakannan Somasundaram gokul...@gmail.com writes: Consider Time instances T1, T2, T3, T4 T1 : session 1 holds the write lock on page p1 and completes the unique check on p1, p2 and p3. T2 : session 1 releases the lock on p1 (its waiting to acquire a ex lock on p2) That's not what we do.

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Alvaro Herrera
Robert Haas escribió: On Tue, Mar 23, 2010 at 1:28 PM, Josh Berkus j...@agliodbs.com wrote: BTW, if you wanted something less ambitious, we have a longstanding request to implement local superuser, that is, the ability to give one role the ability to edit other roles in one database only.

Re: [HACKERS] Repeating Append operation

2010-03-23 Thread Robert Haas
On Tue, Mar 23, 2010 at 2:09 PM, Gurjeet Singh singh.gurj...@gmail.com wrote: On Sun, Mar 21, 2010 at 4:29 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 19, 2010 at 2:09 PM, Gurjeet Singh singh.gurj...@gmail.com wrote:     Is there a way to avoid this double evaluation? Maybe

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Gokulakannan Somasundaram
T2 : session 1 releases the lock on p1 (its waiting to acquire a ex lock on p2) That's not what we do. See _bt_findinsertloc. regards, tom lane I am really confused. Please keep the cool and explain me, if i am wrong. I could see this code in

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Robert Haas escribió: On Tue, Mar 23, 2010 at 1:28 PM, Josh Berkus j...@agliodbs.com wrote: BTW, if you wanted something less ambitious, we have a longstanding request to implement local superuser, that is, the ability to give one role the

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Gokulakannan Somasundaram
Oh! yeah, i got it. Thanks On Wed, Mar 24, 2010 at 12:26 AM, Gokulakannan Somasundaram gokul...@gmail.com wrote: T2 : session 1 releases the lock on p1 (its waiting to acquire a ex lock on p2) That's not what we do. See _bt_findinsertloc. regards, tom lane

Re: [HACKERS] Deadlock possibility in _bt_check_unique?

2010-03-23 Thread Tom Lane
Gokulakannan Somasundaram gokul...@gmail.com writes: I am really confused. Please keep the cool and explain me, if i am wrong. I could see this code in _bt_findinsertloc. There is a _bt_relandgetbuf, which releases lock on p1 and tries to acquire a lock on p2. No, read it again. The

Re: xmlconcat (was [HACKERS] 9.0 release notes done)

2010-03-23 Thread Peter Eisentraut
On mån, 2010-03-22 at 19:38 -0400, Andrew Dunstan wrote: But if we are not comfortable about being able to do that safely, I would be OK with just raising an error if a concatenation is attempted where one value contains a DTD. The impact in practice should be low. Right. Can you

Re: [HACKERS] 9.0 release notes done

2010-03-23 Thread Bruce Momjian
Josh Berkus wrote: Bruce, I thought this year we were going to start using people's full names instead of the first names, for clarity. No? OK, I will do this once Josh is done with his modifications. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB

[HACKERS] booleans in recovery.conf

2010-03-23 Thread Bruce Momjian
Is there a reason that recovery.conf uses true/false, while postgresql.conf uses on/off? #recovery_target_inclusive = 'true' # 'true' or 'false' or are these settings more boolean for some reason? -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Alvaro Herrera
Tom Lane escribió: Alvaro Herrera alvhe...@commandprompt.com writes: Robert Haas escribi�: But roles aren't database-specific... they're globals. Well, that's another longstanding request ;-) (See the db_user_namespace hack) Yeah, you'd have to fix that first. The ambitious part

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: I wonder if this is simpler now that we got rid of the flat files stuff. We could validate the user once we've connected to a database and thus able to poke at the local user catalog, not just the global one. I think that was a serious

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Robert Haas
On Tue, Mar 23, 2010 at 8:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@commandprompt.com writes: I wonder if this is simpler now that we got rid of the flat files stuff. We could validate the user once we've connected to a database and thus able to poke at the local user

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Mar 23, 2010 at 8:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: My first thought about a catalog representation would be to add a column to pg_auth which is a DB OID for local users or zero for global users. However, you'd probably want to prevent

Re: [HACKERS] booleans in recovery.conf

2010-03-23 Thread Fujii Masao
On Wed, Mar 24, 2010 at 8:43 AM, Bruce Momjian br...@momjian.us wrote: Is there a reason that recovery.conf uses true/false, while postgresql.conf uses on/off? IIRC, because, in the old version, recovery.conf allowed only true/false as a boolean value. Of course, we can change those now.

Re: [HACKERS] Mismatch in libpqwalreceiver

2010-03-23 Thread Fujii Masao
On Wed, Mar 24, 2010 at 1:49 AM, Hitoshi Harada umi.tan...@gmail.com wrote: There's a mismatch in HEAD between README and the actual definition in replication/libpqwalreceiver. In README, bool walrcv_receive(int timeout, XLogRecPtr *recptr, char **buffer, int *len) but in walreceiver.h,

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Robert Haas
On Tue, Mar 23, 2010 at 8:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Mar 23, 2010 at 8:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: My first thought about a catalog representation would be to add a column to pg_auth which is a DB OID for local

[HACKERS] Re: [COMMITTERS] pgsql: Add connection messages for streaming replication.

2010-03-23 Thread Fujii Masao
On Sat, Mar 20, 2010 at 4:19 AM, Simon Riggs sri...@postgresql.org wrote: Log Message: --- Add connection messages for streaming replication. log_connections was broken for a replication connection and no messages were displayed on either standby or primary, at any debug level.

Re: [HACKERS] Proposal: access control jails (and introduction as aspiring GSoC student)

2010-03-23 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Mar 23, 2010 at 8:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: Not unless you'd like to solve the issues with triggers on system catalogs first ... Urp. Not really, though I don't know what they are exactly. I didn't think exclusion

Re: [HACKERS] WIP: preloading of ispell dictionary

2010-03-23 Thread Craig Ringer
Pavel Stehule wrote: Personally I dislike idea some dictionary precompiler - it is next application for maintaining and maybe not necessary. That's the sort of thing that can be done when first required by any backend and the results saved in a file for other backends to mmap(). It'd probably

[HACKERS] Re: [COMMITTERS] pgsql: Add connection messages for streaming replication.

2010-03-23 Thread Simon Riggs
On Wed, 2010-03-24 at 10:52 +0900, Fujii Masao wrote: On Sat, Mar 20, 2010 at 4:19 AM, Simon Riggs sri...@postgresql.org wrote: Log Message: --- Add connection messages for streaming replication. log_connections was broken for a replication connection and no messages were