Re: [HACKERS] Backup throttling

2013-08-26 Thread Craig Ringer
On 08/27/2013 01:56 AM, Antonin Houska wrote: > However what you stress now is control of the (continuous) WAL stream > and thus something that affects normal operation, rather than setup. I > still think the pg_basebackup does not have to throttle the WAL stream, > so this your request does not ov

Re: [HACKERS] UNNEST with multiple args, and TABLE with multiple funcs

2013-08-26 Thread Boszormenyi Zoltan
2013-08-27 01:24 keltezéssel, Andrew Gierth írta: Latest version of patch. This should be it as far as code goes; there may be some more regression test work, and a doc patch will be forthcoming. This version supports, in addition to the previous stuff: [snip] In my limited testing, it works

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 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 configurable. If I

[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 source,

[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.

Re: [HACKERS] pg_restore multiple --function options

2013-08-26 Thread Michael Paquier
On Tue, Aug 27, 2013 at 5:17 AM, David Fetter 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 support mu

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] GetTransactionSnapshot() in enum.c

2013-08-26 Thread Tom Lane
Robert Haas writes: > On Mon, Aug 19, 2013 at 1:41 PM, Tom Lane 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 pg_enum rows acquired through the >>

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Andres Freund
On 2013-08-26 16:35:57 -0400, Tom Lane wrote: > Andres Freund 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 tex

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Tom Lane
Andres Freund 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 in pg_contr

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 --trig

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 genera

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Andres Freund
On 2013-08-26 21:13:49 +0200, Dimitri Fontaine wrote: > Andres Freund 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

[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 January.

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. Doesn'

Re: [HACKERS] pg_system_identifier()

2013-08-26 Thread Dimitri Fontaine
Andres Freund 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 made by our committ

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 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 Robert Haas
On Wed, Aug 21, 2013 at 10:30 AM, MauMau 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". > > http://www.postgresq

Re: [HACKERS] ereport documentation patch

2013-08-26 Thread Robert Haas
On Tue, Aug 20, 2013 at 11:47 AM, Christophe Pettus 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] GetTransactionSnapshot() in enum.c

2013-08-26 Thread Robert Haas
On Mon, Aug 19, 2013 at 1:41 PM, Tom Lane wrote: > Andres Freund 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 GetLatestSnapshot() but enum.c's >> was not

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 reasona

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/etc/

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: p

Re: [HACKERS] median and percentile function implementation

2013-08-26 Thread Atri Sharma
On Mon, Aug 26, 2013 at 10:15 PM, Pavel Stehule 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 >> >> On 08/26/2013 02:3

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 > On 08/26/2013 02:39 PM, Pavel Stehule wrote: > > Hello > > > > Three years ago we worked on implementa

Re: [HACKERS] pg_dump/restore encoding woes

2013-08-26 Thread Tom Lane
Heikki Linnakangas 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 affects not only > the

[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_system_identifier()

2013-08-26 Thread Fujii Masao
On Mon, Aug 26, 2013 at 1:12 PM, Michael Paquier wrote: > On Mon, Aug 26, 2013 at 7: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 s

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 questio

[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 * effect

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 >>

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 key&value mixing, but real solution, probably, could come from spgist and gin combination. I mean, spgist (suffix array) instead of btree for avoiding key duplication

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 procl

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

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 rever

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 i