Re: [HACKERS] Heavily modified big table bloat even in auto vacuum is running

2013-11-21 Thread Haribabu kommi
On 19 November 2013 10:33 Amit Kapila wrote: > If I understood correctly, then your patch's main intention is to > correct the estimate of dead tuples, so that it can lead to Vacuum > cleaning the table/index which otherwise is not happening as per > configuration value (autovacuum_vacuum_threshold

Re: [HACKERS] Add \i option to bring in the specified file as a quoted literal

2013-11-21 Thread Amit Kapila
On Fri, Nov 22, 2013 at 1:33 AM, Alvaro Herrera wrote: > Piotr Marcinczyk escribió: > >> >> + \ib > class="parameter">filename [ > class="parameter">quote_string ] >> + >> + >> + The \ib command appends content of file >> filename >> + to curren

[HACKERS] Server is not getting started with log level as debug5 on master after commit 3147ac

2013-11-21 Thread Amit Kapila
In master branch, server is not getting started with log level as debug5. Simple steps to reproduce the problem: a. initdb -D ..\..\Data b. change log_min_messages = debug5 in postgresql.conf c. start server (pg_ctl start -D ..\..\Data) -- server doesn't get started Relevant message on server co

Re: [HACKERS] psql should show disabled internal triggers

2013-11-21 Thread Fabrízio de Royes Mello
On Fri, Oct 25, 2013 at 3:37 PM, fabriziomello wrote: > > On 2013-09-18 15:15:55 +0200, Bernd Helmle wrote: > > On 2013-09-18 15:15:55 +0200, Bernd Helmle wrote: > > > --On 18. September 2013 13:52:29 +0200 Andres Freund > > > wrote: > > > > > > >If you do ALTER TABLE ... DISABLE TRIGGER

Re: [HACKERS] Status of FDW pushdowns

2013-11-21 Thread David Fetter
On Thu, Nov 21, 2013 at 10:46:14AM -0500, Tom Lane wrote: > Merlin Moncure writes: > > On Thu, Nov 21, 2013 at 9:05 AM, Bruce Momjian wrote: > >> I know join pushdowns seem insignificant, but it helps to restrict what > >> data must be passed back because you would only pass back joined rows. >

Re: [HACKERS] GSOC13 proposal - extend RETURNING syntax

2013-11-21 Thread David Fetter
On Fri, Oct 04, 2013 at 10:42:32AM +0200, Karol Trzcionka wrote: > W dniu 04.10.2013 02:51, Robert Haas pisze: > > Do you have a link to previous discussion on the mailing list? > Sorry, most of discussion was at IRC channel. > > I'm not positive there's enough information available > > at that sta

Re: [HACKERS] Status of FDW pushdowns

2013-11-21 Thread Shigeru Hanada
2013/11/22 Tom Lane : > Merlin Moncure writes: >> On Thu, Nov 21, 2013 at 9:05 AM, Bruce Momjian wrote: >>> I know join pushdowns seem insignificant, but it helps to restrict what >>> data must be passed back because you would only pass back joined rows. > >> By 'insignificant' you mean 'necessar

Re: [HACKERS] Status of FDW pushdowns

2013-11-21 Thread Shigeru Hanada
2013/11/22 Kohei KaiGai : > 2013/11/21 Bruce Momjian : >> Where are we on the remaining possible pushdowns for foreign data >> wrappers, particularly the Postgres one? I know we do WHERE restriction >> pushdowns in 9.3, but what about join and aggregate pushdowns? Is >> anyone working on those? >

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

2013-11-21 Thread Tom Lane
I've committed this patch after some significant editorialization, but leaving the use of TABLE( ... ) syntax in-place. If we decide that we don't want to risk doing that, we can change to some other syntax later. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] WIP patch for updatable security barrier views

2013-11-21 Thread Craig Ringer
On 11/21/2013 10:55 PM, Dean Rasheed wrote: > On 21 November 2013 13:15, Craig Ringer wrote: >> Hi all >> >> I have updatable security barrier views working for INSERT and DELETE, >> so this might be a good chance to see whether the described approach is >> acceptable in reality, not just in theor

Re: [HACKERS] Patch for fail-back without fresh backup

2013-11-21 Thread Andres Freund
On 2013-11-21 14:40:36 -0800, Jeff Janes wrote: > But if the transaction would not have otherwise generated WAL (i.e. a > select that did not have to do any HOT pruning, or an update with zero rows > matching the where condition), doesn't it now have to flush and wait when > it would otherwise not?

Re: [HACKERS] Patch for fail-back without fresh backup

2013-11-21 Thread Jeff Janes
On Thu, Nov 21, 2013 at 12:31 PM, Alvaro Herrera wrote: > Bruce Momjian escribió: > > On Thu, Oct 24, 2013 at 11:14:14PM +0300, Heikki Linnakangas wrote: > > > On 24.10.2013 23:07, Josh Berkus wrote: > > > > >What kind of overhead are we talking about here? > > > > > > One extra WAL record wheneve

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

2013-11-21 Thread Andres Freund
On 2013-11-21 17:14:17 -0500, Peter Eisentraut wrote: > On 11/21/13, 2:35 AM, Pavel Stehule wrote: > > I am feeling, so almost all people prefer > > > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > > > Can we live with it? > > Fine with me. > > I think it helps if

Re: [HACKERS] information schema parameter_default implementation

2013-11-21 Thread Peter Eisentraut
On 11/20/13, 8:39 PM, Rodolfo Campero wrote: > 2013/11/20 Peter Eisentraut mailto:pete...@gmx.net>> > > Updated patch > > > I can't apply the patch; maybe I'm doing something wrong? It looks like you are not in the right directory. -- Sent via pgsql-hackers mailing list (pgsql-hackers@p

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

2013-11-21 Thread Peter Eisentraut
On 11/21/13, 2:35 AM, Pavel Stehule wrote: > I am feeling, so almost all people prefer > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > Can we live with it? Fine with me. I think it helps if you consider IF EXISTS an attribute of the command, not an attribute of t

Re: [HACKERS] Replication Node Identifiers and crashsafe Apply Progress

2013-11-21 Thread Peter Eisentraut
On 11/21/13, 6:15 AM, Andres Freund wrote: > On 2013-11-20 15:05:17 -0500, Robert Haas wrote: >>> That's what I had suggested to some people originally and the response >>> was, well, somewhat unenthusiastic. It's not that easy to assign them in >>> a meaningful automated manner. How do you automat

Re: [HACKERS] [PATCH] Use MAP_HUGETLB where supported (v3)

2013-11-21 Thread Andres Freund
On 2013-11-21 16:24:56 -0500, Robert Haas wrote: > > What about > > huge_tlb_pages={off,try} > > > > Or maybe > > huge_tlb_pages={off,try,require} > > I'd spell "require" as "on", or at least accept that as a synonym. That's off,try, on is what the patch currently implements, Abhijit just was arg

Re: [HACKERS] new unicode table border styles for psql

2013-11-21 Thread Andrew Dunstan
On 11/21/2013 04:39 PM, Peter Eisentraut wrote: On 11/21/13, 2:09 AM, Pavel Stehule wrote: Hello I wrote new styles for psql table borders. http://postgres.cz/wiki/Pretty_borders_in_psql This patch is simply and I am think so some styles can be interesting for final presentation. Do you th

Re: [HACKERS] preserving forensic information when we freeze

2013-11-21 Thread Andres Freund
On 2013-11-21 15:59:35 -0500, Robert Haas wrote: > > * Should HeapTupleHeaderXminFrozen also check for FrozenTransactionId? > > It seems quite possible that people think they've delt with frozen > > xmin entirely after checking, but they still might get > > FrozenTransactionId back in a pg_up

Re: [HACKERS] new unicode table border styles for psql

2013-11-21 Thread Peter Eisentraut
On 11/21/13, 2:09 AM, Pavel Stehule wrote: > Hello > > I wrote new styles for psql table borders. > > http://postgres.cz/wiki/Pretty_borders_in_psql > > This patch is simply and I am think so some styles can be interesting > for final presentation. > > Do you think so this feature is generally

Re: [HACKERS] new unicode table border styles for psql

2013-11-21 Thread Merlin Moncure
On Thu, Nov 21, 2013 at 1:09 AM, Pavel Stehule wrote: > Hello > > I wrote new styles for psql table borders. > > http://postgres.cz/wiki/Pretty_borders_in_psql > > This patch is simply and I am think so some styles can be interesting for > final presentation. > great. hm, maybe we could integrate

Re: [HACKERS] COMMENT ON CONSTRAINT ON DOMAIN ?

2013-11-21 Thread Peter Eisentraut
On 11/21/13, 3:29 PM, Elvis Pranskevichus wrote: > I may be totally missing something, but there seems to be no way > to create a COMMENT on a domain constraint. There is > > COMMENT ON CONSTRAINT constraint_name ON table_name > > but no such thing for domain constraints, which seems like a >

Re: [HACKERS] [PATCH] Use MAP_HUGETLB where supported (v3)

2013-11-21 Thread Robert Haas
On Thu, Nov 21, 2013 at 4:09 PM, Alvaro Herrera wrote: > Abhijit Menon-Sen wrote: >> At 2013-11-15 15:17:32 +0200, hlinnakan...@vmware.com wrote: > >> > But I'm not wedded to the idea if someone objects; a log message might >> > also be reasonable: "LOG: huge TLB pages are not supported on this >>

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Andres Freund
On 2013-11-21 23:02:29 +0200, Heikki Linnakangas wrote: > On 21.11.2013 22:53, Andres Freund wrote: > >On 2013-11-21 12:51:17 -0800, Josh Berkus wrote: > >>On 11/21/2013 12:46 PM, Andres Freund wrote: > >>>The problem is starting with hot_standby=on on a system with > >>>recovery.conf present. It i

Re: [HACKERS] [PATCH] Use MAP_HUGETLB where supported (v3)

2013-11-21 Thread Andres Freund
On 2013-11-21 18:09:38 -0300, Alvaro Herrera wrote: > Abhijit Menon-Sen wrote: > > At 2013-11-15 15:17:32 +0200, hlinnakan...@vmware.com wrote: > > > > But I'm not wedded to the idea if someone objects; a log message might > > > also be reasonable: "LOG: huge TLB pages are not supported on this >

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Heikki Linnakangas
On 21.11.2013 22:55, Andres Freund wrote: Hi, On 2013-11-20 12:48:50 +0200, Heikki Linnakangas wrote: On 19.11.2013 16:22, Andres Freund wrote: On 2013-11-19 15:20:01 +0100, Andres Freund wrote: Imo something the attached patch should be done. The description I came g> >>up with is: F

Re: [HACKERS] Proof of concept: standalone backend with full FE/BE protocol

2013-11-21 Thread Amit Kapila
On Thu, Nov 21, 2013 at 8:14 PM, Tom Lane wrote: > Amit Kapila writes: >> Here what I have in mind is that: >> a. In pg_dump or other internal utilities where we want to use this >> feature, they should call PQenableStart() or some other API before >> calling PQConnect() which will indicate

Re: [HACKERS] [PATCH] Use MAP_HUGETLB where supported (v3)

2013-11-21 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: > At 2013-11-15 15:17:32 +0200, hlinnakan...@vmware.com wrote: > > But I'm not wedded to the idea if someone objects; a log message might > > also be reasonable: "LOG: huge TLB pages are not supported on this > > platform, but huge_tlb_pages was 'on'" > > Put that way, I

Re: [HACKERS] preserving forensic information when we freeze

2013-11-21 Thread Andres Freund
Hi, As promised I'm currently updating the patch. Some questions arose during that: * Should HeapTupleHeaderXminFrozen also check for FrozenTransactionId? It seems quite possible that people think they've delt with frozen xmin entirely after checking, but they still might get FrozenTransact

Re: [HACKERS] b21de4e7b32f868a23bdc5507898d36cbe146164 seems to be two bricks shy of a load

2013-11-21 Thread Amit Kapila
On Thu, Nov 21, 2013 at 4:22 PM, David Rowley wrote: > I'm not quite sure why nobody else seems to be complaining, but the changes > to type.h in this commit seems to have broken things little. > > In the visual studios build I'm getting: > > src\interfaces\ecpg\preproc\preproc.y(84): error C206

Re: [HACKERS] Replication Node Identifiers and crashsafe Apply Progress

2013-11-21 Thread Robert Haas
On Thu, Nov 21, 2013 at 6:15 AM, Andres Freund wrote: >> > WRT performance: I agree that fixed-width identifiers are more >> > performant, that's why I went for them, but I am not sure it's that >> > important. The performance sensitive parts should all be done using the >> > internal id the ident

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Heikki Linnakangas
On 21.11.2013 22:53, Andres Freund wrote: On 2013-11-21 12:51:17 -0800, Josh Berkus wrote: On 11/21/2013 12:46 PM, Andres Freund wrote: The problem is starting with hot_standby=on on a system with recovery.conf present. It is independent of whether you use streaming replication, archive based r

Re: [HACKERS] Proof of concept: standalone backend with full FE/BE protocol

2013-11-21 Thread Amit Kapila
On Thu, Nov 21, 2013 at 9:11 AM, Amit Kapila wrote: > On Thu, Nov 21, 2013 at 2:14 AM, Tom Lane wrote: >> Peter Eisentraut writes: >>> The argument elsewhere in this thread was that the reason for putting >>> this in the connection options was so that you do *not* have to patch up >>> every clie

Re: [HACKERS] [PATCH] Store Extension Options

2013-11-21 Thread Robert Haas
On Wed, Nov 20, 2013 at 9:35 PM, Fabrízio de Royes Mello wrote: >> > So, with this patch we can do that: >> > >> > ALTER TABLE foo >> >SET (ext.somext.do_replicate=true); >> > >> > When 'ext' is the fixed prefix, 'somext' is the extension name, >> > 'do_replicate' is the >> > extension option

Re: [HACKERS] b21de4e7b32f868a23bdc5507898d36cbe146164 seems to be two bricks shy of a load

2013-11-21 Thread Boszormenyi Zoltan
2013-11-21 11:52 keltezéssel, David Rowley írta: I'm not quite sure why nobody else seems to be complaining, but the changes to type.h in this commit seems to have broken things little. In the visual studios build I'm getting: src\interfaces\ecpg\preproc\preproc.y(84): error C2065: 'ET_FATAL

Re: [HACKERS] new unicode table border styles for psql

2013-11-21 Thread Pavel Stehule
I should to appen list of new styles to doc. Style double6 doesnt exist, because I renamed double5 to bold1 (and created second bold2) I will update patch tomorrow - it will be in cf4 Regards Pavel Dne 21.11.2013 21:37 "Szymon Guz" napsal(a): > On 21 November 2013 21:15, Szymon Guz wrote: > >

Re: [HACKERS] preserving forensic information when we freeze

2013-11-21 Thread Robert Haas
On Thu, Nov 21, 2013 at 9:47 AM, Andres Freund wrote: > As promised I'm currently updating the patch. Some questions arose > during that: > > * Should HeapTupleHeaderXminFrozen also check for FrozenTransactionId? > It seems quite possible that people think they've delt with frozen > xmin entir

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Andres Freund
Hi, On 2013-11-20 12:48:50 +0200, Heikki Linnakangas wrote: > On 19.11.2013 16:22, Andres Freund wrote: > >On 2013-11-19 15:20:01 +0100, Andres Freund wrote: > >>Imo something the attached patch should be done. The description I came g> >>up with is: > >> > >> Fix Hot-Standby initialization of

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Andres Freund
On 2013-11-21 12:51:17 -0800, Josh Berkus wrote: > On 11/21/2013 12:46 PM, Andres Freund wrote: > > No. Check > > http://archives.postgresql.org/message-id/20131120234141.GI18801%40awork2.anarazel.de > > > > The problem is starting with hot_standby=on on a system with > > recovery.conf present. It

Re: [HACKERS] Extension Templates S03E11

2013-11-21 Thread Alvaro Herrera
Dimitri Fontaine wrote: > Stephen Frost writes: > > Are there any other changes you have pending for this..? Would be nice > > to see the latest version which you've tested and which patches cleanly > > against master... ;) > > I just rebased now, please see attached. I had to pick new OIDs in s

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Josh Berkus
On 11/21/2013 12:46 PM, Andres Freund wrote: > No. Check > http://archives.postgresql.org/message-id/20131120234141.GI18801%40awork2.anarazel.de > > The problem is starting with hot_standby=on on a system with > recovery.conf present. It is independent of whether you use streaming > replication, a

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Andres Freund
On 2013-11-21 12:39:54 -0800, Josh Berkus wrote: > On 11/21/2013 12:36 PM, Joshua D. Drake wrote: > > > > Hello, > > > > This is turning into a rather large thread and I have a simple question: > > > > Is a work-around to this problem as simple as disabling streaming > > replication and enabling

Re: [HACKERS] Add \i option to bring in the specified file as a quoted literal

2013-11-21 Thread Alvaro Herrera
Piotr Marcinczyk escribió: > > + \ib class="parameter">filename [ class="parameter">quote_string ] > + > + > + The \ib command appends content of file > filename > + to current query buffer. If parameter > quote_string > + is not se

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Joshua D. Drake
Hello, This is turning into a rather large thread and I have a simple question: Is a work-around to this problem as simple as disabling streaming replication and enabling log shipping instead? Joshua D. Drake -- Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579 PostgreSQL

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Josh Berkus
On 11/21/2013 12:36 PM, Joshua D. Drake wrote: > > Hello, > > This is turning into a rather large thread and I have a simple question: > > Is a work-around to this problem as simple as disabling streaming > replication and enabling log shipping instead? Yes, and re-cloning the replica, in case

Re: [HACKERS] new unicode table border styles for psql

2013-11-21 Thread Szymon Guz
On 21 November 2013 21:15, Szymon Guz wrote: > > > > On 21 November 2013 20:20, Pavel Stehule wrote: > >> So here is patch for 9.4 >> >> 7 new line styles, 2 new border styles, \pset border autocomplete >> >> Regards >> >> Pavel >> >> >> >> >> 2013/11/21 Szymon Guz >> >>> On 21 November 2013 08

Re: [HACKERS] Patch for fail-back without fresh backup

2013-11-21 Thread Alvaro Herrera
Bruce Momjian escribió: > On Thu, Oct 24, 2013 at 11:14:14PM +0300, Heikki Linnakangas wrote: > > On 24.10.2013 23:07, Josh Berkus wrote: > > >What kind of overhead are we talking about here? > > > > One extra WAL record whenever a hint bit is set on a page, for the > > first time after a checkpo

[HACKERS] COMMENT ON CONSTRAINT ON DOMAIN ?

2013-11-21 Thread Elvis Pranskevichus
Hello, I may be totally missing something, but there seems to be no way to create a COMMENT on a domain constraint. There is COMMENT ON CONSTRAINT constraint_name ON table_name but no such thing for domain constraints, which seems like a weird omission. I couldn't find any relevant discuss

[HACKERS] MultiXact pessmization in 9.3

2013-11-21 Thread Andres Freund
Hi, While looking at the multixact truncation code (mail nearby), I've noticed that there's a significant difference in the way multixact members are accessed since fkey locks were introduced: <9.3 when heap_lock_tuple finds a XMAX_IS_MULTI tuple it executes MultiXactIdWait() which in turn uses G

Re: [HACKERS] new unicode table border styles for psql

2013-11-21 Thread Szymon Guz
On 21 November 2013 20:20, Pavel Stehule wrote: > So here is patch for 9.4 > > 7 new line styles, 2 new border styles, \pset border autocomplete > > Regards > > Pavel > > > > > 2013/11/21 Szymon Guz > >> On 21 November 2013 08:09, Pavel Stehule wrote: >> >>> Hello >>> >>> I wrote new styles for

[HACKERS] MultiXact truncation, startup et al.

2013-11-21 Thread Andres Freund
Hi, Heikki's comments about StartupMultiXact() being executed too late in http://archives.postgresql.org/message-id/528C9392.804%40vmware.com made me look at how multixact truncation works, since that's where SimpleLruTruncate() would trigger an error because of an unitialized latest_page_numb

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-11-21 Thread Merlin Moncure
On Thu, Nov 21, 2013 at 10:37 AM, Heikki Linnakangas wrote: > On 21.11.2013 17:08, Merlin Moncure wrote: >> >> On Thu, Nov 21, 2013 at 9:02 AM, Andres Freund >> wrote: >>> >>> On 2013-11-21 16:25:02 +0200, Heikki Linnakangas wrote: Hmm. All callers of RecoveryInProgress() must be prepar

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread J Smith
On Thu, Nov 21, 2013 at 10:27 AM, Andres Freund wrote: > > I don't think so - for one, pg_subtrans isn't really the problems with > that bug, for another, it won't cause missing files. Also, you're not > using replication, right? > Actually, this server is a master being replicated to a standby.

Re: [HACKERS] new unicode table border styles for psql

2013-11-21 Thread Pavel Stehule
So here is patch for 9.4 7 new line styles, 2 new border styles, \pset border autocomplete Regards Pavel 2013/11/21 Szymon Guz > On 21 November 2013 08:09, Pavel Stehule wrote: > >> Hello >> >> I wrote new styles for psql table borders. >> >> http://postgres.cz/wiki/Pretty_borders_in_psq

Re: [HACKERS] WITHIN GROUP patch

2013-11-21 Thread Andrew Gierth
> "Vik" == Vik Fearing writes: Vik> I certainly want it. I do not have a copy of the SQL standard, Vik> but I have full faith in the Andrew Gierth's claim that this is Vik> part of it. For reference, this is how I believe it matches up against the spec (I'm working from the 2008 final):

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-11-21 Thread Heikki Linnakangas
On 21.11.2013 17:08, Merlin Moncure wrote: On Thu, Nov 21, 2013 at 9:02 AM, Andres Freund wrote: On 2013-11-21 16:25:02 +0200, Heikki Linnakangas wrote: Hmm. All callers of RecoveryInProgress() must be prepared to handle the case that RecoveryInProgress() returns true, but the system is no lon

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

2013-11-21 Thread Tom Lane
David Johnston writes: > Tom Lane-2 wrote >> We could conceivably say that we'll implicitly UNNEST() if the function >> returns array, and not otherwise --- but that seems pretty inconsistent >> and surprise-making to me. > The use-cases for putting a scalar array returning function call into a

Re: [HACKERS] Logging WAL when updating hintbit

2013-11-21 Thread Sawada Masahiko
On Thu, Nov 21, 2013 at 8:59 PM, Dilip kumar wrote: > On 20 November 2013 22:12, Sawada Masahiko Wrote > >> > >> > 1. Patch applies cleanly to master HEAD. >> > 2. No Compilation Warning. >> > 3. It works as per the patch expectation. >> > >> > Some Suggestion: >> > 1. Add new WAL level ("all") in

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-11-21 Thread Merlin Moncure
On Thu, Nov 21, 2013 at 9:02 AM, Andres Freund wrote: > On 2013-11-21 16:25:02 +0200, Heikki Linnakangas wrote: >> Hmm. All callers of RecoveryInProgress() must be prepared to handle the case >> that RecoveryInProgress() returns true, but the system is no longer in >> recovery. No matter what lock

Re: [HACKERS] Status of FDW pushdowns

2013-11-21 Thread Tom Lane
Merlin Moncure writes: > On Thu, Nov 21, 2013 at 9:05 AM, Bruce Momjian wrote: >> I know join pushdowns seem insignificant, but it helps to restrict what >> data must be passed back because you would only pass back joined rows. > By 'insignificant' you mean 'necessary to do any non-trivial real

Re: [HACKERS] Status of FDW pushdowns

2013-11-21 Thread Kohei KaiGai
2013/11/21 Bruce Momjian : > Where are we on the remaining possible pushdowns for foreign data > wrappers, particularly the Postgres one? I know we do WHERE restriction > pushdowns in 9.3, but what about join and aggregate pushdowns? Is > anyone working on those? > > I know join pushdowns seem in

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Tatsuo Ishii
> Well, I happen to have some pieces of such a framework: the parts which > can automate spinning up arbitrarily complex groups of replicas and > doing failover between them. What we'd still need is: > > a) a slightly better workload than pgbench > b) a way to compare and test databases for data

Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-21 Thread Claudio Freire
On Thu, Nov 21, 2013 at 3:50 PM, David Johnston wrote: >> Why is this not implemented? Is it considered inconvenient to use, or >> difficult to implement. or not important enough, or some other reason? > > I cannot answer why but I too would like to see this. I actually asked this > a long while

Re: [HACKERS] Proof of concept: standalone backend with full FE/BE protocol

2013-11-21 Thread Tom Lane
Amit Kapila writes: > Here what I have in mind is that: > a. In pg_dump or other internal utilities where we want to use this > feature, they should call PQenableStart() or some other API before > calling PQConnect() which will indicate that it wants to operate > as a standalone mode. > b. In

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Andres Freund
On 2013-11-21 11:54:58 -0500, J Smith wrote: > On Thu, Nov 21, 2013 at 10:27 AM, Andres Freund > wrote: > > > > I don't think so - for one, pg_subtrans isn't really the problems with > > that bug, for another, it won't cause missing files. Also, you're not > > using replication, right? > > > > A

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-11-21 Thread Andres Freund
On 2013-11-21 16:25:02 +0200, Heikki Linnakangas wrote: > Hmm. All callers of RecoveryInProgress() must be prepared to handle the case > that RecoveryInProgress() returns true, but the system is no longer in > recovery. No matter what locking we do in RecoveryInProgress(), the startup > process mig

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread J Smith
On Tue, Nov 19, 2013 at 9:22 AM, Andres Freund wrote: > On 2013-11-19 15:20:01 +0100, Andres Freund wrote: >> Imo something the attached patch should be done. The description I came >> up with is: >> >> Fix Hot-Standby initialization of clog and subtrans. > G'day Andres. This wouldn't happen

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-11-21 Thread Merlin Moncure
On Thu, Nov 21, 2013 at 9:09 AM, Andres Freund wrote: > On 2013-11-21 09:08:05 -0600, Merlin Moncure wrote: >> This code is in a very hot code path. Are we *sure* that the read >> barrier is fast enough that we don't want to provide an alternate >> function that only returns the local flag? I do

Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-21 Thread David Johnston
AK wrote > 9.3 documentation says: > > According to the standard, the column-list syntax should allow a list of > columns to be assigned from a single row-valued expression, such as a > sub-select: > > UPDATE accounts SET (contact_last_name, contact_first_name) = > (SELECT last_name, first_na

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-11-21 Thread Andres Freund
On 2013-11-21 09:08:05 -0600, Merlin Moncure wrote: > This code is in a very hot code path. Are we *sure* that the read > barrier is fast enough that we don't want to provide an alternate > function that only returns the local flag? I don't know enough about > them to say either way. A read barr

Re: [HACKERS] Status of FDW pushdowns

2013-11-21 Thread Merlin Moncure
On Thu, Nov 21, 2013 at 9:05 AM, Bruce Momjian wrote: > Where are we on the remaining possible pushdowns for foreign data > wrappers, particularly the Postgres one? I know we do WHERE restriction > pushdowns in 9.3, but what about join and aggregate pushdowns? Is > anyone working on those? > > I

Re: [HACKERS] WITH ORDINALITY versus column definition lists

2013-11-21 Thread Tom Lane
Dean Rasheed writes: > On 20 November 2013 22:46, Andrew Gierth wrote: > "Tom" == Tom Lane writes: >> Tom> 1. Reinsert HEAD's prohibition against directly combining WITH >> Tom> ORDINALITY with a coldeflist (with a better error message and a >> Tom> HINT suggesting that you can get what you want

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Andres Freund
On 2013-11-21 10:25:20 -0500, J Smith wrote: > On Tue, Nov 19, 2013 at 9:22 AM, Andres Freund wrote: > > On 2013-11-19 15:20:01 +0100, Andres Freund wrote: > >> Imo something the attached patch should be done. The description I came > >> up with is: > >> > >> Fix Hot-Standby initialization of

Re: [HACKERS] Replication Node Identifiers and crashsafe Apply Progress

2013-11-21 Thread Andres Freund
On 2013-11-21 08:22:05 -0500, Robert Haas wrote: > On Thu, Nov 21, 2013 at 6:15 AM, Andres Freund wrote: > >> > WRT performance: I agree that fixed-width identifiers are more > >> > performant, that's why I went for them, but I am not sure it's that > >> > important. The performance sensitive part

[HACKERS] WIP patch for updatable security barrier views

2013-11-21 Thread Craig Ringer
Hi all I have updatable security barrier views working for INSERT and DELETE, so this might be a good chance to see whether the described approach is acceptable in reality, not just in theory. I've been surprised by how well it worked out. I actually landed up removing a lot of the existing updat

Re: [HACKERS] b21de4e7b32f868a23bdc5507898d36cbe146164 seems to be two bricks shy of a load

2013-11-21 Thread Andrew Dunstan
On 11/21/2013 05:52 AM, David Rowley wrote: I'm not quite sure why nobody else seems to be complaining, but the changes to type.h in this commit seems to have broken things little. In the visual studios build I'm getting: src\interfaces\ecpg\preproc\preproc.y(84): error C2065: 'ET_FATAL' :

Re: [HACKERS] additional json functionality

2013-11-21 Thread Josh Berkus
Maciej, Thanks for feedback -- it's helpful to get a different perspective on this. > I used to work on a project storing large quantities of schema-less data, > initially using MongoDB, then Postgres with JSON, and eventually I > implemented BSON support for Postgres to get the best of both worl

Re: [HACKERS] -d option for pg_isready is broken

2013-11-21 Thread Fujii Masao
On Thu, Nov 21, 2013 at 6:41 AM, Robert Haas wrote: > On Wed, Nov 20, 2013 at 4:55 AM, Fujii Masao wrote: >>> Not that I can see, but it's not very future-proof. If libpq changes >>> its idea of what will provoke database-name expansion, this will again >>> be broken. >> >> Yeah, I agree that we

Re: [HACKERS] gaussian distribution pgbench

2013-11-21 Thread Heikki Linnakangas
On 30.09.2013 07:12, KONDO Mitsumasa wrote: (2013/09/27 5:29), Peter Eisentraut wrote: This patch no longer applies. I will try to create this patch in next commit fest. If you have nice idea, please send me! A few thoughts on this: 1. DBT-2 uses a non-uniform distribution. You can use that

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

2013-11-21 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Anyway, after further thought I've come up with an approach > Tom> that's purely a syntactic transformation and so less likely to > Tom> cause surprise: let's say that if we have TABLE() with a single > Tom> argument, and no coldeflist

Re: [HACKERS] WIP patch for updatable security barrier views

2013-11-21 Thread Dean Rasheed
On 21 November 2013 13:15, Craig Ringer wrote: > Hi all > > I have updatable security barrier views working for INSERT and DELETE, > so this might be a good chance to see whether the described approach is > acceptable in reality, not just in theory. > > I've been surprised by how well it worked ou

Re: [HACKERS] Status of FDW pushdowns

2013-11-21 Thread Tom Lane
Kohei KaiGai writes: > Right now, it performs on relation scan or join only. However, we will be > able to apply same concept on aggregation. > For example, an aggregation node on a foreign table scan is a good > candidate to push down because it can be replaced with a custom- > logic that scans a

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread J Smith
On Thu, Nov 21, 2013 at 12:23 PM, Andres Freund wrote: > > It's still not this issue in that case, but I might have an idea... Do > you have hot_standby_feedback enabled? > Nope, hot_standby_feedback is set to its default setting which is off. At any rate, I'm going to try and capture a backtrac

[HACKERS] Status of FDW pushdowns

2013-11-21 Thread Bruce Momjian
Where are we on the remaining possible pushdowns for foreign data wrappers, particularly the Postgres one? I know we do WHERE restriction pushdowns in 9.3, but what about join and aggregate pushdowns? Is anyone working on those? I know join pushdowns seem insignificant, but it helps to restrict

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-11-21 Thread Heikki Linnakangas
On 03.10.2013 00:14, Merlin Moncure wrote: On Wed, Oct 2, 2013 at 3:43 PM, Ants Aasma wrote: On Wed, Oct 2, 2013 at 10:37 PM, Merlin Moncure wrote: On Wed, Oct 2, 2013 at 9:45 AM, Ants Aasma wrote: I haven't reviewed the code in as much detail to say if there is an actual race here, I tend

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

2013-11-21 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> Anyway, after further thought I've come up with an approach Tom> that's purely a syntactic transformation and so less likely to Tom> cause surprise: let's say that if we have TABLE() with a single Tom> argument, and no coldeflist either inside or outside,

Re: [HACKERS] WITHIN GROUP patch

2013-11-21 Thread Vik Fearing
On 11/21/2013 11:04 AM, Atri Sharma wrote: > Please find attached the latest patch for WITHIN GROUP. This patch is > after fixing the merge conflicts. I have spent quite some time on this and the previous versions. Here is my review, following the questions on the wiki. This patch is in context

Re: [HACKERS] Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1

2013-11-21 Thread Andres Freund
On 2013-11-20 17:46:22 +0100, Andres Freund wrote: > On 2013-11-20 18:25:56 +0200, Heikki Linnakangas wrote: > > Isn't it possible that the standby has already incorrectly set > > HEAP_XMIN_INVALID hint bit on a page? The full page images generated by > > VACUUM FREEZE will correct the damage, but

Re: [HACKERS] Replication Node Identifiers and crashsafe Apply Progress

2013-11-21 Thread Andres Freund
On 2013-11-20 15:05:17 -0500, Robert Haas wrote: > > That's what I had suggested to some people originally and the response > > was, well, somewhat unenthusiastic. It's not that easy to assign them in > > a meaningful automated manner. How do you automatically assign a pg > > cluster an id? > > /d

Re: [HACKERS] Replication Node Identifiers and crashsafe Apply Progress

2013-11-21 Thread Andres Freund
On 2013-11-19 14:16:04 +, Greg Stark wrote: > On Thu, Nov 14, 2013 at 5:26 PM, Andres Freund wrote: > > > But for that the receiving side needs to know up to where changes have > > been applied. One relatively easy solution for that is that the > > receiving side does something like: > > UPDAT

Re: [HACKERS] Replication Node Identifiers and crashsafe Apply Progress

2013-11-21 Thread Andres Freund
Hi, On 2013-11-19 18:49:27 -0500, Steve Singer wrote: > >But for that the receiving side needs to know up to where changes have > >been applied. One relatively easy solution for that is that the > >receiving side does something like: > >UPDATE replication_progress SET lsn = '0/1600' WHERE sou

[HACKERS] b21de4e7b32f868a23bdc5507898d36cbe146164 seems to be two bricks shy of a load

2013-11-21 Thread David Rowley
I'm not quite sure why nobody else seems to be complaining, but the changes to type.h in this commit seems to have broken things little. In the visual studios build I'm getting: src\interfaces\ecpg\preproc\preproc.y(84): error C2065: 'ET_FATAL' : undeclared identifier [D:\Postgres\b\ecpg.vcxpro

Re: [HACKERS] additional json functionality

2013-11-21 Thread Maciej Gajewski
Hi everyone I used to work on a project storing large quantities of schema-less data, initially using MongoDB, then Postgres with JSON, and eventually I implemented BSON support for Postgres to get the best of both worlds: https://github.com/maciekgajewski/postgresbson I don't think that JSONB is

Re: [HACKERS] ToDo: fast update of arrays with fixed length fields for PL/pgSQL

2013-11-21 Thread Rushabh Lathia
Hi, I started reviewing this patch. Gone through the mail thread discussion to understand the need of the patch. With patch there is significant performance improvement in case of update for the array scalar variable. - Patch gets apply cleanly on master branch - make, make install and make check

Re: [HACKERS] WITH ORDINALITY versus column definition lists

2013-11-21 Thread Dean Rasheed
On 20 November 2013 22:46, Andrew Gierth wrote: >> "Tom" == Tom Lane writes: > > Tom> 1. Reinsert HEAD's prohibition against directly combining WITH > Tom> ORDINALITY with a coldeflist (with a better error message and a > Tom> HINT suggesting that you can get what you want via the TABLE >

Re: [HACKERS] new unicode table border styles for psql

2013-11-21 Thread amul sul
>YES! +1 -- 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] new unicode table border styles for psql

2013-11-21 Thread Szymon Guz
On 21 November 2013 08:09, Pavel Stehule wrote: > Hello > > I wrote new styles for psql table borders. > > http://postgres.cz/wiki/Pretty_borders_in_psql > > This patch is simply and I am think so some styles can be interesting for > final presentation. > > Do you think so this feature is genera