Re: [HACKERS] [DESIGN] ParallelAppend

2015-08-22 Thread Amit Kapila
On Fri, Aug 21, 2015 at 7:40 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Aug 18, 2015 at 11:27 PM, Amit Kapila amit.kapil...@gmail.com wrote: Here is one other issue I found. Existing code assumes a TOC segment has only one contents per node type, so it uses pre-defined key (like

Re: [HACKERS] Test code is worth the space

2015-08-22 Thread Noah Misch
On Tue, Aug 18, 2015 at 02:03:19PM +0100, Greg Stark wrote: On Tue, Aug 18, 2015 at 6:57 AM, Noah Misch n...@leadboat.com wrote: My own position is based on having maintained a pg_regress suite an order of magnitude larger than that. I don't know why that outcome was so different. And does

Re: [HACKERS] Autonomous Transaction is back

2015-08-22 Thread Noah Misch
On Fri, Aug 21, 2015 at 10:06:44AM -0400, Robert Haas wrote: On Tue, Aug 18, 2015 at 3:06 PM, Merlin Moncure mmonc...@gmail.com wrote: On Tue, Aug 18, 2015 at 8:17 AM, Robert Haas robertmh...@gmail.com wrote: On Sat, Aug 15, 2015 at 6:47 PM, Noah Misch n...@leadboat.com wrote: [1] That's

Re: [HACKERS] PATCH: numeric timestamp in log_line_prefix

2015-08-22 Thread Fabien COELHO
Hello Tomas, from time to time I need to correlate PostgreSQL logs to other logs, containing numeric timestamps - a prime example of that is pgbench. With %t and %m that's not quite trivial, because of timezones etc. I propose adding two new log_line_prefix escape sequences - %T and %M, doing

Re: [HACKERS] New functions

2015-08-22 Thread Heikki Linnakangas
On 07/08/2015 01:15 PM, Дмитрий Воронин wrote: 07.07.2015, 18:34, Michael Paquier michael.paqu...@gmail.com: Speaking of which, I have rewritten the patch as attached. This looks way cleaner than the previous version submitted. Dmitry, does that look fine for you? I am switching this

Re: [HACKERS] Reducing ClogControlLock contention

2015-08-22 Thread Andres Freund
Hi, Amit pinged me about my opinion of this patch. I don't really have time/energy for an in-depth review right now, but since I'd looked enough to see some troublesome points, I thought I'd write those. On 2015-06-30 08:02:25 +0100, Simon Riggs wrote: Proposal for improving this is to acquire

Re: [HACKERS] Error message with plpgsql CONTINUE

2015-08-22 Thread Tom Lane
I had a few second thoughts about the wording of the error messages in this area. First, consider create or replace function foo() returns void language plpgsql as $$ begin lab1 loop exit lab1; -- ok end loop; loop exit lab1; -- not so ok end loop; end$$; ERROR: label lab1

Re: [HACKERS] PATCH: numeric timestamp in log_line_prefix

2015-08-22 Thread Fabien COELHO
Hello Tomas, Review of v2: attached is a v2 of the patch, reworked based on the comments. The patch applies cleanly to head, it compiles, I tested it and it mostly work as expected, see below. 1) fix the docs (explicitly say that it's a Unix epoch) I would add the word numeric in

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2015-08-22 Thread Greg Stark
On 22 Aug 2015 18:02, Tom Lane t...@sss.pgh.pa.us wrote: Why not define infnan() and make it do the same thing as FloatExceptionHandler? Or was that what you meant? That's exactly what I meant, instead of my quick hack to add a signal handler for sigill. The hang is actually in the

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2015-08-22 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/20/2015 07:54 AM, Joe Conway wrote: On 08/20/2015 06:59 AM, Andrew Dunstan wrote: I was a bit interested in pg_config information, for this reason: I had a report of someone who had configured using --with-libxml but the xml tests actually

Re: [HACKERS] checkpointer continuous flushing

2015-08-22 Thread Amit Kapila
On Wed, Aug 19, 2015 at 12:13 PM, Fabien COELHO coe...@cri.ensmp.fr wrote: Sure, I think what can help here is a testcase/'s (in form of script file or some other form, to test this behaviour of patch) which you can write and post here, so that others can use that to get the data and share

Re: [HACKERS] PATCH: numeric timestamp in log_line_prefix

2015-08-22 Thread Tomas Vondra
Hi all, attached is a v2 of the patch, reworked based on the comments. 1) fix the docs (explicitly say that it's a Unix epoch) 2) handle 'padding' properly 3) get rid of timestamp_str - use appendString* methods directly 4) support just the with milliseconds using '%n' escape sequence All

Re: [HACKERS] allowing wal_level change at run time

2015-08-22 Thread Peter Eisentraut
On 8/20/15 3:50 PM, Andres Freund wrote: But, under any scheme to set wal_level automatically, how will the primary know whether it needs to use level archive or hot_standby? I'd have said archive_mode triggered archive and everything else hot_standby. That might be a decent heuristic, but

Re: [HACKERS] PATCH: numeric timestamp in log_line_prefix

2015-08-22 Thread Tomas Vondra
On 08/22/2015 09:54 PM, Fabien COELHO wrote: Hello Tomas, Review of v2: attached is a v2 of the patch, reworked based on the comments. The patch applies cleanly to head, it compiles, I tested it and it mostly work as expected, see below. 1) fix the docs (explicitly say that it's a Unix

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2015-08-22 Thread Tom Lane
Greg Stark st...@mit.edu writes: Hmm. The backtrace is here but I think it's lying about the specific line. #0 convert_one_string_to_scalar (value=0x7f20e9a3 , rangelo=32, rangehi=122, 2132863395, 32, 122) at selfuncs.c:3873 #1 0x00435880 in convert_string_to_scalar (

Re: [HACKERS] PostgreSQL for VAX on NetBSD/OpenBSD

2015-08-22 Thread Tom Lane
Greg Stark st...@mit.edu writes: On Thu, Aug 20, 2015 at 3:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: That seems worth poking into. Mea culpa. Not a planner crash but rather an overflow from exp(). It turns out exp() and other math library functions on Vax do not signal FPE but rather have a

Re: [HACKERS] (full) Memory context dump considered harmful

2015-08-22 Thread Tomas Vondra
On 08/22/2015 06:06 PM, Tom Lane wrote: Tomas Vondra tomas.von...@2ndquadrant.com writes: Couldn't we make it a bit smarter to handle even cases like this? For example we might first count/sum the child contexts, and then print either all child contexts (if there are only a few of them) or

Re: [HACKERS] (full) Memory context dump considered harmful

2015-08-22 Thread Tom Lane
Tomas Vondra tomas.von...@2ndquadrant.com writes: One question regarding the proposed patch though - if I get it right (just looking at the diff), it simply limits the output to first 100 child contexts at each level independently. So if each of those 100 child contexts has 100 child

Re: [HACKERS] Potential GIN vacuum bug

2015-08-22 Thread Jeff Janes
On Tue, Aug 18, 2015 at 8:59 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Aug 17, 2015 at 5:41 PM, Jeff Janes jeff.ja...@gmail.com wrote: User backends attempt to take the lock conditionally, because otherwise they would cause an autovacuum already holding the lock to cancel itself,

Re: [HACKERS] Test code is worth the space

2015-08-22 Thread Jeff Janes
On Tue, Aug 18, 2015 at 3:32 PM, David Fetter da...@fetter.org wrote: On Tue, Aug 18, 2015 at 04:54:07PM +0100, Greg Stark wrote: On Tue, Aug 18, 2015 at 2:16 PM, David Fetter da...@fetter.org wrote: I'm given to understand that this tight coupling is necessary for performance. Are you

Re: [HACKERS] PATCH: numeric timestamp in log_line_prefix

2015-08-22 Thread Tomas Vondra
Hi, On 08/22/2015 08:39 AM, Fabien COELHO wrote: Hello Tomas, from time to time I need to correlate PostgreSQL logs to other logs, containing numeric timestamps - a prime example of that is pgbench. With %t and %m that's not quite trivial, because of timezones etc. I propose adding two new

Re: [HACKERS] (full) Memory context dump considered harmful

2015-08-22 Thread Tom Lane
Tomas Vondra tomas.von...@2ndquadrant.com writes: On 08/21/2015 08:37 PM, Tom Lane wrote: ... But suppose we add a parameter to memory context stats collection that is the maximum number of child contexts to print *per parent context*. If there are more than that, summarize the rest as per