Re: [HACKERS] pg_archivecleanup should remove WAL files also in pg_xlog?

2010-12-13 Thread Heikki Linnakangas
On 13.12.2010 09:50, Fujii Masao wrote: On Mon, Dec 13, 2010 at 4:28 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 13.12.2010 08:44, Fujii Masao wrote: pg_archivecleanup removes unnecessary WAL files from the archive, but not from pg_xlog directory. So, after failover,

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Pavel Stehule
Hello this is little bit offtopic, sorry. I am thinking, so we need a standard associative array support in core - like Perl, Python or Javascript. So, I don't think, so migration of hstore to core is good idea. Regards Pavel Stehule 2010/12/13 Jan Urbański wulc...@wulczer.org: It would be

Re: [HACKERS] Instrument checkpoint sync calls

2010-12-13 Thread Greg Smith
Robert Haas wrote: I'm wondering why md.c is converting the results from an exact value to a floating point, only to have xlog.c turn around and convert back to an integer. I think it could just return milliseconds directly, or if you're worried about a checkpoint that takes more than 24 days

Re: [HACKERS] pg_archivecleanup should remove WAL files also in pg_xlog?

2010-12-13 Thread Fujii Masao
On Mon, Dec 13, 2010 at 5:01 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: If the only consequence is that you get some extra WAL files in the archive, until pg_archivecleanup runs again, I think we can just live with it. We might get some extra WAL files also in pg_xlog.

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Dmitriy Igrishin
Hey Pavel, 2010/12/13 Pavel Stehule pavel.steh...@gmail.com Hello this is little bit offtopic, sorry. I am thinking, so we need a standard associative array support in core - like Perl, Python or Javascript. So, I don't think, so migration of hstore to core is good idea. Could you tell

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread Yeb Havinga
On 2010-12-13 03:28, Robert Haas wrote: Well, I'm not real familiar with contingency tables, but it seems like you could end up needing to store a huge amount of data to get any benefit out of it, in some cases. For example, in the United States, there are over 40,000 postal codes, and some

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: The incremental FK checks are designed on the assumption that the constraint condition held before; they aren't likely to behave very sanely if the data is bad. I'd want to see a whole lot more analysis of the resulting behavior before even considering an

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread tv
On 2010-12-13 03:28, Robert Haas wrote: Well, I'm not real familiar with contingency tables, but it seems like you could end up needing to store a huge amount of data to get any benefit out of it, in some cases. For example, in the United States, there are over 40,000 postal codes, and some

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread Nicolas Barbier
2010/12/13 Tom Lane t...@sss.pgh.pa.us: But allow me to harbor doubts that they really intend to allow someone to force a constraint to be considered valid without any verification. Table constraints are either enforced or not enforced. Domain constraints and assertions are always enforced.,

[HACKERS] WaitLatch

2010-12-13 Thread aaliya zarrin
Hi All, drainSelfPipe() function will read the data and remove it from the descriptor? Coz the signal (SIGUSR1) is writing sata to selfPipe descriptor but unable to wake up latch on select system call. Data is not avaialable at select in WaitLatch fun. Coz it is read by drailSelfPipe(). So How

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread Peter Geoghegan
On 13 December 2010 10:30, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Seriously, real-world use cases such as Kevin's one seems to warrant that we are able to create a table withouth enforcing the FK. That's horrid, yes, that's needed, too. Maybe some operations would have to be instructed

Re: [HACKERS] rest of works for security providers in v9.1

2010-12-13 Thread Robert Haas
2010/12/12 KaiGai Kohei kai...@ak.jp.nec.com: I'd like to see opinions what facilities should be developed to the current v9.1 development cycle. It seems to me that the next commit after the label-switcher-function patch ought to be a contrib module that implements a basic form of SE-Linux

Re: [HACKERS] Instrument checkpoint sync calls

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 3:19 AM, Greg Smith g...@2ndquadrant.com wrote: Robert Haas wrote: I'm wondering why md.c is converting the results from an exact value to a floating point, only to have xlog.c turn around and convert back to an integer.  I think it could just return milliseconds

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 12:59 AM, Rob Wultsch wult...@gmail.com wrote: On Sun, Dec 12, 2010 at 7:24 PM, Andrew Dunstan and...@dunslane.net wrote: In fact it's possible now to disable FK enforcement, by disabling the triggers. It's definitely a footgun though. Just the other day I was asked how

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 7:09 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Attached is an updated patch, but that issue with limited number of backup blocks needs to be resolved. The straightforward way would be to change the WAL format to increase the limit. Eh, is that

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Heikki Linnakangas
On 13.12.2010 15:04, Robert Haas wrote: On Mon, Dec 13, 2010 at 7:09 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Attached is an updated patch, but that issue with limited number of backup blocks needs to be resolved. The straightforward way would be to change the WAL

Increasing max # of backup blocks (was Re: [HACKERS] GiST insert algorithm rewrite)

2010-12-13 Thread Heikki Linnakangas
On 13.12.2010 15:20, Heikki Linnakangas wrote: On 13.12.2010 15:04, Robert Haas wrote: On Mon, Dec 13, 2010 at 7:09 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Attached is an updated patch, but that issue with limited number of backup blocks needs to be resolved. The

Re: [HACKERS] rest of works for security providers in v9.1

2010-12-13 Thread KaiGai Kohei
(2010/12/13 21:53), Robert Haas wrote: 2010/12/12 KaiGai Koheikai...@ak.jp.nec.com: I'd like to see opinions what facilities should be developed to the current v9.1 development cycle. It seems to me that the next commit after the label-switcher-function patch ought to be a contrib module that

Re: [HACKERS] pg_execute_from_file, patch v10

2010-12-13 Thread Itagaki Takahiro
On Sun, Dec 12, 2010 at 06:08, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: The other infrastructure patch that has been mark ready for commit then commented further upon by Tom is $subject, even if the function provided as been renamed to pg_execute_sql_file(). Please find attached the

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Pavel Stehule
2010/12/13 Dmitriy Igrishin dmit...@gmail.com: Hey Pavel, 2010/12/13 Pavel Stehule pavel.steh...@gmail.com Hello this is little bit offtopic, sorry. I am thinking, so we need a standard associative array support in core - like Perl, Python or Javascript. So, I don't think, so migration

Re: [HACKERS] pg_execute_from_file, patch v10

2010-12-13 Thread Dimitri Fontaine
Itagaki Takahiro itagaki.takah...@gmail.com writes: I think the version is almost OK, but I have a couple of comments: - Why do you need directory_fctx in genfile.h ? I then use it in extension.c, this way: typedef struct extension_fctx { directory_fctx dir; ExtensionList

Re: [HACKERS] ALTER EXTENSION ... UPGRADE;

2010-12-13 Thread Aidan Van Dyk
On Sat, Dec 11, 2010 at 4:35 PM, David E. Wheeler da...@kineticode.com wrote: What about having the following keys supported in the control file:  upgrade_version = 'script.version.sql'  upgrade_all = 'script.sql' Why not just use an upgrade script naming convention? Think: Convention over

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-13 Thread Alexey Klyukin
On Dec 9, 2010, at 7:32 PM, Tim Bunce wrote: On Wed, Dec 08, 2010 at 09:21:05AM -0800, David E. Wheeler wrote: On Dec 8, 2010, at 9:14 AM, Tim Bunce wrote: Do you have any more improvements in the pipeline? I'd like to add $arrayref = decode_array_literal('{2,3}') and maybe $hashref =

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Andres Freund
On Monday 13 December 2010 15:27:48 Pavel Stehule wrote: 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: Hey Pavel, 2010/12/13 Pavel Stehule pavel.steh...@gmail.com Hello this is little bit offtopic, sorry. I am thinking, so we need a standard associative array support in

Re: [HACKERS] ALTER EXTENSION ... UPGRADE;

2010-12-13 Thread Dimitri Fontaine
Aidan Van Dyk ai...@highrise.ca writes: Mainly, because of the situation where I have may versions that can all be upgraded from the same script. I'ld much rather distribution just 3 scripts (install + 2 upgrades), and a control file with something like this (pretend I'm on version 2.6)

Re: [HACKERS] Optimize PL/Perl function argument passing [PATCH]

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 09:42 AM, Alexey Klyukin wrote: I used to work on a patch that converts postgres arrays into perl array references: http://archives.postgresql.org/pgsql-hackers/2009-11/msg01552.php I have a newer patch, which is, however, limited to one-dimensional resulting arrays. If there's

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Dmitriy Igrishin
Interesting argument. I can ask, how many people knows what is tsvector or tsquery ? Or how many people knows what is polygon or path ? The answer is: everyone who need or using it. Hstore is a proven and well designed solution. And in fact I am surprising why it does not in core yet?!

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Pavel Stehule
2010/12/13 Andres Freund and...@anarazel.de: On Monday 13 December 2010 15:27:48 Pavel Stehule wrote: 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: Hey Pavel, 2010/12/13 Pavel Stehule pavel.steh...@gmail.com Hello this is little bit offtopic, sorry. I am thinking, so we need a

Re: [HACKERS] pg_archivecleanup should remove WAL files also in pg_xlog?

2010-12-13 Thread Fujii Masao
On Mon, Dec 13, 2010 at 6:02 PM, Fujii Masao masao.fu...@gmail.com wrote: Yep, that's recommended in the document, but I don't want to use that. Because that might make new master fail to archive WAL file because of existence of half-baked file in the archive, after failover. This can happen

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Andres Freund
On Monday 13 December 2010 16:01:35 Pavel Stehule wrote: 2010/12/13 Andres Freund and...@anarazel.de: On Monday 13 December 2010 15:27:48 Pavel Stehule wrote: 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: Hey Pavel, 2010/12/13 Pavel Stehule pavel.steh...@gmail.com Hello

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Pavel Stehule
2010/12/13 Dmitriy Igrishin dmit...@gmail.com: Interesting argument. I can ask, how many people knows what is tsvector or tsquery ? Or how many people knows what is polygon or path ? TSearch isn't good example. There are not a common interface for fulltext. The answer is: everyone who

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: But that creates a new problem: There's a maximum of three backup blocks per WAL record, but a GiST page can be split into any number of child pages as one operation. You might run out of backup block slots. Attached is an

Re: [HACKERS] ALTER EXTENSION ... UPGRADE;

2010-12-13 Thread Aidan Van Dyk
On Mon, Dec 13, 2010 at 9:55 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Again, I'ld love for the version to support some sort of prefix or wildcard matching, so I could do:     upgrade-1.* =  $EXT-upgrade-1.sql     upgrade-2.* =  $EXT-upgrade-2.sql Problem is: what to do if a single

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Pavel Stehule
name and interface - hstore is designed as external module - a internal class can be designed different. Could you actually name such a difference rather than pointing to some airily hint of one? That would make it way much easier to see where you want to go. My idea is: somevar['key'] =

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread Tom Lane
Tomas Vondra t...@fuzzy.cz writes: Well, until this point we've discussed failure cases involving 'AND' conditions. What about 'OR' conditions? I think the current optimizer computes the selectivity as 's1+s2 - s1*s2' (at least that's what I found in backend/optimizer/path/clausesel.c:630).

Re: [HACKERS] initdb failure with Postgres 8.4.4

2010-12-13 Thread BRUSSER Michael
On Fri, Dec 10, 2010 at 10:54 AM, Andrew Dunstan and...@dunslane.net wrote: Here's my understanding. It's not initdb that's really complaining. The timezone files are not inputs to initdb. It's the postgres that initdb invokes that's complaining. Postges will look for the share file in two

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sun, Dec 12, 2010 at 9:16 PM, Tomas Vondra t...@fuzzy.cz wrote: The proposed solution is based on contingency tables, built for selected groups of columns (not for each possible group). And the contingency table gives you the ability to estimate the

Re: [HACKERS] Problem with pg_upgrade (8.4 - 9.0) due to ALTER DATABASE SET ROLE

2010-12-13 Thread Tom Lane
Florian Pflug f...@phlo.org writes: On Dec13, 2010, at 00:16 , Robert Haas wrote: And in fact it strikes me that we might not have much choice about how to fix this. I think we are not going to retroactively change the behavior of ALTER DATABASE .. SET ROLE in a released version, but yet we

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread Simon Riggs
On Mon, 2010-12-13 at 11:54 +, Peter Geoghegan wrote: On 13 December 2010 10:30, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Seriously, real-world use cases such as Kevin's one seems to warrant that we are able to create a table withouth enforcing the FK. That's horrid, yes, that's

Re: [HACKERS] ALTER EXTENSION ... UPGRADE;

2010-12-13 Thread Tom Lane
Aidan Van Dyk ai...@highrise.ca writes: On Sat, Dec 11, 2010 at 4:35 PM, David E. Wheeler da...@kineticode.com wrote: Why not just use an upgrade script naming convention? Mainly, because of the situation where I have may versions that can all be upgraded from the same script. I'ld much

Re: [HACKERS] initdb failure with Postgres 8.4.4

2010-12-13 Thread Alvaro Herrera
Excerpts from BRUSSER Michael's message of lun dic 13 12:34:49 -0300 2010: I'm not sure if our current approach would work with v8.4. This is what we do in the nutshell: - build Postgres - do not run install - collect all generated libraries, executables and input files and pack them

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: Could you actually name such a difference rather than pointing to some airily hint of one? That would make it way much easier to see where you want to go. My idea is: somevar['key'] = value value = somevar['key']; or with constructor somevar

Re: [HACKERS] initdb failure with Postgres 8.4.4

2010-12-13 Thread Tom Lane
BRUSSER Michael michael.brus...@3ds.com writes: I'm not sure if our current approach would work with v8.4. This is what we do in the nutshell: - build Postgres - do not run install - collect all generated libraries, executables and input files and pack them along with other app -

Re: [HACKERS] SQL/MED - file_fdw

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 01:31 AM, Itagaki Takahiro wrote: On Sat, Dec 11, 2010 at 05:30, Andrew Dunstanand...@dunslane.net wrote: On 12/04/2010 11:11 PM, Itagaki Takahiro wrote: One exports the copy functions from the core, and another implements file_fdw using the infrastructure. Who is actually

Re: [HACKERS] rest of works for security providers in v9.1

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 8:32 AM, KaiGai Kohei kai...@kaigai.gr.jp wrote: (2010/12/13 21:53), Robert Haas wrote: 2010/12/12 KaiGai Koheikai...@ak.jp.nec.com: I'd like to see opinions what facilities should be developed to the current v9.1 development cycle. It seems to me that the next

Re: [HACKERS] Complier warnings on mingw gcc 4.5.0

2010-12-13 Thread Andrew Dunstan
On 11/01/2010 10:10 PM, Itagaki Takahiro wrote: On Tue, Nov 2, 2010 at 8:43 AM, Hiroshi Inouein...@tpf.co.jp wrote: The problem which was fixed by your old patch is at runtime not at compilation time. Is it fixed with gcc 4.5? Now it works as far as simple test, including core functions and

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Oleg Bartunov
My most serious pro about hstore in core is a better dump/restore support. Also, since we have so much better hstore and people started to use it in their projects, it'd be great to have built-in feature in PostgreSQL, which mimic key-value or document-oriented database. Oleg On Mon, 13

Re: [HACKERS] ALTER EXTENSION ... UPGRADE;

2010-12-13 Thread Alvaro Herrera
Excerpts from Tom Lane's message of lun dic 13 12:50:43 -0300 2010: I see no advantage of this over a script per version combination, so long as you allow scripts to \include each other. Hmm, are the upgrade scripts going to be run via SPI? -- Álvaro Herrera alvhe...@commandprompt.com The

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 10:49 AM, Simon Riggs si...@2ndquadrant.com wrote: (a) ALTER TABLE ... ADD FOREIGN KEY ... NOT VALIDATED INITIALLY; will add a FK but NOT run the check - we mark it as check pending. Lock held: ShareRowExclusiveLock Seems about right. Not sure whether the lock strength

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Dmitriy Igrishin
There are a lot of operators and functions to work with hstore. Does it worth it to implement similar things only to make it possible using operator [] ? 2010/12/13 Pavel Stehule pavel.steh...@gmail.com name and interface - hstore is designed as external module - a internal class can be

Re: [HACKERS] SQL/MED - file_fdw

2010-12-13 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Hmm. I don't think that's going to expose enough for what I want to be able to do. I actually had in mind exposing lower level routines like CopyReadAttibutesCSV/CopyReadAttributesText and allowing the Foreign Data Wrapper to manipulate the raw

Re: [HACKERS] ALTER EXTENSION ... UPGRADE;

2010-12-13 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: I see no advantage of this over a script per version combination, so long as you allow scripts to \include each other. I guess the following should do: SELECT pg_execute_sql_file('upgrade-1.sql'); But I rather prefer the 2-liner control file, myself:

Re: [HACKERS] Problem with pg_upgrade (8.4 - 9.0) due to ALTER DATABASE SET ROLE

2010-12-13 Thread Florian Pflug
On Dec13, 2010, at 16:40 , Tom Lane wrote: Florian Pflug f...@phlo.org writes: On Dec13, 2010, at 00:16 , Robert Haas wrote: And in fact it strikes me that we might not have much choice about how to fix this. I think we are not going to retroactively change the behavior of ALTER DATABASE ..

Re: [HACKERS] SQL/MED - file_fdw

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 11:12 AM, Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: Hmm. I don't think that's going to expose enough for what I want to be able to do. I actually had in mind exposing lower level routines like CopyReadAttibutesCSV/CopyReadAttributesText and allowing the Foreign

Re: [HACKERS] SQL/MED - core functionality

2010-12-13 Thread Hitoshi Harada
2010/12/14 Shigeru HANADA han...@metrosystems.co.jp: On Thu, 25 Nov 2010 15:03:29 +0200 Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: I propose the attached API instead. This has a clear separation between plan and execution. I'm sure we'll have to extend the API in the future

Re: [HACKERS] SQL/MED - core functionality

2010-12-13 Thread Hitoshi Harada
2010/12/13 Shigeru HANADA han...@metrosystems.co.jp: On Sun, 12 Dec 2010 23:47:53 +0200 Peter Eisentraut pete...@gmx.net wrote: On ons, 2010-12-01 at 12:30 +0900, Hitoshi Harada wrote: From a user's view, this is very long way to see a simplest foreign table. I know it is based on the

Re: [HACKERS] [COMMITTERS] pgsql: Use symbolic names not octal constants for file permission flags

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 12:54 AM, Glen Knowles wrote: On Sun, Dec 12, 2010 at 8:16 AM, Tom Lane t...@sss.pgh.pa.us mailto:t...@sss.pgh.pa.us wrote: What are the values of _S_IREAD and _S_IWRITE, anyway? I'm still wondering how come the previous coding with hardwired constants behaved

Re: [HACKERS] Complier warnings on mingw gcc 4.5.0

2010-12-13 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 11/01/2010 10:10 PM, Itagaki Takahiro wrote: BTW, with out without the above fix, regression test failed with weird error if the server is built with gcc 4.5. However, server can run if I started it manually with PGPORT or -o --port=X. We might

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Pavel Stehule
2010/12/13 Dmitriy Igrishin dmit...@gmail.com: There are a lot of operators and functions to work with hstore. Does it worth it to implement similar things only to make it possible using operator [] ? yes 2010/12/13 Pavel Stehule pavel.steh...@gmail.com name and interface - hstore is

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread Peter Geoghegan
On 13 December 2010 16:08, Robert Haas robertmh...@gmail.com wrote: On Mon, Dec 13, 2010 at 10:49 AM, Simon Riggs si...@2ndquadrant.com wrote: 2. pg_validate_foreign_key('constraint name'); Returns immediately if FK is valid Returns SETOF rows that violate the constraint, or if no rows are

Re: [HACKERS] initdb failure with Postgres 8.4.4

2010-12-13 Thread BRUSSER Michael
Here is what you should do: 1. Build Postgres with --prefix set to some empty directory. 2. Run install. 3. Bundle up the resulting install tree as part of your tarball. Do not editorialize upon the relative locations of its contents. 4. Drop the install tree wherever you want on the target

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Greg Stark
On Mon, Dec 13, 2010 at 3:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think you need to refactor the operation so that there's one WAL record per child page, or something along that line.  I concede this might be diffcult :-( If it's only the backup blocks that matter couldn't you generate

Re: [HACKERS] initdb failure with Postgres 8.4.4

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 12:16 PM, BRUSSER Michael wrote: Here is what you should do: 1. Build Postgres with --prefix set to some empty directory. 2. Run install. 3. Bundle up the resulting install tree as part of your tarball. Do not editorialize upon the relative locations of its contents. 4. Drop

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread David Fetter
On Mon, Dec 13, 2010 at 05:15:29PM +, Peter Geoghegan wrote: On 13 December 2010 16:08, Robert Haas robertmh...@gmail.com wrote: On Mon, Dec 13, 2010 at 10:49 AM, Simon Riggs si...@2ndquadrant.com wrote: 2. pg_validate_foreign_key('constraint name'); Returns immediately if FK is valid

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Dmitriy Igrishin
2010/12/13 Pavel Stehule pavel.steh...@gmail.com 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: There are a lot of operators and functions to work with hstore. Does it worth it to implement similar things only to make it possible using operator [] ? yes 2010/12/13 Pavel Stehule

Re: [HACKERS] unlogged tables

2010-12-13 Thread Robert Haas
On Fri, Dec 10, 2010 at 11:16 PM, Robert Haas robertmh...@gmail.com wrote: I think the first patch (relpersistence-v4.patch) is ready to commit, So I've now committed it. and the third patch to allow synchronous commits to become asynchronous when it doesn't matter

[HACKERS] CommitFest wrap-up

2010-12-13 Thread Robert Haas
We're now just a day or two from the end of this CommitFest and there are still a LOT of open patches - to be specific, 23.Here's a brief synopsis of where we are with the others, all IMO of course. - fix for seg picksplit function - I don't have confidence this change is for the best and can't

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Heikki Linnakangas
On 13.12.2010 19:19, Greg Stark wrote: On Mon, Dec 13, 2010 at 3:14 PM, Tom Lanet...@sss.pgh.pa.us wrote: I think you need to refactor the operation so that there's one WAL record per child page, or something along that line. I concede this might be diffcult :-( If it's only the backup

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 13.12.2010 19:19, Greg Stark wrote: If it's only the backup blocks that matter couldn't you generate noop WAL records with just the full page image in them. Once all those are generated then generate the actual split operation

Re: [HACKERS] CommitFest wrap-up

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 12:37 PM, Robert Haas wrote: - SQL/MED - core functionality - Seems clear to move this to the next CF and keep working on it. [...] - SQL/MED - file_fdw - Discussion is ongoing, but I see no harm in marking this Returned with Feedback for now in anticipation of a new version

Re: [HACKERS] Complier warnings on mingw gcc 4.5.0

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 12:01 PM, Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: On 11/01/2010 10:10 PM, Itagaki Takahiro wrote: BTW, with out without the above fix, regression test failed with weird error if the server is built with gcc 4.5. However, server can run if I started it

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread Joshua Tolley
On Sun, Dec 12, 2010 at 07:10:44PM -0800, Nathan Boley wrote: Another quick note: I think that storing the full contingency table is wasteful since the marginals are already stored in the single column statistics. Look at copulas [2] ( FWIW I think that Josh Tolley was looking at this a couple

Re: [HACKERS] initdb failure with Postgres 8.4.4

2010-12-13 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 12/13/2010 12:16 PM, BRUSSER Michael wrote: Would it be a completely crazy idea if I try to modify Postgres to look at some env. var (similar to PGDATA) and if exists and path is valid look there for the timezone files? Yes, that's only the

Re: [HACKERS] CommitFest wrap-up

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 12:55 PM, Andrew Dunstan and...@dunslane.net wrote: On 12/13/2010 12:37 PM, Robert Haas wrote: - SQL/MED - core functionality - Seems clear to move this to the next CF and keep working on it. [...] - SQL/MED - file_fdw - Discussion is ongoing, but I see no harm in

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Pavel Stehule
2010/12/13 Dmitriy Igrishin dmit...@gmail.com: 2010/12/13 Pavel Stehule pavel.steh...@gmail.com 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: There are a lot of operators and functions to work with hstore. Does it worth it to implement similar things only to make it possible using

Re: [HACKERS] Complier warnings on mingw gcc 4.5.0

2010-12-13 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 12/13/2010 12:01 PM, Tom Lane wrote: It smells a little bit like an optimization bug. Does dialing down to -O0 make it go away? Sadly, no. I'm testing downgrading the compiler now. Mph. FWIW, I see that my last build of Postgres for Fedora 14

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread David E. Wheeler
On Dec 13, 2010, at 8:06 AM, Oleg Bartunov wrote: My most serious pro about hstore in core is a better dump/restore support. Also, since we have so much better hstore and people started to use it in their projects, it'd be great to have built-in feature in PostgreSQL, which mimic key-value

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Heikki Linnakangas
On 13.12.2010 19:48, Tom Lane wrote: Heikki Linnakangasheikki.linnakan...@enterprisedb.com writes: On 13.12.2010 19:19, Greg Stark wrote: If it's only the backup blocks that matter couldn't you generate noop WAL records with just the full page image in them. Once all those are generated then

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 13.12.2010 19:48, Tom Lane wrote: Yeah. Wouldn't the original page-split record have been carrying full page images already? Yes. BTW, the original split record doesn't run into the limit because it doesn't use the

Re: [HACKERS] GiST insert algorithm rewrite

2010-12-13 Thread Heikki Linnakangas
On 13.12.2010 20:30, Tom Lane wrote: Can we fix it so that each child page is updated, and its downlink inserted, as a separate atomic action? That'd require each intermediate state to be consistent and crash-safe, but I think you really need the intermediate states to be consistent anyway

Re: [HACKERS] ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

2010-12-13 Thread Simon Riggs
On Mon, 2010-12-13 at 17:15 +, Peter Geoghegan wrote: On 13 December 2010 16:08, Robert Haas robertmh...@gmail.com wrote: On Mon, Dec 13, 2010 at 10:49 AM, Simon Riggs si...@2ndquadrant.com wrote: 2. pg_validate_foreign_key('constraint name'); Returns immediately if FK is valid

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread Tomas Vondra
Dne 13.12.2010 16:34, Tom Lane napsal(a): Tomas Vondra t...@fuzzy.cz writes: Well, until this point we've discussed failure cases involving 'AND' conditions. What about 'OR' conditions? I think the current optimizer computes the selectivity as 's1+s2 - s1*s2' (at least that's what I found in

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread Tomas Vondra
Dne 13.12.2010 16:38, Tom Lane napsal(a): The reason that this wasn't done years ago is precisely that nobody's figured out how to do it with a tolerable amount of stats data and a tolerable amount of processing time (both at ANALYZE time and during query planning). It's not hard to see what

Re: [HACKERS] CommitFest wrap-up

2010-12-13 Thread David Fetter
On Mon, Dec 13, 2010 at 12:37:52PM -0500, Robert Haas wrote: We're now just a day or two from the end of this CommitFest and there are still a LOT of open patches - to be specific, 23.Here's a brief synopsis of where we are with the others, all IMO of course. [snip] - Writeable CTEs - I think

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread Tomas Vondra
Dne 13.12.2010 18:59, Joshua Tolley napsal(a): On Sun, Dec 12, 2010 at 07:10:44PM -0800, Nathan Boley wrote: Another quick note: I think that storing the full contingency table is wasteful since the marginals are already stored in the single column statistics. Look at copulas [2] ( FWIW I

Re: [HACKERS] CommitFest wrap-up

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 2:19 PM, David Fetter da...@fetter.org wrote: On Mon, Dec 13, 2010 at 12:37:52PM -0500, Robert Haas wrote: We're now just a day or two from the end of this CommitFest and there are still a LOT of open patches - to be specific, 23.Here's a brief synopsis of where we are

Re: [HACKERS] CommitFest wrap-up

2010-12-13 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: We're now just a day or two from the end of this CommitFest and there are still a LOT of open patches - to be specific, 23.Here's a brief synopsis of where we are with the others, all IMO of course. Thanks for doing this! - Extensions - Still under

Re: [HACKERS] WaitLatch

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 5:48 AM, aaliya zarrin aaliya.zar...@gmail.com wrote: drainSelfPipe() function will read the data and remove it from the descriptor? Yes... Coz the signal (SIGUSR1) is writing sata to selfPipe descriptor but unable to wake up latch on select system call. The signal

Re: [HACKERS] pg_is_in_recovery=1

2010-12-13 Thread Robert Haas
On Mon, Dec 13, 2010 at 12:48 AM, aaliya zarrin aaliya.zar...@gmail.com wrote: When pg_is_in_recovery in the table changes to zero(status change)?? At the time when recovery stops? Ah... yep. If switch over has to be done then, after receivibg the signal and telling the postgres to run the

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Dmitriy Igrishin
2010/12/13 Pavel Stehule pavel.steh...@gmail.com 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: 2010/12/13 Pavel Stehule pavel.steh...@gmail.com 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: There are a lot of operators and functions to work with hstore. Does it worth it to

Re: [HACKERS] CommitFest wrap-up

2010-12-13 Thread David E. Wheeler
On Dec 13, 2010, at 12:04 PM, Dimitri Fontaine wrote: So, who's in to finish up and commit this patch in this round? :) I certainly am ready to support last minute changes, given some are required. And if they are too big for the schedule, better shake the patch out now rather than let it

Re: [HACKERS] hstores in pl/python

2010-12-13 Thread Pavel Stehule
2010/12/13 Dmitriy Igrishin dmit...@gmail.com: 2010/12/13 Pavel Stehule pavel.steh...@gmail.com 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: 2010/12/13 Pavel Stehule pavel.steh...@gmail.com 2010/12/13 Dmitriy Igrishin dmit...@gmail.com: There are a lot of operators and

Re: [HACKERS] Why percent_rank is so slower than rank?

2010-12-13 Thread Ron Mayer
Tom Lane wrote: argue that there was a regression. It's certainly a performance bug though: nobody would expect that giving a query *more* work_mem would cause it to run many times slower. I wouldn't be that surprised - otherwise it'd just be hard-coded to something large. Especially since

Re: [HACKERS] CommitFest wrap-up

2010-12-13 Thread Dimitri Fontaine
David E. Wheeler da...@kineticode.com writes: On Dec 13, 2010, at 12:04 PM, Dimitri Fontaine wrote: So, who's in to finish up and commit this patch in this round? :) I'll try to do another review this week. Thanks! -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise,

Re: [HACKERS] BufFreelistLock

2010-12-13 Thread Jim Nasby
On Dec 12, 2010, at 8:48 PM, Jim Nasby wrote: There might be some advantage in having it move buffers to a freelist that's just protected by a simple spinlock (or at least, a lock different from the one that protects the clock sweep). The idea would be that most of the time, backends just

Re: [HACKERS] Complier warnings on mingw gcc 4.5.0

2010-12-13 Thread Andrew Dunstan
On 12/13/2010 01:12 PM, Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: On 12/13/2010 12:01 PM, Tom Lane wrote: It smells a little bit like an optimization bug. Does dialing down to -O0 make it go away? Sadly, no. I'm testing downgrading the compiler now. Mph. FWIW, I see that

Re: [HACKERS] Complier warnings on mingw gcc 4.5.0

2010-12-13 Thread Magnus Hagander
On Mon, Dec 13, 2010 at 22:29, Andrew Dunstan and...@dunslane.net wrote: On 12/13/2010 01:12 PM, Tom Lane wrote: Andrew Dunstanand...@dunslane.net  writes: On 12/13/2010 12:01 PM, Tom Lane wrote: It smells a little bit like an optimization bug.  Does dialing down to -O0 make it go away?

Re: [HACKERS] Complier warnings on mingw gcc 4.5.0

2010-12-13 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Further digging shows some weirdness. This doesn't appear to be compiler-related. I've rolled back all the way to gcc 3.5. It is triggered by the following line in pg_regress.c, commenting out of which causes the problem to go away (although of

Re: [HACKERS] proposal : cross-column stats

2010-12-13 Thread Josh Berkus
Tomas, (a) find out what statistics do we need to collect and how to use it (b) implement a really stupid inefficient solution (c) optimize in iterations, i.e. making it faster, consuming less space etc. I'll suggest again how to decide *which* columns to cross: whichever columns

Re: [HACKERS] CommitFest wrap-up

2010-12-13 Thread Josh Berkus
On 12/13/10 9:37 AM, Robert Haas wrote: - synchronous replication - and... - synchronous replication, transaction-controlled - If we want to get this feature into 9.1, we had better get a move on. But I don't currently have it in my time budget to deal with this. I thought we'd covered most

  1   2   >