Re: [HACKERS] lock_timeout GUC patch

2010-01-14 Thread Boszormenyi Zoltan
Jaime Casanova írta: > 2010/1/13 Boszormenyi Zoltan : > >>> Your smaller patch is attached, with the above strangeness. :-) >>> >>> > > you still had to add this parameter to the postgresql.conf.sample in > the section about lock management > Attached with the required change. Thanks

Re: [HACKERS] Streaming replication status

2010-01-14 Thread Stefan Kaltenbrunner
Greg Smith wrote: Fujii Masao wrote: "I'm thinking something like pg_standbys_xlog_location() [on the primary] which returns one row per standby servers, showing pid of walsender, host name/ port number/user OID of the standby, the location where the standby has written/flushed WAL. DBA can mea

Re: [HACKERS] per-user pg_service.conf

2010-01-14 Thread Peter Eisentraut
On ons, 2010-01-13 at 23:49 +0200, Peter Eisentraut wrote: > I was surprised/annoyed to find out that there is no way to have > per-user pg_service.conf, something like ~/.pg_service.conf (well, > except by export PGSYSCONFDIR). That would be easy to add. Comments? Here's a patch. Perhaps those

Re: [HACKERS] Testing with concurrent sessions

2010-01-14 Thread Markus Wanner
Hi, Kevin Grittner wrote: C'mon, you could have tried to inspire a *bit* more confidence by calling it version 0.1 or something! ;-) LOL As David used to say: JFDI > I found that I just needed to ask for python-twisted. Oh, sorry, yes, requirements: python, twisted. I must admit that I ha

Re: [HACKERS] attoptions

2010-01-14 Thread Alex Hunsaker
On Sun, Jan 10, 2010 at 12:27, Robert Haas wrote: > I am not very happy with ATPrepSetOptions().  I basically just > retained the logic from ATPrepSetDistinct(), but it doesn't really > make sense in this context.  The idea that we want to support > attdistinct for system tables and index columns

Re: [HACKERS] quoting psql varible as identifier

2010-01-14 Thread Pavel Stehule
2010/1/15 Robert Haas : > On Mon, Jan 11, 2010 at 6:54 AM, Pavel Stehule > wrote: >>> No longer applies, please rebase. >> >> fixed, sorry > my idea was: * string * escape_string * escape_ident * bytea * escape_bytea But I am not strong in it. Maybe this part of doc needs more love -

Re: [HACKERS] PG_MODULE_MAGIC checks and pg_migrator

2010-01-14 Thread Tom Lane
Bruce Momjian writes: > For example, right now pg_migrator can migrate to 8.4 and 8.5, but there > is no way to distribute a binary that will migrate to both because you > need different shared libraries with different PG_MODULE_MAGIC values. [ yawn... ] By the time 8.5 (9.0?) ships, this will p

Re: [HACKERS] lock_timeout GUC patch

2010-01-14 Thread Jaime Casanova
2010/1/13 Boszormenyi Zoltan : >> >> Your smaller patch is attached, with the above strangeness. :-) >> you still had to add this parameter to the postgresql.conf.sample in the section about lock management -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo

Re: [HACKERS] Streaming replication status

2010-01-14 Thread Simon Riggs
On Thu, 2010-01-14 at 23:07 -0500, Greg Smith wrote: > pg_last_archived_xlogfile() text: Get the name of the last file the > archive_command [tried to|successfully] archived since the server was > started. If archiving is disabled or no xlog files have become ready > to archive since startup, a

Re: [HACKERS] Streaming replication status

2010-01-14 Thread Greg Smith
Fujii Masao wrote: "I'm thinking something like pg_standbys_xlog_location() [on the primary] which returns one row per standby servers, showing pid of walsender, host name/ port number/user OID of the standby, the location where the standby has written/flushed WAL. DBA can measure the gap from t

[HACKERS] Package namespace and Safe init cleanup for plperl [PATCH]

2010-01-14 Thread Tim Bunce
This is the final plperl patch in the series from me. Changes in this patch: - Moved internal functions out of main:: namespace into PostgreSQL::InServer and PostgreSQL::InServer::safe - Restructured Safe compartment setup code to generalize and separate the data from the logic. Neither

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Fujii Masao
On Fri, Jan 15, 2010 at 7:19 AM, Heikki Linnakangas wrote: > Let's introduce a new boolean variable in shared memory that the > walreceiver can set to tell startup process if it's connected or > streaming, or disconnected. When startup process sees that walreceiver > is connected, it waits for rec

[HACKERS] PG_MODULE_MAGIC checks and pg_migrator

2010-01-14 Thread Bruce Momjian
Technically pg_migrator does not need the PG_MODULE_MAGIC version checks because it doesn't do any data manipulation and it already checks the new server version to determine if the function calls will resolve. However, we currently require PG_MODULE_MAGIC for all loaded libraries, and this adds a

Re: [HACKERS] plpython3

2010-01-14 Thread Greg Smith
James William Pye wrote: The documentation is back up, so please be sure to look at the numerous examples provided therein. In addition to that, I'll try to get some contrasting examples posted as a follow-up to an earlier message. "In plpython you do X whereas in plpython3 you do Y." I h

Re: [HACKERS] KNNGiST for knn-search (WIP)

2010-01-14 Thread Robert Haas
2010/1/12 Teodor Sigaev : > Changes: > > - split patch to several ones > - sync with current CVS > > Patch set is based on 0.5.1 version, difference between 0.5 and 0.6 should > be only in planner patch. > > builtin_knngist_itself-0.6.gz  - patch to the gist itself > builtin_knngist_proc-0.6.gz - p

Re: [HACKERS] quoting psql varible as identifier

2010-01-14 Thread Robert Haas
On Mon, Jan 11, 2010 at 6:54 AM, Pavel Stehule wrote: >> No longer applies, please rebase. > > fixed, sorry Hmm. I think that pqEscapeIdentConn should be in a separate section of the documentation, entitled "Escaping Identifiers for Inclusion in SQL Commands". Or else we should merge the existi

Re: [HACKERS] [PATCH] remove redundant ownership checks

2010-01-14 Thread KaiGai Kohei
(2010/01/14 23:29), Stephen Frost wrote: > * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: >> Some of ALTER TABLE operations take multiple permission checks, not only >> ownership of the relation to be altered. > > Yes, exactly my point. Those places typically just presume that the > owner check has

[HACKERS] GUC failure on exception

2010-01-14 Thread Andrew Dunstan
Tim Bunce just showed me the following oddity: andrew=# SET SESSION plperl.use_strict = on; SET andrew=# SHOW plperl.use_strict; plperl.use_strict --- on (1 row) andrew=# DO $$ elog(ERROR,"error") $$ language plperl; ERROR: error at line 1. CONTE

[HACKERS] Add on_trusted_init and on_untrusted_init to plperl [PATCH]

2010-01-14 Thread Tim Bunce
This is the fourth of the patches to be split out from the former 'plperl feature patch 1'. Changes in this patch: - Adds plperl.on_trusted_init and plperl.on_untrusted_init GUCs Both are PGC_USERSET. SPI functions are not available when the code is run. Errors are detected and report

Re: [HACKERS] Hot Standy introduced problem with query cancel behavior

2010-01-14 Thread Andres Freund
On Wednesday 13 January 2010 00:07:53 Simon Riggs wrote: > On Tue, 2010-01-12 at 19:43 +0100, Andres Freund wrote: > > On Tuesday 12 January 2010 09:40:03 Simon Riggs wrote: > > > On Tue, 2010-01-12 at 06:30 +0100, Andres Freund wrote: > > > > Currently the patch does not yet do anything to avoid l

Re: [HACKERS] Hot Standby and query cancel

2010-01-14 Thread Andres Freund
On Thursday 14 January 2010 13:21:07 Simon Riggs wrote: > On Wed, 2010-01-13 at 19:23 +, Simon Riggs wrote: > > On Wed, 2010-01-13 at 19:58 +0100, Andres Freund wrote: > > > > I am still testing patch, so should be confident to commit tomorrow > > > > barring issues. > > > > > > I have only lo

Re: [HACKERS] last CommitFest coming up in just under 24 hours

2010-01-14 Thread Andrew Dunstan
Robert Haas wrote: Patch authors, please make sure your patches are listed on commitfest.postgresql.org. https://commitfest.postgresql.org/action/commitfest_view/open All, we still need reviewers for the following patches. New XLOG record indicating WAL-skipping Fix large object support in p

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Heikki Linnakangas
Fujii Masao wrote: > On Fri, Jan 15, 2010 at 12:23 AM, Heikki Linnakangas > wrote: >> If we don't fix that within the server, we will need to document that >> caveat and every installation will need to work around that one way or >> another. Maybe with some monitoring software and an automatic res

[HACKERS] Add on_perl_init and proper destruction to plperl [PATCH]

2010-01-14 Thread Tim Bunce
This is the third of the patches to be split out from the former 'plperl feature patch 1'. Changes in this patch: - Added plperl.on_perl_init GUC for DBA use (PGC_SIGHUP) SPI functions are not available when the code is run. - Added normal interpreter destruction behaviour END blocks, if

Re: [HACKERS] Source code for pg_bulkload

2010-01-14 Thread Alex Hunsaker
On Thu, Jan 14, 2010 at 14:13, Dann Corbit wrote: > How can I obtain the source code for pg_bulkload? This is the wrong list, try http://lists.pgfoundry.org/pipermail/pgbulkload-general/ That being said it seems to be right in the file list http://pgfoundry.org/frs/?group_id=1000261 http://p

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Greg Smith
Itagaki Takahiro wrote: To be honest, I have a plan to add performance statistics counters to postgres. It is not bgwriter's counters, but cluster-level. I'd like to use your infrastructure in my work, too :) Attached patch provides just that. It still works basically the same as my earlier

[HACKERS] Source code for pg_bulkload

2010-01-14 Thread Dann Corbit
How can I obtain the source code for pg_bulkload? I am interested in writing an API version, so that I can imbed this loading facility into programs. The page http://pgfoundry.org/projects/pgbulkload/ has links to the binaries, but I want the source. -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] plpython3

2010-01-14 Thread Joshua D. Drake
On Thu, 2010-01-14 at 05:39 -0700, James William Pye wrote: > > > Python code is easy to read though. If you'd said "here's a great example > > of how Function Modules are an improvement over what you can do with the > > current pl/python," that would be infinitely more useful than the list of

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Rafael Martinez
Greg Smith wrote: > >> Before 8.3, we had the stats_reset_on_server_start parameter and >> the pg_postmaster_start_time() function. This was an easy way of >> resetting *all* statistics delivered by pg_stat_* and knowing when >> this was done. We were able to produce stats with information about >

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Tom Lane
Robert Haas writes: > I'm thinking that HS+SR are going to be a bit like the Windows port - > they're going to require a few releases before they really work as > well as we'd like them too. I've assumed that from the get-go ;-). It's one of the reasons that we ought to label this release 9.0 if

Re: [HACKERS] dbt2-shell script problem

2010-01-14 Thread Jonas J
Thanks for your support, The problem was that Ubuntu links /bin/sh to /bin/dash and not /bin/bash, that makes some scripts crashing. I done the correct linking and everything works fine now. Also thanks for Mark Wong support, Jonas, 2010/1/11 Robert Haas > On Mon, Jan 11, 2010 at 4:18 PM, Jo

Re: [HACKERS] EXPLAIN, utility statement parameters, and recent plpgsql changes

2010-01-14 Thread Tom Lane
Dimitri Fontaine writes: > Tom Lane writes: >> Well, the point of the hook is to change the results of parse >> transformation, so just calling it doesn't do much --- you have to apply >> the whole parse analysis process, *and keep the resulting tree*. > Could that be done in the function, in th

Re: [HACKERS] Testing with concurrent sessions

2010-01-14 Thread Kevin Grittner
Markus Wanner wrote: > Okay, here we go: dtester version 0.0. C'mon, you could have tried to inspire a *bit* more confidence by calling it version 0.1 or something! ;-) > It's certainly missing lots of things, mainly documentation. > However, I've attached a patch which integrates nicely in

Re: [HACKERS] EXPLAIN, utility statement parameters, and recent plpgsql changes

2010-01-14 Thread Dimitri Fontaine
Tom Lane writes: > Dimitri Fontaine writes: >> Tom Lane writes: >>> This works well enough for regular DML statements, but it falls down for >>> EXPLAIN which is a utility statement, because *parse analysis of utility >>> statements doesn't do anything*. EXPLAIN actually does the parse >>> ana

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Robert Haas
On Thu, Jan 14, 2010 at 10:23 AM, Heikki Linnakangas wrote: > I wasn't really asking if it's possible to fix, I meant "Let's think > about *how* to fix that". Well... maybe if it doesn't require too MUCH thought. I'm thinking that HS+SR are going to be a bit like the Windows port - they're goin

Re: [HACKERS] Testing with concurrent sessions

2010-01-14 Thread Markus Wanner
Hi, Markus Wanner wrote: Sorry, if that didn't get clear. I'm trying to put together something I can release real soon now (tm). I'll keep you informed. Okay, here we go: dtester version 0.0. This emerged out of Postgres-R, where I don't just need to test multiple client connections, but mul

Re: [HACKERS] EXPLAIN, utility statement parameters, and recent plpgsql changes

2010-01-14 Thread Tom Lane
I wrote: > 2. Redesign EXPLAIN so that it parses the contained query in the initial > parsing step; it wouldn't be a simple utility command anymore but a > hybrid much like DECLARE CURSOR. I think this would not be very messy. > The main objection to it is that it doesn't scale to solve the proble

Re: [HACKERS] EXPLAIN, utility statement parameters, and recent plpgsql changes

2010-01-14 Thread Tom Lane
Dimitri Fontaine writes: > Tom Lane writes: >> This works well enough for regular DML statements, but it falls down for >> EXPLAIN which is a utility statement, because *parse analysis of utility >> statements doesn't do anything*. EXPLAIN actually does the parse >> analysis of its contained sta

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Dimitri Fontaine
Fujii Masao writes: > On Fri, Jan 15, 2010 at 1:06 AM, Dimitri Fontaine > wrote: >> 0. base: slave asks the master for a base-backup, at the end of this it >> reaches the base-lsn > > What if the WAL file including the archive recovery starting location has > been removed from the primary's

Re: [HACKERS] EXPLAIN, utility statement parameters, and recent plpgsql changes

2010-01-14 Thread Dimitri Fontaine
Tom Lane writes: > This works well enough for regular DML statements, but it falls down for > EXPLAIN which is a utility statement, because *parse analysis of utility > statements doesn't do anything*. EXPLAIN actually does the parse > analysis of its contained statement at the beginning of exec

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-14 Thread David Fetter
On Thu, Jan 14, 2010 at 05:49:54PM +, Tim Bunce wrote: > On Thu, Jan 14, 2010 at 09:34:42AM -0800, David E. Wheeler wrote: > > On Jan 14, 2010, at 8:07 AM, Tim Bunce wrote: > > > > > - Stored procedure subs are now given names. > > >The names are not visible in ordinary use, but they make

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Greg Smith
Tom Lane wrote: Seems like a more appropriate solution would be to make it easier to do that subtraction, ie, make it easier to capture the values at a given time point and then get deltas from there. It's more general (you could have multiple saved sets of values), and doesn't require superuser

Re: [HACKERS] EXPLAIN, utility statement parameters, and recent plpgsql changes

2010-01-14 Thread Pavel Stehule
2010/1/14 Tom Lane : > Pavel pointed out here > http://archives.postgresql.org/pgsql-hackers/2010-01/msg01233.php > that it no longer works to reference plpgsql variables in EXPLAIN > statements in plpgsql.  I dug into this a bit, and the code is trying > to do it but it doesn't quite work. > > The

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread David Fetter
On Thu, Jan 14, 2010 at 03:08:22PM +0100, Matteo Beccati wrote: > Il 14/01/2010 14:39, Dimitri Fontaine ha scritto: > >Matteo Beccati writes: > >>I've extended AOX with a trigger that takes care of filling a separate table > >>that's used to display the index pages. The new table also stores threa

Re: [HACKERS] review: More frame options in window functions

2010-01-14 Thread Hitoshi Harada
2010/1/14 Pavel Stehule : > Hello > > I looked on Hitoshi's patch - and my result is: Thanks for the review. I've found another crash today and attached is fixed version. The case is: SELECT four, sum(ten) over (PARTITION BY four ORDER BY four RANGE 1 PRECEDING) FROM tenk1 WHERE unique1 < 10; Th

Re: [HACKERS] Add .gitignore files to CVS?

2010-01-14 Thread Chris Browne
bada...@gmail.com (Alex Hunsaker) writes: > On Fri, Jan 8, 2010 at 02:03, Magnus Hagander wrote: >> You can always create your own branch with just the .gitignore files >> and merge that into whatever you're working on :) > > The only thing annoying about that is if you generate diffs ala git > di

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Tom Lane
Greg Smith writes: > Tom Lane wrote: >> Actually, that brings up a more general question: what's with the >> enthusiasm for clearing statistics *at all*? > ... Right now, you're still carrying around > the history of the bad period forever though, and every check of the > pg_stat_bgwriter requi

Re: [HACKERS] primary key display in psql

2010-01-14 Thread Ross J. Reedstrom
On Wed, Jan 13, 2010 at 05:03:33PM -0500, Robert Haas wrote: > On Wed, Jan 13, 2010 at 4:47 PM, Tom Lane wrote: > > > > Spelling out "primary key" would seem to be more in keeping with existing > > entries in that column, eg we have "not null" not "NN". > > > > I think this is a sensible proposal

Re: [HACKERS] archive_timeout behavior for no activity

2010-01-14 Thread Fujii Masao
On Fri, Jan 15, 2010 at 12:50 AM, Bruce Momjian wrote: > Looking at the archive_timeout documentation and CheckArchiveTimeout(), > it appears we force a new xlog file and archive it even if no activity > has been recorded in the xlog file.  Is this correct? No. CheckArchiveTimeout() doesn't switc

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Greg Smith
Rafael Martinez wrote: One thing I miss from the statistics you can get via pg_stat_* is information about how long we have been collecting stats (or in other words, when was the last time the stats were reset) I've considered adding this for the same reasons you're asking about it, but am

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-14 Thread Tim Bunce
On Thu, Jan 14, 2010 at 09:34:42AM -0800, David E. Wheeler wrote: > On Jan 14, 2010, at 8:07 AM, Tim Bunce wrote: > > > - Stored procedure subs are now given names. > >The names are not visible in ordinary use, but they make > >tools like Devel::NYTProf and Devel::Cover _much_ more useful.

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Magnus Hagander
2010/1/14 Tom Lane : > Rafael Martinez writes: >> Is there any chance of implementing a way of knowing when was the last >> time statistics delivered via pg_stat_* were reset? > > Actually, that brings up a more general question: what's with the > enthusiasm for clearing statistics *at all*?  ISTM

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Greg Smith
Euler Taveira de Oliveira wrote: Greg Smith escreveu: pg_stat_reset( which text ) which := 'buffers' | 'checkpoints' | 'tables' | 'functions' | ... What about adding 'all' too? Or the idea is resetting all global counters when we call pg_stat_reset() (without parameters)? O

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Greg Smith
Tom Lane wrote: Actually, that brings up a more general question: what's with the enthusiasm for clearing statistics *at all*? ISTM that's something you should do only in dire emergencies, like the collector went haywire and has now got a bunch of garbage numbers. The notion of resetting subset

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-14 Thread David E. Wheeler
On Jan 14, 2010, at 8:07 AM, Tim Bunce wrote: > - Stored procedure subs are now given names. >The names are not visible in ordinary use, but they make >tools like Devel::NYTProf and Devel::Cover _much_ more useful. Wasn't this in the previous patch, too? Best, David -- Sent via pgsql-

[HACKERS] EXPLAIN, utility statement parameters, and recent plpgsql changes

2010-01-14 Thread Tom Lane
Pavel pointed out here http://archives.postgresql.org/pgsql-hackers/2010-01/msg01233.php that it no longer works to reference plpgsql variables in EXPLAIN statements in plpgsql. I dug into this a bit, and the code is trying to do it but it doesn't quite work. The issue centers around the behavior

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Fujii Masao
On Fri, Jan 15, 2010 at 1:06 AM, Dimitri Fontaine wrote: > Did I mention my viewpoint on that already? >  http://archives.postgresql.org/pgsql-hackers/2009-07/msg00943.php > 0. base: slave asks the master for a base-backup, at the end of this it > reaches the base-lsn What if the WAL file i

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Fujii Masao
On Fri, Jan 15, 2010 at 12:23 AM, Heikki Linnakangas wrote: > If we don't fix that within the server, we will need to document that > caveat and every installation will need to work around that one way or > another. Maybe with some monitoring software and an automatic restart. Ugh. > > I wasn't re

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Dimitri Fontaine
Heikki Linnakangas writes: > If we don't fix that within the server, we will need to document that > caveat and every installation will need to work around that one way or > another. Maybe with some monitoring software and an automatic restart. Ugh. > > I wasn't really asking if it's possible to f

[HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-14 Thread Tim Bunce
This is the second of the patches to be split out from the former 'plperl feature patch 1'. Changes in this patch: - Allow (ineffective) use of 'require' in plperl If the required module is not already loaded then it dies. So "use strict;" now works in plperl. - Pre-load the feature modu

Re: [HACKERS] archive_timeout behavior for no activity

2010-01-14 Thread Kevin Grittner
Bruce Momjian wrote: > Looking at the archive_timeout documentation and > CheckArchiveTimeout(), it appears we force a new xlog file and > archive it even if no activity has been recorded in the xlog file. > Is this correct? Should we document this or fix it so only xlog > files with contents a

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Tom Lane
Rafael Martinez writes: > Is there any chance of implementing a way of knowing when was the last > time statistics delivered via pg_stat_* were reset? Actually, that brings up a more general question: what's with the enthusiasm for clearing statistics *at all*? ISTM that's something you should d

[HACKERS] archive_timeout behavior for no activity

2010-01-14 Thread Bruce Momjian
Looking at the archive_timeout documentation and CheckArchiveTimeout(), it appears we force a new xlog file and archive it even if no activity has been recorded in the xlog file. Is this correct? Should we document this or fix it so only xlog files with contents are archived? -- Bruce Momjian

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Heikki Linnakangas
Magnus Hagander wrote: > On Thu, Jan 14, 2010 at 15:36, Robert Haas wrote: >> On Thu, Jan 14, 2010 at 9:15 AM, Heikki Linnakangas >> wrote: >>> Imagine this scenario: >>> >>> 1. Master is up and running, standby is connected and streaming happily >>> 2. Network goes down, connection is broken. >>

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Magnus Hagander
On Thu, Jan 14, 2010 at 16:06, Matteo Beccati wrote: > Il 14/01/2010 15:47, Dimitri Fontaine ha scritto: >> >> Matteo Beccati  writes: >>> >>> WITH RECURSIVE t (mailbox, uid, date, subject, sender, has_attachments, >>> parent_uid, idx, depth) AS ( >>>   SELECT mailbox, uid, date, subject, sender,

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Matteo Beccati
Il 14/01/2010 15:47, Dimitri Fontaine ha scritto: Matteo Beccati writes: WITH RECURSIVE t (mailbox, uid, date, subject, sender, has_attachments, parent_uid, idx, depth) AS ( SELECT mailbox, uid, date, subject, sender, has_attachments, parent_uid, uid::text, 1 FROM arc_messages WHERE pa

Re: [HACKERS] [PL/PgSQL] EXECUTE...USING enhancement proposal

2010-01-14 Thread Pavel Stehule
Hello I thing, so this is bad idea. a) this behave depends on DDL implementation, not plpgsql implementation b) proposed implementation needs some escape magic. This was first implementation of USING clause and it was rejected. Some composite and nested values are significant break. see in arch

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Dimitri Fontaine
Matteo Beccati writes: > WITH RECURSIVE t (mailbox, uid, date, subject, sender, has_attachments, > parent_uid, idx, depth) AS ( > SELECT mailbox, uid, date, subject, sender, has_attachments, parent_uid, > uid::text, 1 > FROM arc_messages > WHERE parent_uid IS NULL AND mailbox = 15 > UNION

[HACKERS] [PL/PgSQL] EXECUTE...USING enhancement proposal

2010-01-14 Thread Vincenzo Romano
Hi all. There's currently a limitation in the v8.4.2 implementation of the EXECUTE...USING predicate in PL/PgSQL which prevents you from exploiting the USING-supplied value list with DDL commands. For example: CREATE TABLE test ( i int ); ... EXECUTE 'ALTER TABLE test ALTER COLUMN i SET DEFAULT $1

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Dave Page
On Thu, Jan 14, 2010 at 8:02 PM, Matteo Beccati wrote: > Il 14/01/2010 14:46, Dave Page ha scritto: >> >> On Thu, Jan 14, 2010 at 7:09 PM, Dimitri Fontaine >>  wrote: >>> >>> Matteo Beccati  writes: I've extended AOX with a trigger that takes care of filling a separate table t

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Magnus Hagander
On Thu, Jan 14, 2010 at 15:36, Robert Haas wrote: > On Thu, Jan 14, 2010 at 9:15 AM, Heikki Linnakangas > wrote: >> Imagine this scenario: >> >> 1. Master is up and running, standby is connected and streaming happily >> 2. Network goes down, connection is broken. >> 3. Standby falls behind a lot.

Re: [HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Robert Haas
On Thu, Jan 14, 2010 at 9:15 AM, Heikki Linnakangas wrote: > Imagine this scenario: > > 1. Master is up and running, standby is connected and streaming happily > 2. Network goes down, connection is broken. > 3. Standby falls behind a lot. Old WAL files that the standby needs are > archived, and de

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Matteo Beccati
Il 14/01/2010 14:46, Dave Page ha scritto: On Thu, Jan 14, 2010 at 7:09 PM, Dimitri Fontaine wrote: Matteo Beccati writes: I've extended AOX with a trigger that takes care of filling a separate table that's used to display the index pages. The new table also stores threading information (sta

Re: [HACKERS] [PATCH] remove redundant ownership checks

2010-01-14 Thread Robert Haas
On Thu, Jan 14, 2010 at 1:04 AM, Greg Smith wrote: > But the preference of the last CF is to not apply any patch which doesn't > have a very clear justification to be committed.  Given that whether this > patch is applied or not to 8.5 really doesn't make any functional > difference, I don't see a

Re: [HACKERS] [PATCH] remove redundant ownership checks

2010-01-14 Thread Stephen Frost
* KaiGai Kohei (kai...@ak.jp.nec.com) wrote: > Some of ALTER TABLE operations take multiple permission checks, not only > ownership of the relation to be altered. Yes, exactly my point. Those places typically just presume that the owner check has already been done. > For example, ALTER TABLE wit

Re: [HACKERS] patch to implement ECPG side tracing / tracking ...

2010-01-14 Thread Boszormenyi Zoltan
Michael Meskes írta: >> this area (patch sent some time ago) and we were finally able to >> catch up with Informix performance-wise in this area (mostly cursor >> work). before this auto_prepare fix, we were sometimes 2-3 times >> > > Which fix are you talking about? I don't really remember a

[HACKERS] Streaming replication, retrying from archive

2010-01-14 Thread Heikki Linnakangas
Imagine this scenario: 1. Master is up and running, standby is connected and streaming happily 2. Network goes down, connection is broken. 3. Standby falls behind a lot. Old WAL files that the standby needs are archived, and deleted from master. 4. Network is restored. Standby reconnects 5. Standb

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Matteo Beccati
Il 14/01/2010 14:39, Dimitri Fontaine ha scritto: Matteo Beccati writes: I've extended AOX with a trigger that takes care of filling a separate table that's used to display the index pages. The new table also stores threading information (standard headers + Exchange headers support) and whether

Re: [HACKERS] patch to implement ECPG side tracing / tracking ...

2010-01-14 Thread Dimitri Fontaine
Michael Meskes writes: > On Wed, Jan 13, 2010 at 10:30:32PM +0100, Hans-Juergen Schoenig wrote: >> performance tune your precompiler application. in PostgreSQL it is >> currently a little hard to get from the log what is executed how >> often by which application in which speed and so on. so, we c

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Dave Page
On Thu, Jan 14, 2010 at 7:09 PM, Dimitri Fontaine wrote: > Matteo Beccati writes: >> I've extended AOX with a trigger that takes care of filling a separate table >> that's used to display the index pages. The new table also stores threading >> information (standard headers + Exchange headers supp

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greg Smith wrote: > Magnus Hagander wrote: >> I have on my TODO to implement the ability to do stats reset on a >> single object (say, one table only). Please take this into >> consideration when you design/name this, so theres no unnecessary >> overla

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Dimitri Fontaine
Matteo Beccati writes: > I've extended AOX with a trigger that takes care of filling a separate table > that's used to display the index pages. The new table also stores threading > information (standard headers + Exchange headers support) and whether or not > the email has attachments. > > Please

Re: [HACKERS] patch to implement ECPG side tracing / tracking ...

2010-01-14 Thread Michael Meskes
On Wed, Jan 13, 2010 at 10:30:32PM +0100, Hans-Juergen Schoenig wrote: > performance tune your precompiler application. in PostgreSQL it is > currently a little hard to get from the log what is executed how > often by which application in which speed and so on. so, we came up Hard or impossible? I

Re: [HACKERS] Table size does not include toast size

2010-01-14 Thread Bernd Helmle
--On 22. Dezember 2009 15:11:40 +0100 Bernd Helmle wrote: Bernd, there's a basic spec if you have time to work on this. I see if i can get some time for it during christmas vacation (its on my radar for a longer period of time). I'm still working on this NOT NULL pg_constraint representat

Re: [HACKERS] Streaming replication and non-blocking I/O

2010-01-14 Thread Fujii Masao
On Thu, Jan 14, 2010 at 9:14 PM, Heikki Linnakangas wrote: > After reading up on SSL_read() and SSL_pending(), it seems that there is > unfortunately no reliable way of checking if there is incoming data that > can be read using SSL_read() without blocking, short of putting the > socket to non-blo

Re: [HACKERS] improving log management

2010-01-14 Thread Euler Taveira de Oliveira
Takahiro Itagaki escreveu: > If you have better loggers already, why don't you use them? In another word, > should we cooperate with them instead of re-inventing alternative loggers? > We can use but they don't features that our logger has. If we have a logger, let's improve it. > We have "Loggin

Re: [HACKERS] plpython3

2010-01-14 Thread James William Pye
On Jan 14, 2010, at 12:17 AM, Greg Smith wrote: > Code samples. Okay. > I don't know, because even with several thousand lines of basic Python code > to my credit I cannot understand a single one of the arguments you presented > for why your implementation is better--except agreeing that, yes,

Re: [HACKERS] plpython3

2010-01-14 Thread Aidan Van Dyk
* Greg Smith [100114 02:17]: > One of the things I'm increasingly frustrated by (and don't take this > personally, this is a general comment coming more from the last CF > rather than something I mean to single you out for) is how many patch > submissions we get that don't have *compelling*

Re: [HACKERS] improving log management

2010-01-14 Thread Euler Taveira de Oliveira
Tom Lane escreveu: > (1) Windows compatibility? > Yes. > (2) What happens if the command takes a significant amount of time to > execute? We can't afford to have the log collector blocked. > You're right. We can't have that command in the same process because DBAs could have high values for log

Re: [HACKERS] mailing list archiver chewing patches

2010-01-14 Thread Matteo Beccati
Il 14/01/2010 08:22, Matteo Beccati ha scritto: Hi, 3) A nice set of SQL queries to return message, parts, threads, folders based on $criteria (search, id, folder, etc) I guess Matteo's working on that… Right, but this is where I want to see the AOX schema "imporove"... In ways like adding

Re: [HACKERS] Hot Standby and query cancel

2010-01-14 Thread Simon Riggs
On Wed, 2010-01-13 at 19:23 +, Simon Riggs wrote: > On Wed, 2010-01-13 at 19:58 +0100, Andres Freund wrote: > > > > I am still testing patch, so should be confident to commit tomorrow > > > barring issues. > > I have only looked at briefly because right now I dont have the time (going > > to

Re: [HACKERS] Small Bug in GetConflictingVirtualXIDs

2010-01-14 Thread Simon Riggs
On Sun, 2009-12-27 at 20:11 +0100, Andres Freund wrote: > On Tuesday 22 December 2009 11:42:30 Simon Riggs wrote: > > On Tue, 2009-12-22 at 03:19 +0100, Andres Freund wrote: > > > On Monday 21 December 2009 16:48:52 Simon Riggs wrote: > > > > Giving the drop database a snapshot is not the answer. I

Re: [HACKERS] segmentation fault in function

2010-01-14 Thread Dimitri Fontaine
Sergej Galkin writes: > I am realizing gist index and get a bug, that crashes DB. I' debugged > my program as Robert(thanks !) advised me and I know which procedure > crashed. Using gdb you should have the line number in the source code and should be able to look up the variable values. For that

Re: [HACKERS] Clearing global statistics

2010-01-14 Thread Magnus Hagander
2010/1/12 Greg Smith : > Magnus Hagander wrote: >> >> I have on my TODO to implement the ability to do stats reset on a >> single object (say, one table only). Please take this into >> consideration when you design/name this, so theres no unnecessary >> overlap :-) Same goes for the stats message i

Re: [HACKERS] Streaming replication and non-blocking I/O

2010-01-14 Thread Magnus Hagander
2010/1/14 Heikki Linnakangas : > Fujii Masao wrote: >> On Wed, Jan 13, 2010 at 7:27 PM, Heikki Linnakangas >> wrote: >>> the frontend always puts the >>> connection to non-blocking mode, while the backend uses blocking mode. >> >> Really? By default (i.e., without the expressly setting by using >>

[HACKERS] review: More frame options in window functions

2010-01-14 Thread Pavel Stehule
Hello I looked on Hitoshi's patch - and my result is: 1. Patch is in correct format, it is cleanly applied and compilation is without warnings, 2. Patch contains adequate changes of doc, and rich set of regress tests, 3. If I could to understand to implemented feature - it is in conformity with S

Re: [HACKERS] Streaming replication and non-blocking I/O

2010-01-14 Thread Heikki Linnakangas
Fujii Masao wrote: > On Wed, Jan 13, 2010 at 7:27 PM, Heikki Linnakangas > wrote: >> the frontend always puts the >> connection to non-blocking mode, while the backend uses blocking mode. > > Really? By default (i.e., without the expressly setting by using > PQsetnonblocking()), the connection is

Re: [HACKERS] [PATCH] remove redundant ownership checks

2010-01-14 Thread KaiGai Kohei
(2010/01/14 15:04), Greg Smith wrote: KaiGai Kohei wrote: (2010/01/14 4:54), Tom Lane wrote: Robert Haas writes: On Wed, Jan 13, 2010 at 1:34 PM, Tom Lane wrote: If I thought this patch represented incremental movement in the direction of a better security-check factorization, I'd be fine wit

Re: [HACKERS] Streaming replication and non-blocking I/O

2010-01-14 Thread Fujii Masao
On Wed, Jan 13, 2010 at 7:27 PM, Heikki Linnakangas wrote: > the frontend always puts the > connection to non-blocking mode, while the backend uses blocking mode. Really? By default (i.e., without the expressly setting by using PQsetnonblocking()), the connection is set to blocking mode even in f

Re: [HACKERS] Streaming replication status

2010-01-14 Thread Fujii Masao
On Wed, Jan 13, 2010 at 5:47 PM, Greg Smith wrote: > The pieces are coming together...summary: Thanks for the summary! > -Also add pg_standbys_xlog_location() on the master: while they could live > without it, this really helps out the "alert/monitor" script writer whose use > cases keep popp

  1   2   >