Re: [HACKERS] patch: SQL/MED(FDW) DDL

2010-10-12 Thread Shigeru HANADA
On Mon, 11 Oct 2010 13:22:13 -0400 Robert Haas robertmh...@gmail.com wrote: On Thu, Oct 7, 2010 at 7:20 AM, Shigeru HANADA han...@metrosystems.co.jp wrote: In this step, optimizer calls FdwRoutine-GetStatistics() to get estimated costs of the foreign scan. ?FDW can calculate costs by

Re: [HACKERS] pgxs docdir question

2010-10-12 Thread Devrim GÜNDÜZ
On Mon, 2010-10-11 at 13:30 -0400, Tom Lane wrote: What does pg_config --docdir report? $ /usr/pgsql-9.0/bin/pg_config --docdir /usr/share/doc/pgsql I was expecting it to be somewhere in /usr/pgsql-9.0, where it is the --prefix. Am I wrong? Regards, -- Devrim GÜNDÜZ PostgreSQL

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-12 Thread Radosław Smogura
On Mon, 11 Oct 2010 08:29:16 -0500, Kevin Grittner kevin.gritt...@wicourts.gov wrote: David Fetter da...@fetter.org wrote: Please find enclosed a WIP patch from one of my co-workers intended to support JDBC's setQueryTimeout, along with the patch for JDBC that uses it. I agree that it

Re: [HACKERS] wip: functions median and percentile

2010-10-12 Thread Pavel Stehule
2010/10/12 Hitoshi Harada umi.tan...@gmail.com: 2010/10/12 Pavel Stehule pavel.steh...@gmail.com: Hello 2010/10/11 Greg Stark gsst...@mit.edu: On Sun, Oct 10, 2010 at 2:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: It was pointed out upthread that while median isn't presently in the standard,

Re: [HACKERS] security hook on table creation

2010-10-12 Thread Robert Haas
2010/10/11 KaiGai Kohei kai...@ak.jp.nec.com: It enables us to put security hooks independent from MVCC visibility of the new database object. If we pay attention for visibility of new database object, it seems to me amount of things to understand and maintain will be increased, although MVCC

Re: [HACKERS] Docs for archive_cleanup_command are poor

2010-10-12 Thread Fujii Masao
On Sat, Oct 9, 2010 at 10:04 AM, Brendan Jurd dire...@gmail.com wrote: Hi folks, I have just set up HS+SR for the first time, and for the most part, the docs were excellent.  The one exception for me was the discussion of archive_cleanup_command.  This is a pretty important part of

Re: [HACKERS] security hook on table creation

2010-10-12 Thread KaiGai Kohei
(2010/10/12 20:59), Robert Haas wrote: 2010/10/11 KaiGai Koheikai...@ak.jp.nec.com: It enables us to put security hooks independent from MVCC visibility of the new database object. If we pay attention for visibility of new database object, it seems to me amount of things to understand and

Re: [HACKERS] Keywords in pg_hba.conf should be field-specific

2010-10-12 Thread Fujii Masao
On Sat, Oct 9, 2010 at 11:13 AM, Brendan Jurd dire...@gmail.com wrote: I understand that 'replication' is a keyword as far as the database name is concerned, but I was surprised to find that it was treated as a keyword in the username field also.  I had a look in src/backend/libpq/hba.c, and

Re: [HACKERS] pgxs docdir question

2010-10-12 Thread Tom Lane
Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= dev...@gunduz.org writes: On Mon, 2010-10-11 at 13:30 -0400, Tom Lane wrote: What does pg_config --docdir report? $ /usr/pgsql-9.0/bin/pg_config --docdir /usr/share/doc/pgsql I was expecting it to be somewhere in /usr/pgsql-9.0, where it is the --prefix.

Re: [HACKERS] pgxs docdir question

2010-10-12 Thread Devrim GÜNDÜZ
On Tue, 2010-10-12 at 09:36 -0400, Tom Lane wrote: I think docdir is separate from the regular prefix. Try specifying --docdir to configure. Thanks, I'll test (not now, but soon). Regards, -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM

Re: [HACKERS] security hook on table creation

2010-10-12 Thread Robert Haas
On Tue, Oct 12, 2010 at 9:20 AM, KaiGai Kohei kai...@kaigai.gr.jp wrote: As I introduced before, the idea of two hooks makes obvious where we should put the security hooks; it is next to the existing DAC checking. It is the best guideline, even if we will touch the code around object creation

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-12 Thread David Fetter
On Tue, Oct 12, 2010 at 04:04:56AM -0500, Radosław Smogura wrote: On Mon, 11 Oct 2010 08:29:16 -0500, Kevin Grittner kevin.gritt...@wicourts.gov wrote: David Fetter da...@fetter.org wrote: Please find enclosed a WIP patch from one of my co-workers intended to support JDBC's

Re: [HACKERS] Debugging initdb breakage

2010-10-12 Thread Alvaro Herrera
Excerpts from Dimitri Fontaine's message of dom oct 10 17:38:01 -0300 2010: Hi, So I'm beginning to work on the extension support for dump and restore, and that begins with a new pg_extension catalog. I managed to break initdb already, of course, but I'm fighting my way out — no luck with

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-12 Thread Kevin Grittner
David Fetter da...@fetter.org wrote: Is there something incomplete about the ones I sent, and if so, what? Well, I'm still curious why it was necessary to modify the server side to implement an interface feature for which everything needed seems to be present on the client side. Is this

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-12 Thread David Fetter
On Tue, Oct 12, 2010 at 10:37:00AM -0500, Kevin Grittner wrote: David Fetter da...@fetter.org wrote: Is there something incomplete about the ones I sent, and if so, what? Well, I'm still curious why it was necessary to modify the server side to implement an interface feature for which

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-12 Thread Kevin Grittner
David Fetter da...@fetter.org wrote: Let's imagine you have a connection pooler with two clients, A and B. I'm with you so far. A calls setQueryTimeout, then starts a query, which terminates in time, but dies before handling it. Here you lost me. I don't know what that means. B

Re: [HACKERS] host name support in pg_hba.conf

2010-10-12 Thread Peter Eisentraut
On mån, 2010-10-11 at 21:34 +0300, Peter Eisentraut wrote: * Why getnameinfo() in the fallback loop? I checked through my git history; this was actually a leftover from some debugging code. I'll remove it. * Slash ('/') after the hostname At the parse_hba_line(), the parsed token

Re: [HACKERS] host name support in pg_hba.conf

2010-10-12 Thread Peter Eisentraut
On tis, 2010-10-12 at 10:11 +0900, KaiGai Kohei wrote: Is it really necessary to check reverse dns entries? This has been extensively discussed in this thread. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Bug in information_schema: column names don't match spec

2010-10-12 Thread Peter Eisentraut
On fre, 2010-10-08 at 11:19 -0400, Tom Lane wrote: Was this just a thinko in our transcription, or did they rename the view columns somewhere along the line? I suppose you figured this out already, but in some of my older draft copies, the column did indeed have a different name. The other

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-12 Thread Magnus Hagander
On Tue, Oct 12, 2010 at 17:55, David Fetter da...@fetter.org wrote: On Tue, Oct 12, 2010 at 10:37:00AM -0500, Kevin Grittner wrote: David Fetter da...@fetter.org wrote: Is there something incomplete about the ones I sent, and if so, what? Well, I'm still curious why it was necessary to

Re: [HACKERS] ISN patch that applies cleanly with git apply

2010-10-12 Thread Peter Geoghegan
I would like to hear what people think of my observations about the design of contrib/isn. In particular, I'd like Jan Otto to contribute - he probably has more domain knowledge than I do. I haven't heard from Jan about the proposed regression test. In producing this patch, did you work off the

Re: [HACKERS] [JDBC] Support for JDBC setQueryTimeout, et al.

2010-10-12 Thread Tom Lane
David Fetter da...@fetter.org writes: Let's imagine you have a connection pooler with two clients, A and B. A calls setQueryTimeout, then starts a query, which terminates in time, but dies before handling it. B connects to the pool, gets A's connection, and finds a statement_timeout that's

Re: [HACKERS] Which file does the SELECT?

2010-10-12 Thread Dimitri Fontaine
David Fetter da...@fetter.org writes: On Mon, Oct 11, 2010 at 04:14:04PM +0530, Vaibhav Kaushal wrote: Is there something like that in Kdevelop? I dont use CLI editors much. KDevelop is listed as one of the editors that support ctags. I've just developed some code for the backend and used

Re: [HACKERS] Git cvsserver serious issue

2010-10-12 Thread Magnus Hagander
On Fri, Oct 8, 2010 at 08:09, Magnus Hagander mag...@hagander.net wrote: On Fri, Oct 8, 2010 at 03:52, Andrew Dunstan and...@dunslane.net wrote: On 10/07/2010 03:37 PM, Magnus Hagander wrote: On Thu, Oct 7, 2010 at 21:31, Andrew Dunstanand...@dunslane.net  wrote: On 10/07/2010 10:11 AM,

Re: [HACKERS] Debugging initdb breakage

2010-10-12 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@commandprompt.com writes: As a note, I've had luck finding bootstrap-time bugs by manually feeding the bootstrapping commands into bootstrap mode, with a leftover dir from initdb --noclean. This has helped a few times that there has been no PANIC but just a FATAL or

Re: [HACKERS] host name support in pg_hba.conf

2010-10-12 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Hopefully final patch, which addresses the above issues, adds some documentation enhancements, and the possibility to quote host names (in case someone wants to have a host named samehost). A few minor gripes: + If a host name is specified

Re: [HACKERS] Debugging initdb breakage

2010-10-12 Thread David Fetter
On Tue, Oct 12, 2010 at 10:05:57PM +0200, Dimitri Fontaine wrote: Alvaro Herrera alvhe...@commandprompt.com writes: As a note, I've had luck finding bootstrap-time bugs by manually feeding the bootstrapping commands into bootstrap mode, with a leftover dir from initdb --noclean. This has

SQL command to edit postgresql.conf, with comments (was: [HACKERS] Issues with two-server Synch Rep)

2010-10-12 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: That's probably not going to happen until we have a way to update postgresql.conf via SQL. Which, I maintain, as I have maintained before, is not going to happen until we get rid of the comments, because otherwise absolutely any implementation anyone

Re: [HACKERS] host name support in pg_hba.conf

2010-10-12 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Hopefully final patch, which addresses the above issues, adds some documentation enhancements, and the possibility to quote host names (in case someone wants to have a host named samehost). Oh, I had an idea for a small improvement to this. It doesn't

Re: [HACKERS] Git cvsserver serious issue

2010-10-12 Thread Andrew Dunstan
On 10/12/2010 03:57 PM, Magnus Hagander wrote: There's a simpler solution which I have just tested. Instead of patching, use the Pg driver instead of SQLite. Set the dbname to %m. If the database doesn't exist the cvs checkout will fail. So we just set up databases for the modules we want to

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Andrew Dunstan
On 10/12/2010 05:02 PM, Dimitri Fontaine wrote: So, what you do is have a file per GUC, file name is the GUC name, first line contains *ONLY* current value, the rest of the file is comments. You're joking, right? cheers andrew -- Sent via pgsql-hackers mailing list

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Dimitri Fontaine
Andrew Dunstan and...@dunslane.net writes: On 10/12/2010 05:02 PM, Dimitri Fontaine wrote: So, what you do is have a file per GUC, file name is the GUC name, first line contains *ONLY* current value, the rest of the file is comments. You're joking, right? No. I just want both comments and

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Darren Duncan
Dimitri Fontaine wrote: Andrew Dunstan and...@dunslane.net writes: On 10/12/2010 05:02 PM, Dimitri Fontaine wrote: So, what you do is have a file per GUC, file name is the GUC name, first line contains *ONLY* current value, the rest of the file is comments. You're joking, right? No. I

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Kevin Grittner
Darren Duncan dar...@darrenduncan.net wrote: why is it not possible to retain the single existing postgres.conf file format (human writable) *and* have it machine/SQL-editable *and* maintain the comments? My recollection of the previous discussion wasn't that there was no way to do it, but

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Josh Berkus
Darren, All, All you would need is for the file parser to retain the comments as metadata, include them in the relations that the SQL commands see where the latter can also edit them as data, and then write out the updated file with comments. All you need to do in order to trisect and angle

[HACKERS] Re: [GENERAL] Text search parser's treatment of URLs and emails

2010-10-12 Thread Bruce Momjian
[ sent to hackers where it belongs ] Thom Brown wrote: Hi, I noticed that if I run this: SELECT alias, description, token FROM ts_debug('http://www.postgresql.org:2345/directory/page.html?version=9.1build=alpha1#summary'); I get: alias | description |

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2010-10-12 Thread Tom Lane
Marko Tiikkaja marko.tiikk...@cs.helsinki.fi writes: Here's a new version of the patch, deprecating pg_parse_and_rewrite. I started looking at this patch, and I'm wondering why you inserted all the Register/UnregisterSnapshot calls that weren't there before (eg, why did spi.c have to change at

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Darren Duncan
Josh Berkus wrote: The fact that Postgres already explicitly supports comment metadata in its system catalog means it must already know something about this. We support what? Postgres has COMMENT ON ... SQL for various database objects and I assumed that said comments would be stored in

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2010-10-12 Thread Marko Tiikkaja
On 2010-10-13 1:21 AM +0300, Tom Lane wrote: Marko Tiikkajamarko.tiikk...@cs.helsinki.fi writes: Here's a new version of the patch, deprecating pg_parse_and_rewrite. I started looking at this patch, and I'm wondering why you inserted all the Register/UnregisterSnapshot calls that weren't

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Josh Berkus
Postgres has COMMENT ON ... SQL for various database objects and I assumed that said comments would be stored in the system catalog. Oh. Now that's an interesting perspective ... you're suggesting that we take the comments and apply them as COMMENTS on the specific pg_settings? That wouldn't

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Richard Broersma
On Tue, Oct 12, 2010 at 3:54 PM, Josh Berkus j...@agliodbs.com wrote: Oh.  Now that's an interesting perspective ... you're suggesting that we take the comments and apply them as COMMENTS on the specific pg_settings? On a side note regarding comments, I'd like to make a request for a more

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2010-10-12 Thread Tom Lane
Marko Tiikkaja marko.tiikk...@cs.helsinki.fi writes: On 2010-10-13 1:21 AM +0300, Tom Lane wrote: I started looking at this patch, and I'm wondering why you inserted all the Register/UnregisterSnapshot calls that weren't there before That's actually just my ignorance I forgot to mention. As

Re: [HACKERS] Re: [GENERAL] Text search parser's treatment of URLs and emails

2010-10-12 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: [ sent to hackers where it belongs ] Thom Brown wrote: It could be me being picky, but I don't regard parameters or page fragments as part of the URL path. Wow, that is a tough one. One the one hand, it seems nice to be able to split stuff out more,

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2010-10-12 Thread Marko Tiikkaja
On 2010-10-13 2:10 AM +0300, Tom Lane wrote: Marko Tiikkajamarko.tiikk...@cs.helsinki.fi writes: That's actually just my ignorance I forgot to mention. As I understand it, our code currently first pushes one snapshot and then does multiple PushActiveSnapshot (or

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Postgres has COMMENT ON ... SQL for various database objects and I assumed that said comments would be stored in the system catalog. Oh. Now that's an interesting perspective ... you're suggesting that we take the comments and apply them as COMMENTS on

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2010-10-12 Thread Tom Lane
Marko Tiikkaja marko.tiikk...@cs.helsinki.fi writes: On 2010-10-13 2:10 AM +0300, Tom Lane wrote: BTW, this patch seems to be also the time to remove the AtStart_Cache() call in CommandCounterIncrement, as foreseen in the comment there. Frankly, I have no idea what to do about this. Just

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Darren Duncan
Josh Berkus wrote first: Postgres has COMMENT ON ... SQL for various database objects and I assumed that said comments would be stored in the system catalog. Oh. Now that's an interesting perspective ... you're suggesting that we take the comments and apply them as COMMENTS on the specific

Re: [HACKERS] SQL command to edit postgresql.conf, with comments

2010-10-12 Thread Darren Duncan
Richard Broersma wrote: On Tue, Oct 12, 2010 at 3:54 PM, Josh Berkus j...@agliodbs.com wrote: Oh. Now that's an interesting perspective ... you're suggesting that we take the comments and apply them as COMMENTS on the specific pg_settings? On a side note regarding comments, I'd like to make

Re: [HACKERS] security hook on table creation

2010-10-12 Thread KaiGai Kohei
(2010/10/12 23:09), Robert Haas wrote: On Tue, Oct 12, 2010 at 9:20 AM, KaiGai Koheikai...@kaigai.gr.jp wrote: As I introduced before, the idea of two hooks makes obvious where we should put the security hooks; it is next to the existing DAC checking. It is the best guideline, even if we will

Re: [HACKERS] Bug / shortcoming in has_*_privilege

2010-10-12 Thread Itagaki Takahiro
Hi, On Tue, Sep 7, 2010 at 6:16 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Jim Nasby's message of jue jun 10 17:54:43 -0400 2010: test...@workbook=# select has_table_privilege( 'public', 'test', 'SELECT' ); ERROR:  role public does not exist Here's a patch

Re: [HACKERS] Bug / shortcoming in has_*_privilege

2010-10-12 Thread Robert Haas
On Tue, Oct 12, 2010 at 10:05 PM, Itagaki Takahiro itagaki.takah...@gmail.com wrote: BTW, does the patch need to be back-patched to older versions? Since they use get_roleid_checked() instead of get_role_oid(), the fix cannot be applied cleanly to them, though it will be similar codes. I would

Re: [HACKERS] Re: [GENERAL] Text search parser's treatment of URLs and emails

2010-10-12 Thread Sushant Sinha
On Tue, 2010-10-12 at 19:31 -0400, Tom Lane wrote: This seems much of a piece with the existing proposal to allow individual words of a URL to be reported separately: https://commitfest.postgresql.org/action/patch_view?id=378 As I said in that thread, this could be done in a

Re: [HACKERS] Bug / shortcoming in has_*_privilege

2010-10-12 Thread Alvaro Herrera
Excerpts from Itagaki Takahiro's message of mar oct 12 23:05:36 -0300 2010: Hi, On Tue, Sep 7, 2010 at 6:16 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Jim Nasby's message of jue jun 10 17:54:43 -0400 2010: test...@workbook=# select has_table_privilege( 'public',

Re: [HACKERS] security label support, revised

2010-10-12 Thread Bruce Momjian
Robert Haas wrote: On Tue, Sep 28, 2010 at 3:57 AM, Shigeru HANADA han...@metrosystems.co.jp wrote: On Mon, 27 Sep 2010 21:07:33 -0400 Robert Haas robertmh...@gmail.com wrote: I found and fixed a few more issues and committed this. ?The pg_dump support had a few escaping bugs, and I

Re: [HACKERS] Issues with Quorum Commit

2010-10-12 Thread Fujii Masao
On Sat, Oct 9, 2010 at 12:12 AM, Markus Wanner mar...@bluegap.ch wrote: On 10/08/2010 04:48 PM, Fujii Masao wrote: I believe many systems require write-availability. Sure. Make sure you have enough standbies to fail over to. Unfortunately even enough standbys don't increase write-availability

Re: [HACKERS] Issues with Quorum Commit

2010-10-12 Thread Fujii Masao
On Sat, Oct 9, 2010 at 1:41 AM, Josh Berkus j...@agliodbs.com wrote: And, I'd like to know whether the master waits forever because of the standby failure in other solutions such as Oracle DataGuard, MySQL semi-synchronous replication. MySQL used to be fond of simiply failing sliently.  Not

Re: [HACKERS] Issues with Quorum Commit

2010-10-12 Thread Fujii Masao
On Sat, Oct 9, 2010 at 4:31 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Yes. But if there is no unsent WAL when the master goes down, we can start new standby without new backup by copying the timeline history file from new master to new standby and setting

Re: [HACKERS] Bug / shortcoming in has_*_privilege

2010-10-12 Thread Itagaki Takahiro
alvhe...@commandprompt.com wrote: Excerpts from Jim Nasby's message of jue jun 10 17:54:43 -0400 2010: test...@workbook=# select has_table_privilege( 'public', 'test', 'SELECT' ); ERROR:  role public does not exist Here's a patch implementing this idea. I applied it almost as-is,

Re: [HACKERS] levenshtein_less_equal (was: multibyte charater set in levenshtein function)

2010-10-12 Thread Robert Haas
On Fri, Oct 8, 2010 at 12:51 PM, Alexander Korotkov aekorot...@gmail.com wrote: Sorry, I'm pretty unconversant in git. Now, it should be ok. I spent some time hacking on this. It doesn't appear to be too easy to get levenshtein_less_equal() working without slowing down plain old levenshtein()