Re: [HACKERS] plpgsql_check_function - rebase for 9.3

2013-12-08 Thread Pavel Stehule
There is still valid a variant to move check function to contrib for fist moment. Regards Pavel 2013/12/7 Pavel Stehule > Hello > > thank you for review > > > 2013/12/7 Steve Singer > >> On 08/22/2013 02:02 AM, Pavel Stehule wrote: >> >>> rebased >>> >>> Regards >>> >>> Pavel >>> >>> This p

Re: [HACKERS] Feature request: Logging SSL connections

2013-12-08 Thread Marko Kreen
On Fri, Dec 06, 2013 at 02:53:27PM +0100, Dr. Andreas Kunert wrote: > >>Anything else missing? > > > >Functionally it's fine now, but I see few style problems: > > > >- "if (port->ssl > 0)" is wrong, ->ssl is pointer. So use just > > "if (port->ssl)". > >- Deeper indentation would look nicer wit

Re: [HACKERS] shared memory message queues

2013-12-08 Thread Kohei KaiGai
2013/12/6 Kohei KaiGai : > What will happen if sender tries to send a large chunk that needs to > be split into multiple sub-chunks and receiver concurrently detaches > itself from the queue during the writes by sender? > It seems to me the sender gets SHM_MQ_DETACHED and only > earlier half of the

Re: [HACKERS] pg_stat_statements: calls under-estimation propagation

2013-12-08 Thread Magnus Hagander
On Sun, Dec 8, 2013 at 1:00 AM, Peter Geoghegan wrote: > On Sat, Dec 7, 2013 at 3:50 PM, Peter Eisentraut wrote: > > 32-bit buildfarm members are having problems with this patch. > > This should fix that problem. Thanks. > Applied. I also noted on http://buildfarm.postgresql.org/cgi-bin/show_s

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-08 Thread Magnus Hagander
On Sun, Dec 8, 2013 at 3:41 AM, MauMau wrote: > From: "MauMau" > > I've removed a limitation regarding event log on Windows with the attached >> patch. I hesitate to admit this is a bug fix and want to regard this an >> improvement, but maybe it's a bug fix from users' perspective. Actually,

Re: [HACKERS] pg_stat_statements: calls under-estimation propagation

2013-12-08 Thread Peter Eisentraut
On Sat, 2013-12-07 at 16:00 -0800, Peter Geoghegan wrote: > On Sat, Dec 7, 2013 at 3:50 PM, Peter Eisentraut wrote: > > 32-bit buildfarm members are having problems with this patch. > > This should fix that problem. Thanks. This is incidentally the same problem that was reported here about anoth

Re: [HACKERS] CLUSTER FREEZE

2013-12-08 Thread Peter Eisentraut
On Tue, 2013-11-19 at 18:24 +0100, Andres Freund wrote: > On 2013-11-19 12:23:30 -0500, Robert Haas wrote: > > On Mon, Nov 18, 2013 at 11:45 AM, Andres Freund > > wrote: > > >> Yes, we probably should make a decision, unless Robert's idea can be > > >> implemented. We have to balance the ease of

Re: [HACKERS] Completing PL support for Event Triggers

2013-12-08 Thread Peter Eisentraut
On Tue, 2013-11-26 at 06:59 -0500, Peter Eisentraut wrote: > Attached is my "final" patch. Let me know if it's OK for you. Dimitri, will you have a change to review this? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.pos

Re: [HACKERS] plpgsql_check_function - rebase for 9.3

2013-12-08 Thread Peter Eisentraut
In my opinion, the idea of having a separate lint checker for a language is antiquated. If there are problems, they should be diagnosed at compile time or run time. You can add options about warning levels or strictness if there are concerns about which diagnostics are appropriate. > >

Re: [HACKERS] plpgsql_check_function - rebase for 9.3

2013-12-08 Thread Peter Eisentraut
On Sun, 2013-12-08 at 09:45 +0100, Pavel Stehule wrote: > There is still valid a variant to move check function to contrib for > fist moment. If we are not happy with the code or the interface, then moving it to contrib is not a solution. We are still committed to main things in contrib indefini

Re: [HACKERS] Add %z support to elog/ereport?

2013-12-08 Thread Peter Eisentraut
On Sun, 2013-12-08 at 01:32 +0100, Andres Freund wrote: > Patch 02 converts some elog/ereport() callers to using the z modifier, > some were wrong at least on 64 bit windows. This is making the assumption that Size is the same as size_t. If we are going to commit to that, we might as well g

Re: [HACKERS] Add %z support to elog/ereport?

2013-12-08 Thread Andres Freund
On 2013-12-08 11:43:46 -0500, Peter Eisentraut wrote: > On Sun, 2013-12-08 at 01:32 +0100, Andres Freund wrote: > > Patch 02 converts some elog/ereport() callers to using the z modifier, > > some were wrong at least on 64 bit windows. > > This is making the assumption that Size is the same a

Re: [HACKERS] plpgsql_check_function - rebase for 9.3

2013-12-08 Thread Pavel Stehule
2013/12/8 Peter Eisentraut > In my opinion, the idea of having a separate lint checker for a language > is antiquated. If there are problems, they should be diagnosed at > compile time or run time. You can add options about warning levels or > strictness if there are concerns about which diagno

Re: [HACKERS] WITHIN GROUP patch

2013-12-08 Thread Tom Lane
Andrew Gierth writes: > There's also the question of ungrouped vars, maybe. Consider these two > queries: > select array(select a+sum(x) from (values (0.3),(0.7)) v(a) group by a) > from generate_series(1,5) g(x); > select array(select percentile_disc(a) within group (order by x) >

Re: [HACKERS] dblink performance regression

2013-12-08 Thread Tom Lane
Joe Conway writes: > I don't think it makes sense to create a new function in dblink either > -- we're only talking about two lines of added redundancy which is > less lines of code than a new function would add. Indeed, and I think the claim that such a function "encapsulates" anything useful is

Re: [HACKERS] ANALYZE sampling is too good

2013-12-08 Thread Greg Stark
On Sun, Dec 8, 2013 at 12:06 AM, Mark Kirkwood wrote: > > bench=# ANALYZE pgbench_accounts; > NOTICE: acquire sample will need 3 blocks > NOTICE: sampled 3 blocks > ANALYZE > Time: 10059.446 ms > bench=# \q I did some experimenting here as well. I hacked up a version of analyze.c that

Re: [HACKERS] Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

2013-12-08 Thread Pavel Stehule
2013/12/8 Dean Rasheed > On 7 December 2013 21:34, Pavel Stehule wrote: > >> Well I was basically proposing that does_not_exist_skipping() be > >> enhanced to report on non-existent types that form part of the object > >> specification. I think this would affect the CAST, FUNCTION, AGGREGATE > >

Re: [HACKERS] ANALYZE sampling is too good

2013-12-08 Thread Josh Berkus
On 12/08/2013 10:14 AM, Greg Stark wrote: > With rows_per_block=1 the MCV frequency list ranges from .0082 to .0123 > With rows_per_block=4 the MCV frequency list ranges from .0063 to .0125 > With rows_per_block=16 the MCV frequency list ranges from .0058 to .0164 > With rows_per_block=64 the M

Re: [HACKERS] ANALYZE sampling is too good

2013-12-08 Thread Heikki Linnakangas
On 12/08/2013 08:14 PM, Greg Stark wrote: The whole accounts table is 1.2GB and contains 10 million rows. As expected with rows_per_block set to 1 it reads 240MB of that containing nearly 2 million rows (and takes nearly 20s -- doing a full table scan for select count(*) only takes about 5s): O

Re: [HACKERS] GIN improvements part 1: additional information

2013-12-08 Thread Alexander Korotkov
On Fri, Nov 29, 2013 at 11:17 PM, Heikki Linnakangas < hlinnakan...@vmware.com> wrote: > On 11/29/2013 11:41 AM, Heikki Linnakangas wrote: > >> On 11/28/2013 09:19 AM, Alexander Korotkov wrote: >> >>> On Wed, Nov 27, 2013 at 1:14 AM, Heikki Linnakangas >>> >> wrote: >>> >>> On 11/26/13

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-08 Thread MauMau
From: "Magnus Hagander" Not having looked at it in detail yet, but this seems to completely remove the default value. What happens if the error that needs to be logged is the one saying that it couldn't exec postgres to find out the value in the config file? AFAICT it's going to try to registe

Re: [HACKERS] Re: [RFC] Shouldn't we remove annoying FATAL messages from server log?

2013-12-08 Thread MauMau
From: "David Johnston" 5. FATAL: terminating walreceiver process due to administrator command 6. FATAL: terminating background worker \"%s\" due to administrator command 5 and 6: I don't fully understand when they would happen but likely fall into the same "the DBA should know what is going o

Re: [HACKERS] [RFC] Shouldn't we remove annoying FATAL messages from server log?

2013-12-08 Thread MauMau
From: "Greg Stark" On the client end the FATAL is pretty logical but in the logs it makes it sound like the entire server died. Especially in this day of multithreaded servers. I was suggesting that that was the origin of the confusion here. Anyone who has seen these messages on the client end m

Re: [HACKERS] ANALYZE sampling is too good

2013-12-08 Thread Greg Stark
On Sun, Dec 8, 2013 at 7:03 PM, Josh Berkus wrote: > They will certainly do so if you don't apply any statistical adjustments > for selecting more rows from the same pages. > > So there's a set of math designed to calculate for the skew introduced > by reading *all* of the rows in each block. I j

Re: [HACKERS] ANALYZE sampling is too good

2013-12-08 Thread Mark Kirkwood
On 09/12/13 08:03, Josh Berkus wrote: So there's a set of math designed to calculate for the skew introduced by reading *all* of the rows in each block. That's what I meant by "block-based sampling"; you read, say, 400 pages, you compile statistics on *all* of the rows on those pages, you apply

Re: [HACKERS] Why we are going to have to go DirectIO

2013-12-08 Thread Jim Nasby
On 12/5/13 9:59 AM, Tom Lane wrote: Greg Stark writes: I think the way to use mmap would be to mmap very large chunks, possibly whole tables. We would need some way to control page flushes that doesn't involve splitting mappings and can be efficiently controlled without having the kernel storin

[HACKERS] Possible work-around for 9.1 partial vacuum bug?

2013-12-08 Thread Jim Nasby
If I'm understanding the vacuum truncate bug correctly, it can be avoided if every 2^31 transactions[1] you: SET vacuum_freeze_table_age = 0; VACUUM FREEZE; table_age = 0 disables partial vacuum and then everything[1] gets frozen, eliminating the risk. Or am I missing something? [1]: Obviousl

Re: [HACKERS] Possible work-around for 9.1 partial vacuum bug?

2013-12-08 Thread Michael Paquier
On Mon, Dec 9, 2013 at 6:33 AM, Jim Nasby wrote: > If I'm understanding the vacuum truncate bug correctly, it can be avoided if > every 2^31 transactions[1] you: > > SET vacuum_freeze_table_age = 0; > VACUUM FREEZE; > > table_age = 0 disables partial vacuum and then everything[1] gets frozen, > el

Re: [HACKERS] WITHIN GROUP patch

2013-12-08 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> We could alternatively decide that the agg has level 0, but that Tom> doesn't seem terribly useful, and I think it's not per spec Tom> either. SQL:2008 section 6.9 seems Tom> pretty clear that only aggregated arguments should be considered Tom> when det

Re: [HACKERS] plpgsql_check_function - rebase for 9.3

2013-12-08 Thread Amit Kapila
On Sun, Dec 8, 2013 at 10:31 PM, Pavel Stehule wrote: > > > > 2013/12/8 Peter Eisentraut >> >> In my opinion, the idea of having a separate lint checker for a language >> is antiquated. If there are problems, they should be diagnosed at >> compile time or run time. You can add options about war

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2013-12-08 Thread Amit Kapila
On Mon, Dec 9, 2013 at 2:25 AM, MauMau wrote: > From: "Magnus Hagander" > >> Not having looked at it in detail yet, but this seems to completely remove >> the default value. What happens if the error that needs to be logged is >> the >> one saying that it couldn't exec postgres to find out the va

Re: [HACKERS] plpgsql_check_function - rebase for 9.3

2013-12-08 Thread Pavel Stehule
2013/12/9 Amit Kapila > On Sun, Dec 8, 2013 at 10:31 PM, Pavel Stehule > wrote: > > > > > > > > 2013/12/8 Peter Eisentraut > >> > >> In my opinion, the idea of having a separate lint checker for a language > >> is antiquated. If there are problems, they should be diagnosed at > >> compile time

Re: [HACKERS] Why we are going to have to go DirectIO

2013-12-08 Thread KONDO Mitsumasa
(2013/12/05 23:42), Greg Stark wrote: On Thu, Dec 5, 2013 at 8:35 AM, KONDO Mitsumasa wrote: Yes. And using something efficiently DirectIO is more difficult than BufferedIO. If we change write() flag with direct IO in PostgreSQL, it will execute hardest ugly randomIO. Using DirectIO presumes

Re: [HACKERS] Show lossy heap block info in EXPLAIN ANALYZE for bitmap heap scan

2013-12-08 Thread Etsuro Fujita
Robert Haas wrote: > On Fri, Dec 6, 2013 at 5:02 AM, Etsuro Fujita > wrote: > > Though at first I agreed on this, while working on this I start to > > think information about (2) is enough for tuning work_mem. Here are > > examples using a version under development, where "Bitmap Memory > > Usage

Re: [HACKERS] COPY table FROM STDIN doesn't show count tag

2013-12-08 Thread Amit Khandekar
On 29 November 2013 19:20, Rajeev rastogi wrote: > On 26 November 2013, Amit Khandelkar wrote: > > >Can you please submit the \COPY patch as a separate patch ? Since these > are two different issues, I would like to have these two fixed and > committed separately. You can always test the \COPY i

Re: [HACKERS] [GENERAL] pg_upgrade ?deficiency

2013-12-08 Thread Karsten Hilbert
BTW, thanks to all who helped in improving this issue. Karsten -- GPG key ID E4071346 @ gpg-keyserver.de E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mail