[HACKERS] Re: Synch Rep: direct transfer of WAL file from the primary to the standby

2009-07-06 Thread Fujii Masao
Hi, On Tue, Jun 16, 2009 at 3:13 PM, Fujii Masaomasao.fu...@gmail.com wrote: The main part of this capability is the new function to read the specified WAL file. The following is the definition of it.    pg_read_xlogfile (filename text [, restore bool]) returns setof bytea    - filename:

Re: [HACKERS] 8.5 development schedule

2009-07-06 Thread Heikki Linnakangas
Robert Haas wrote: On Fri, Jul 3, 2009 at 1:16 PM, Tom Lanet...@sss.pgh.pa.us wrote: Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Robert Haas wrote: What I've seen of Heikki's work thus far has led me to believe that his reasons for rejecting the patch were good ones, but I

Re: [HACKERS] First CommitFest: July 15th

2009-07-06 Thread Peter Eisentraut
On Saturday 04 July 2009 00:54:11 Robert Haas wrote: I think what would be more useful is if we could somehow associated metadata with each commit. Right now, for example, the author of a patch is not stored with the patch in any structured way; it's just typed in, usually but not always as

Re: [HACKERS] tsvector extraction patch

2009-07-06 Thread Peter Eisentraut
On Friday 03 July 2009 10:49:41 Hans-Juergen Schoenig -- PostgreSQL wrote: hello, this patch has not made it through yesterday, so i am trying to send it again. i made a small patch which i found useful for my personal tasks. it would be nice to see this in 8.5. if not core then maybe

Re: [HACKERS] Feedback on writing extensible modules

2009-07-06 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Dimitri Fontaine dfonta...@hi-media.com writes: Please find attached a little little patch which run process_local_preload_libraries from within a transaction. This is inevitably going to break other people's code. Put the transaction wrapper in your

[HACKERS] FYI: fdatasync vs sync_file_range

2009-07-06 Thread Fujii Masao
Hi, Using sync_file_range(2) as wal_sync_method might speed up the XLOG flush. So, I made the patch to introduce the new valid value (sync_file_range) to wal_sync_method, and performed the comparative performance measurement of fdatasync vs sync_file_range using this patch. The patch is attached

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Simon Riggs
On Sun, 2009-07-05 at 17:28 -0700, Jeff Davis wrote: This is a follow up to my old proposal here: http://archives.postgresql.org/pgsql-hackers/2008-06/msg00404.php Any input is appreciated (design problems, implementation, language ideas, or anything else). I'd like to get it into shape

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Greg Stark
On Mon, Jul 6, 2009 at 11:56 AM, Simon Riggssi...@2ndquadrant.com wrote: How will you cope with a large COPY? Surely there can be more than one concurrent insert from any backend? He only needs to handle inserts for the period they're actively being inserted into the index. Once they're in the

[HACKERS] ALTER SET DISTINCT vs. Oracle-like DBMS_STATS

2009-07-06 Thread Itagaki Takahiro
Hello, A new feature ALTER TABLE ... ALTER COLUMN ... SET DISTINCT is submitted to the next commetfest: http://archives.postgresql.org/message-id/603c8f070905041913r667b3f32oa068d758ba5f1...@mail.gmail.com but I have another approach for the plan stability issues. It might conflict ALTER SET

Re: [HACKERS] FYI: fdatasync vs sync_file_range

2009-07-06 Thread Simon Riggs
On Mon, 2009-07-06 at 17:54 +0900, Fujii Masao wrote: According to the result, using sync_file_range instead of fdatasync has little effect in the performance of postgres. [...when flushing XLOG] Why did you think it would? AFAICS the range of dirty pages will be restricted to a fairly

Re: [HACKERS] FYI: fdatasync vs sync_file_range

2009-07-06 Thread Heikki Linnakangas
Fujii Masao wrote: According to the result, using sync_file_range instead of fdatasync has little effect in the performance of postgres. When we flush the WAL, we flush everything we've written that far. I'm not surprised that sync_file_range makes no difference; it does the same amount of I/O

Re: [HACKERS] First CommitFest: July 15th

2009-07-06 Thread Bruce Momjian
Peter Eisentraut wrote: On Saturday 04 July 2009 00:54:11 Robert Haas wrote: I think what would be more useful is if we could somehow associated metadata with each commit. Right now, for example, the author of a patch is not stored with the patch in any structured way; it's just typed

[HACKERS] Reduce the memcpy call from SearchCatCache

2009-07-06 Thread Atsushi Ogawa
Hi, Here is the oprofile results of pgbench. CPU: P4 / Xeon with 2 hyper-threads, speed 2793.55 MHz (estimated) Counted GLOBAL_POWER_EVENTS events with a unit mask of 0x01 (mandatory) count 10 samples %app name symbol name 1345216.8312 ipmi_si

Re: [HACKERS] commitfest.postgresql.org

2009-07-06 Thread Kevin Grittner
Peter Eisentraut pete...@gmx.net wrote: On Saturday 04 July 2009 01:19:23 Joshua D. Drake wrote: a button says, I am about to perform X. A link *always* says, I am about to go to a new web page. That was my feeling. In addition, if the action will be preceded by a dialog (for options or

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread David Fetter
On Mon, Jul 06, 2009 at 11:56:41AM +0100, Simon Riggs wrote: On Sun, 2009-07-05 at 17:28 -0700, Jeff Davis wrote: This is a follow up to my old proposal here: http://archives.postgresql.org/pgsql-hackers/2008-06/msg00404.php Any input is appreciated (design problems, implementation,

Re: [HACKERS] Determining client_encoding from client locale

2009-07-06 Thread Heikki Linnakangas
Here's my first attempt at setting client_encoding automatically from locale. It adds a new conninfo parameter to libpq, client_encoding. If set to auto, libpq uses the encoding as returned by pg_get_encoding_from_locale(). Any other value is passed through to the server as is. psql is modified

Re: [HACKERS] First CommitFest: July 15th

2009-07-06 Thread David Fetter
On Mon, Jul 06, 2009 at 09:12:55AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: On Saturday 04 July 2009 00:54:11 Robert Haas wrote: I think what would be more useful is if we could somehow associated metadata with each commit. Right now, for example, the author of a patch is

Re: [HACKERS] Re: Synch Rep: direct transfer of WAL file from the primary to the standby

2009-07-06 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: In order for the primary server (ie. a normal backend) to read an archived file, restore_command needs to be specified in also postgresql.conf. In this case, how should we handle restore_command in recovery.conf? I confess to not having paid much

Re: [HACKERS] First CommitFest: July 15th

2009-07-06 Thread Bruce Momjian
David Fetter wrote: On Mon, Jul 06, 2009 at 09:12:55AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: On Saturday 04 July 2009 00:54:11 Robert Haas wrote: I think what would be more useful is if we could somehow associated metadata with each commit. Right now, for example,

Re: [HACKERS] tsvector extraction patch

2009-07-06 Thread Mike Rylander
On Fri, Jul 3, 2009 at 3:49 AM, Hans-Juergen Schoenig -- PostgreSQLpostg...@cybertec.at wrote: hello, this patch has not made it through yesterday, so i am trying to send it again. i made a small patch which i found useful for my personal tasks. it would be nice to see this in 8.5. if not

Re: [HACKERS] ALTER SET DISTINCT vs. Oracle-like DBMS_STATS

2009-07-06 Thread Alvaro Herrera
Itagaki Takahiro escribió: It is just similar to Oracle's DBMS_STATS package. http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_stats.htm If it were, ALTER TABLE tablename ALTER COLUMN 3rd-column SET DISITNCT 100 could be written as: INSERT INTO

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Jeff Davis
On Mon, 2009-07-06 at 12:28 +0100, Greg Stark wrote: He only needs to handle inserts for the period they're actively being inserted into the index. Once they're in the index he'll find them using the index scan. In other words this is all a proxy for the way btree locks index pages while it

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Jeff Davis
On Mon, 2009-07-06 at 11:56 +0100, Simon Riggs wrote: I think it will be useful to separate the concepts of a constraint from the concept of an index. It seems possible to have a UNIQUE constraint that doesn't help at all in locating rows, just in proving that the rows are unique. That would

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Jeff Davis
On Mon, 2009-07-06 at 07:30 -0700, David Fetter wrote: It would be useful to see a real example of what this can be used for. Constraints like these intervals can't overlap would be one. It's handy in calendaring applications, for example. Exactly, you already know my use case ;) My goal

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Greg Stark
On Mon, Jul 6, 2009 at 4:57 PM, Jeff Davispg...@j-davis.com wrote: Exactly, you already know my use case ;) My goal is a temporal key, where you can't have overlapping intervals of time, e.g. the constraint nobody can be two places at the same time. Incidentally to handle non-overlapping

[HACKERS] TODO items: Alter view add column

2009-07-06 Thread Jaime Casanova
Hi, This one is still in the TODO (and marked as not done). but i think this is partially done (at least the last entry should be removed), right? Improve ability to modify views via ALTER TABLE * Re: idea: storing view source in system catalogs * modifying views * Re: patch: Add

Re: [HACKERS] 8.4, One-Time Filter and subquery ( ... FROM function() union all ... )

2009-07-06 Thread Tom Lane
Sergey Burladyan eshkin...@gmail.com writes: 8.4 always execute functions in this subquery, even if result do not need it. 8.3 correctly optimize this and do not execute this functions, here is example: create function foo() returns int language sql as $$ select pg_sleep(5); select 1 $$;

Re: [HACKERS] Show method of index

2009-07-06 Thread Peter Eisentraut
On Tuesday 12 May 2009 08:36:20 Khee Chin wrote: postgres=# \di idx_foo_bt_fooi; List of relations Schema | Name | Type | Owner | Table | Method | Definition +-+---+---+---++---

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Jeff Davis
On Mon, 2009-07-06 at 17:02 +0100, Greg Stark wrote: On Mon, Jul 6, 2009 at 4:57 PM, Jeff Davispg...@j-davis.com wrote: Exactly, you already know my use case ;) My goal is a temporal key, where you can't have overlapping intervals of time, e.g. the constraint nobody can be two places at

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Simon Riggs
On Mon, 2009-07-06 at 08:50 -0700, Jeff Davis wrote: On Mon, 2009-07-06 at 11:56 +0100, Simon Riggs wrote: I think it will be useful to separate the concepts of a constraint from the concept of an index. It seems possible to have a UNIQUE constraint that doesn't help at all in locating

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Greg Stark
On Mon, Jul 6, 2009 at 6:20 PM, Jeff Davispg...@j-davis.com wrote: On Mon, 2009-07-06 at 17:02 +0100, Greg Stark wrote: On Mon, Jul 6, 2009 at 4:57 PM, Jeff Davispg...@j-davis.com wrote: Exactly, you already know my use case ;) My goal is a temporal key, where you can't have overlapping

Re: [HACKERS] TODO items: Alter view add column

2009-07-06 Thread Bruce Momjian
Jaime Casanova wrote: Hi, This one is still in the TODO (and marked as not done). but i think this is partially done (at least the last entry should be removed), right? Improve ability to modify views via ALTER TABLE * Re: idea: storing view source in system catalogs * modifying

Re: [HACKERS] 8.4, One-Time Filter and subquery ( ... FROM function() union all ... )

2009-07-06 Thread Tom Lane
Sergey Burladyan eshkin...@gmail.com writes: PostgreSQL 8.4.0 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Debian 4.3.3-13) 4.3.3, 32-bit EXPLAIN ANALYZE select * from (select 1 as i, r from foo() r union all select 2, r from foo() r) as x where i = 3;

Re: [HACKERS] information_schema.columns changes needed for OLEDB

2009-07-06 Thread Peter Eisentraut
On Friday 22 May 2009 18:27:01 Konstantin Izmailov wrote: 3. character_octet_length should always be double of character_maximum_length (due to Unicode character size on Windows which is 2). I have the attached patch that would make character_octet_length the product of character_octet_length

Re: [HACKERS] information_schema.columns changes needed for OLEDB

2009-07-06 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: I have the attached patch that would make character_octet_length the product of character_octet_length and the maximum octet length of a single character in the selected server encoding. So for UTF-8, this would be factor 4. This doesn't exactly

[HACKERS] Maintenance Policy?

2009-07-06 Thread David E. Wheeler
Howdy Hackers, Is there a published maintenance policy somewhere? Something that says for how long the project supports minor releases of PostgreSQL. For example, does 7.4 still get bug fixes and minor releases? If not, how does one know when support for a major version has been dropped?

Re: [HACKERS] Reduce the memcpy call from SearchCatCache

2009-07-06 Thread Tom Lane
Atsushi Ogawa a_og...@hi-ho.ne.jp writes: Attached patch is reduce the memcpy calls from SearchCatCache and SearchCatCacheList. This patch directly uses cache-cc_skey in looking for hash table. How much did you test this patch? I'm fairly sure it will break things. There are cases where cache

[HACKERS] Small foreign key error message improvement

2009-07-06 Thread Peter Eisentraut
I recently had a puzzler, which involved this sort of accidental parser error: CREATE TABLE foo (a int, b text, PRIMARY KEY (a, b)); CREATE TABLE bar (x int, y text, FOREIGN KEY (q, r) REFERENCES foo (m, n)); ERROR: column q referenced in foreign key constraint does not exist versus CREATE

[HACKERS] pgxs and make check message

2009-07-06 Thread Peter Eisentraut
Isn't it a bad idea that this from pgxs.mk does not return a non-zero status? check: @echo 'make check' is not supported. @echo Do 'make install', then 'make installcheck' instead. Or is something relying on a nonexisting test suite passing successfully? -- Sent via pgsql-hackers

[HACKERS] please, actualize czech link on international sites list

2009-07-06 Thread Pavel Stehule
Hello we changed url from www.pgsql.cz to www.postgres.cz. Please, actualise link on http://www.postgresql.org/community/international thank you Pavel Stehule -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] please, actualize czech link on international sites list

2009-07-06 Thread Stefan Kaltenbrunner
Pavel Stehule wrote: Hello we changed url from www.pgsql.cz to www.postgres.cz. Please, actualise link on http://www.postgresql.org/community/international done Stefan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Small foreign key error message improvement

2009-07-06 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: I recently had a puzzler, which involved this sort of accidental parser error: CREATE TABLE foo (a int, b text, PRIMARY KEY (a, b)); CREATE TABLE bar (x int, y text, FOREIGN KEY (q, r) REFERENCES foo (m, n)); ERROR: column q referenced in foreign key

Re: [HACKERS] TODO items: Alter view add column

2009-07-06 Thread Bernd Helmle
--On Montag, Juli 06, 2009 13:51:36 -0400 Bruce Momjian br...@momjian.us wrote: I think we only completed this for 8.4: * Allow CREATE OR REPLACE VIEW to add columns to the end of a view (Robert Haas) Yes, this is done, but we're still not able to drop or

Re: [HACKERS] please, actualize czech link on international sites list

2009-07-06 Thread Pavel Stehule
2009/7/6 Stefan Kaltenbrunner ste...@kaltenbrunner.cc: Pavel Stehule wrote: Hello we changed url from www.pgsql.cz to www.postgres.cz. Please, actualise link on http://www.postgresql.org/community/international done thank you Pavel Stefan -- Sent via pgsql-hackers mailing list

Re: [HACKERS] WIP: generalized index constraints

2009-07-06 Thread Jeff Davis
On Mon, 2009-07-06 at 18:27 +0100, Simon Riggs wrote: In many cases, people add unique indexes solely to allow replication to work correctly. The index itself may never be used, especially in high volume applications. Interesting. Maybe we should at least try to leave room for this feature to

Re: [HACKERS] TODO items: Alter view add column

2009-07-06 Thread Jaime Casanova
On Mon, Jul 6, 2009 at 3:15 PM, Bernd Helmlemaili...@oopsware.de wrote: --On Montag, Juli 06, 2009 13:51:36 -0400 Bruce Momjian br...@momjian.us wrote: I think we only completed this for 8.4:             * Allow CREATE OR REPLACE VIEW to add columns to the end                of a view

Re: [HACKERS] TODO items: Alter view add column

2009-07-06 Thread Bruce Momjian
Jaime Casanova wrote: On Mon, Jul 6, 2009 at 3:15 PM, Bernd Helmlemaili...@oopsware.de wrote: --On Montag, Juli 06, 2009 13:51:36 -0400 Bruce Momjian br...@momjian.us wrote: I think we only completed this for 8.4: ? ? ? ? ? ? * Allow CREATE OR REPLACE VIEW to add columns to the end

Re: [HACKERS] TODO items: Alter view add column

2009-07-06 Thread Alvaro Herrera
Jaime Casanova wrote: On Mon, Jul 6, 2009 at 3:15 PM, Bernd Helmlemaili...@oopsware.de wrote: --On Montag, Juli 06, 2009 13:51:36 -0400 Bruce Momjian br...@momjian.us wrote: I think we only completed this for 8.4:             * Allow CREATE OR REPLACE VIEW to add columns to the end  

Re: [HACKERS] TODO items: Alter view add column

2009-07-06 Thread Kevin Grittner
Bruce Momjian br...@momjian.us wrote: The problem is that third item is an email subject, not text we can typically modify. Is it really more important that the line in the TODO list reflect the subject line of the referenced email than that it accurately describe the work we want done? If

Re: [HACKERS] Join optimization for inheritance tables

2009-07-06 Thread Nedyalko Borisov
Tom Lane wrote: Nedyalko Borisov nedya...@asterdata.com writes: In summary, we are making two suggestions: 1. Extend the optimizer to consider joins between child tables when hierarchies are joined together. We already handle this for the case where the join is nestloop with inner

Re: [HACKERS] Join optimization for inheritance tables

2009-07-06 Thread Greg Stark
On Mon, Jul 6, 2009 at 10:23 PM, Nedyalko Borisovnedya...@asterdata.com wrote: For example, typical observed scenario is: optimizer chooses Merge Join for two partitioned tables like the plan below: Merge Cond: (table1.id = table2.id)   - Sort       Sort Key: id       - Append           -

Re: [HACKERS] ALTER SET DISTINCT vs. Oracle-like DBMS_STATS

2009-07-06 Thread Itagaki Takahiro
Euler Taveira de Oliveira eu...@timbira.com wrote: INSERT INTO dbms_stats.columns(starelid, ataattnum, stadistinct) VALUES ('tablename'::regclass, 3, 100); Why wouldn't you implement this through reloptions? Because it is column-based and not table-based? In this case, we

Re: [HACKERS] Re: Synch Rep: direct transfer of WAL file from the primary to the standby

2009-07-06 Thread Fujii Masao
Hi, Thanks for the comment! On Tue, Jul 7, 2009 at 12:16 AM, Tom Lanet...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: In order for the primary server (ie. a normal backend) to read an archived file, restore_command needs to be specified in also postgresql.conf. In this

Re: [HACKERS] Patch for automating partitions in PostgreSQL 8.4 Beta 2

2009-07-06 Thread Jaime Casanova
On Mon, Jun 8, 2009 at 9:02 AM, Kedar Potdarkedar.pot...@gmail.com wrote: Hi, PFA patch, readme for automating partitions in PostgreSQL 8.4 Beta 2 and testcases. if you are still working on this, can you please update the patch to cvs head? -- Atentamente, Jaime Casanova Soporte y

[HACKERS] *_collapse_limit, geqo_threshold

2009-07-06 Thread Robert Haas
I think we should try to do something about join_collapse_limit, from_collapse_limit, and geqo_threshold for 8.5. http://archives.postgresql.org/message-id/9134.1243289...@sss.pgh.pa.us http://archives.postgresql.org/message-id/603c8f070905251800g5b86d2dav26eca7f417d15...@mail.gmail.com I'm