Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Hannu Krosing
On 08/26/2013 12:47 AM, Jim Nasby wrote: On 8/23/13 11:23 AM, Greg Stark wrote: This doesn't generate a unique id. You could back up a standby and restore it and point it at the original master and end up with two standbies with the same id. Yeah, not as easy as I imagined. It will fix itself

Re: [HACKERS] Backup throttling

2013-08-26 Thread Antonin Houska
On 08/22/2013 03:33 PM, Craig Ringer wrote: On 08/22/2013 01:39 PM, PostgreSQL - Hans-Jürgen Schönig wrote: what would be a reasonable scenario where limiting streaming would make sense? i cannot think of any to be honest. I tend to agree. If anything we're likely to want the reverse -

Re: [HACKERS] Backup throttling

2013-08-26 Thread Hannu Krosing
On 08/26/2013 12:50 PM, Antonin Houska wrote: On 08/22/2013 03:33 PM, Craig Ringer wrote: On 08/22/2013 01:39 PM, PostgreSQL - Hans-Jürgen Schönig wrote: what would be a reasonable scenario where limiting streaming would make sense? i cannot think of any to be honest. I tend to agree. If

Re: [HACKERS] Detail part for still waiting for lock log message

2013-08-26 Thread Tarvi Pillessaar
Fixed patch attached. Regards, Tarvi Pillessaar On 24.08.2013 17:58, Peter Eisentraut wrote: On Tue, 2013-08-20 at 19:21 +0300, Tarvi Pillessaar wrote: About patch: Patch is tested against 9.2.4. I was not sure that i should check if the lock holder's proclock was found (as lock holder's

Re: [HACKERS] Hstore: Query speedups with Gin index

2013-08-26 Thread Oleg Bartunov
Michael, take a look on http://obartunov.livejournal.com/171959.html As for the indexing stuff we already thought many times about keyvalue mixing, but real solution, probably, could come from spgist and gin combination. I mean, spgist (suffix array) instead of btree for avoiding key

Re: [HACKERS] Backup throttling

2013-08-26 Thread Craig Ringer
On 08/26/2013 08:15 PM, Hannu Krosing wrote: On 08/26/2013 12:50 PM, Antonin Houska wrote: On 08/22/2013 03:33 PM, Craig Ringer wrote: On 08/22/2013 01:39 PM, PostgreSQL - Hans-Jürgen Schönig wrote: what would be a reasonable scenario where limiting streaming would make sense? i cannot

[HACKERS] median and percentile function implementation

2013-08-26 Thread Pavel Stehule
Hello Three years ago we worked on implementation of median function. http://www.postgresql.org/message-id/aanlktimrksuoggsk7-gtxnvjjgl-1qvuqxiduszqw...@mail.gmail.com Can we implement this function now? There are a few opened questions: * immutable parameters of aggregate functions *

Re: [HACKERS] median and percentile function implementation

2013-08-26 Thread Vik Fearing
On 08/26/2013 02:39 PM, Pavel Stehule wrote: Hello Three years ago we worked on implementation of median function. http://www.postgresql.org/message-id/aanlktimrksuoggsk7-gtxnvjjgl-1qvuqxiduszqw...@mail.gmail.com Can we implement this function now? There are a few opened questions: *

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Fujii Masao
On Mon, Aug 26, 2013 at 1:12 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Aug 26, 2013 at 7:47 AM, Jim Nasby j...@nasby.net wrote: On 8/23/13 11:23 AM, Greg Stark wrote: This doesn't generate a unique id. You could back up a standby and restore it and point it at the original

[HACKERS] pg_dump/restore encoding woes

2013-08-26 Thread Heikki Linnakangas
pg_dump and pg_restore don't behave very nicely when the client and server encodings don't match. Below are three issues that arise from that. All the examples below use a console with a UTF-8 locale, and the 'latin1db' database uses ISO-8859-1 as the database encoding. In that database, there

Re: [HACKERS] pg_dump/restore encoding woes

2013-08-26 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: When client encoding is not specified explicitly with the -E option, or PGCLIENTENCODING env variable, the dump is created in the server encoding. Yeah, that's intentional as I recall. However, pg_dump is special, because client encoding

Re: [HACKERS] median and percentile function implementation

2013-08-26 Thread Pavel Stehule
Hello very nice! I tested it and works very well. And I looking for implementation in core. Two notes: * should to support string_agg and array_agg Regards Pavel 2013/8/26 Vik Fearing vik.fear...@dalibo.com On 08/26/2013 02:39 PM, Pavel Stehule wrote: Hello Three years ago we

Re: [HACKERS] median and percentile function implementation

2013-08-26 Thread Atri Sharma
On Mon, Aug 26, 2013 at 10:15 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello very nice! I tested it and works very well. And I looking for implementation in core. Two notes: * should to support string_agg and array_agg Regards Pavel 2013/8/26 Vik Fearing

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Josh Berkus
All, I think we've gotten a bit off the track of the proposed patch, which is designed to report the system_identifier string currently in pg_controldata, nothing more. I'm going to reverse my vote, and vote against this patch. The reason why is that I think we should instead have a function:

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-26 Thread Stephen Frost
Martijn, * Martijn van Oosterhout (klep...@svana.org) wrote: Note, my whole purpose for suggesting something like: include_auto_conf_filepostgresql.auto.conf is because I want the file location to be configurable. If I put in my configuration: include_auto_conf_file

Re: [HACKERS] Backup throttling

2013-08-26 Thread Antonin Houska
On 08/26/2013 02:33 PM, Craig Ringer wrote: On 08/26/2013 08:15 PM, Hannu Krosing wrote: On 08/26/2013 12:50 PM, Antonin Houska wrote: On 08/22/2013 03:33 PM, Craig Ringer wrote: On 08/22/2013 01:39 PM, PostgreSQL - Hans-Jürgen Schönig wrote: what would be a reasonable scenario where

Re: [HACKERS] GetTransactionSnapshot() in enum.c

2013-08-26 Thread Robert Haas
On Mon, Aug 19, 2013 at 1:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: ISTM that we shouldn't use GetTransactionSnapshot() in enum.c but GetLatestSnapshot() in = 9.3 and NULL/GetCatalogSnapshot() 9.3. typecache.c's usage was converted to

Re: [HACKERS] ereport documentation patch

2013-08-26 Thread Robert Haas
On Tue, Aug 20, 2013 at 11:47 AM, Christophe Pettus x...@thebuild.com wrote: Attached! Committed. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [9.3 doc fix] clarification of Solaris versions

2013-08-26 Thread Robert Haas
On Wed, Aug 21, 2013 at 10:30 AM, MauMau maumau...@gmail.com wrote: One of my colleagues, who is relatively new to PostgreSQL, asked me if PostgreSQL supports Solaris 11. The reason why he had this question is that the following page says Solaris 10 instead of Solaris 10 and later.

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Andres Freund
Hi, On 2013-08-26 10:10:54 -0700, Josh Berkus wrote: I think we've gotten a bit off the track of the proposed patch, which is designed to report the system_identifier string currently in pg_controldata, nothing more. Agreed. I'm going to reverse my vote, and vote against this patch. The

Re: [HACKERS] [9.3 doc fix] clarification of Solaris versions

2013-08-26 Thread Alvaro Herrera
Robert Haas escribió: Just because OpenSolaris is discontinued doesn't mean we don't support it. It looks like it has been unsupported for ~3 years at this point - not sure if that is long enough to remove the documentation reference. That part of the operating system ecosystem is messy,

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Dimitri Fontaine
Andres Freund and...@2ndquadrant.com writes: If anything but the proposed feature, it should be an SRF - passing in text parameters isn't very discoverable. And I can't imagine where an SRF would have too high overhead. The two existing extensions doing that are SRFs, yes. One of them has been

Re: [HACKERS] Detail part for still waiting for lock log message

2013-08-26 Thread Alvaro Herrera
Tarvi Pillessaar escribió: Fixed patch attached. 1. this assumes there is only one holder, which is not correct. (Consider two backends holding shared lock on something and another one stuck trying to acquire exclusive) 2. I think pgstat_get_backend_current_activity() can be helpful. 3.

[HACKERS] pg_restore multiple --function options

2013-08-26 Thread Heikki Linnakangas
Hi, While looking at the pg_restore code, I noticed that while it supports specifying multiple --table options to restore several tables, it does not support multiple --function options. Or --index, --schema, or --trigger. The support for multiple --table options was added in 9.3, in

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Andres Freund
On 2013-08-26 21:13:49 +0200, Dimitri Fontaine wrote: Andres Freund and...@2ndquadrant.com writes: If anything but the proposed feature, it should be an SRF - passing in text parameters isn't very discoverable. And I can't imagine where an SRF would have too high overhead. The two

Re: [HACKERS] Improving avg performance for numeric

2013-08-26 Thread Pavel Stehule
Hello here is a rebased patch. Hadi, please, can verify this version? Regards Pavel p.s. Performance tests postgres=# create table foo(a int, b float, c double precision, d numeric, gr int); CREATE TABLE postgres=# postgres=# insert into foo select 1, 2.0, 3.0, 3.14, random()*1 from

Re: [HACKERS] pg_restore multiple --function options

2013-08-26 Thread David Fetter
On Mon, Aug 26, 2013 at 10:29:06PM +0300, Heikki Linnakangas wrote: Hi, While looking at the pg_restore code, I noticed that while it supports specifying multiple --table options to restore several tables, it does not support multiple --function options. Or --index, --schema, or --trigger.

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-08-26 10:10:54 -0700, Josh Berkus wrote: I'm going to reverse my vote, and vote against this patch. The reason why is that I think we should instead have a function: pg_controldata(parameter text) ... which would report *all* strings

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Andres Freund
On 2013-08-26 16:35:57 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-08-26 10:10:54 -0700, Josh Berkus wrote: I'm going to reverse my vote, and vote against this patch. The reason why is that I think we should instead have a function:

Re: [HACKERS] GetTransactionSnapshot() in enum.c

2013-08-26 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Aug 19, 2013 at 1:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: BTW, I notice that the MVCC-catalog-scans patch summarily asserts that RenumberEnumType no longer poses any concurrency hazards. I doubt that's true: isn't it still possible that

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Josh Berkus
On 08/26/2013 01:50 PM, Andres Freund wrote: All the other variables are either already exposed, don't seem to be all that interesting or not necessary accurate for a running cluster. I'd vote for doing things piecemal here, otherwise it seems to be too likely that we never get anywhere.

Re: [HACKERS] pg_restore multiple --function options

2013-08-26 Thread Michael Paquier
On Tue, Aug 27, 2013 at 5:17 AM, David Fetter da...@fetter.org wrote: On Mon, Aug 26, 2013 at 10:29:06PM +0300, Heikki Linnakangas wrote: Hi, While looking at the pg_restore code, I noticed that while it supports specifying multiple --table options to restore several tables, it does not

[HACKERS] [GENERAL] Call for translations

2013-08-26 Thread yinminmin
Peter Eisentraut, My name is Minmin,I come from China.At present,I am responsible for translation work.From the site,I see some information about calling for translations.I have great interest in this job, and have time to do it.I hope that have opportunity to do this work.

[HACKERS] Patch: Allow formatting in log_line_prefix

2013-08-26 Thread David Rowley
Heikki wrote that it might be useful to allow formatting in the log_line_prefix here http://www.postgresql.org/message-id/5187cadb.50...@vmware.com I thought I'd take a bash at implementing space padding part on log_line_prefix options. It's been a while since I worked with the PostgreSQL

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-08-26 Thread Amit Kapila
On Mon, Aug 26, 2013 at 10:50 PM, Stephen Frost sfr...@snowman.net wrote: Martijn, * Martijn van Oosterhout (klep...@svana.org) wrote: Note, my whole purpose for suggesting something like: include_auto_conf_filepostgresql.auto.conf is because I want the file location to be