Re: [HACKERS] Suggestion: Issue warning when calling SET TRANSACTION outside transaction block

2013-09-11 Thread Amit Kapila
On Wed, Sep 11, 2013 at 4:19 AM, Bruce Momjian wrote: > On Sun, Feb 3, 2013 at 07:19:14AM +, Amit kapila wrote: >> >> On Saturday, February 02, 2013 9:08 PM Robert Haas wrote: >> On Fri, Feb 1, 2013 at 12:04 AM, Amit Kapila wrote: >> >> I think user should be aware of effect before using SET

Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

2013-09-11 Thread Noah Misch
On Wed, Sep 11, 2013 at 07:57:22PM -0700, David Johnston wrote: > Noah Misch-2 wrote > > Making PGSharedMemoryCreate() pickier in all branches will greatly > > diminish > > the marginal value of preserving postmaster.pid, so I'm fine with dropping > > the > > postmaster.pid side of the proposal. >

Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

2013-09-11 Thread David Johnston
Noah Misch-2 wrote >> > I'm thinking to preserve postmaster.pid at immediate shutdown in all >> released >> > versions, but I'm less sure about back-patching a change to make >> > PGSharedMemoryCreate() pickier. On the one hand, allowing startup to >> proceed >> > with backends still active in the

Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

2013-09-11 Thread Noah Misch
On Wed, Sep 11, 2013 at 11:32:01AM -0400, Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: > > The concrete situation in which I encountered this involved PostgreSQL 9.2 > > and > > an immediate shutdown with a backend that had blocked SIGQUIT. The backend > > survived the immediate

Re: [HACKERS] 9.4 HEAD: select() failed in postmaster

2013-09-11 Thread Alvaro Herrera
Noah Misch escribió: > On Tue, Sep 10, 2013 at 05:18:21PM -0700, Jeff Janes wrote: > > I think the problem is here, where there should be a Max rather than a Min: > > > > commit 82233ce7ea42d6ba519aaec63008aff49da6c7af > > Author: Alvaro Herrera > > Date: Fri Jun 28 17:20:53 2013 -0400 > > >

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-11 Thread Peter Geoghegan
On Wed, Sep 11, 2013 at 2:28 PM, Andres Freund wrote: > Nice to see the next version, won't have time to look in any details in > the next few days tho. Thanks Andres! > I think for this approach to be workable you also need to explain how we > can deal with stuff like toast insertion that may n

Re: [HACKERS] Pending query cancel defeats SIGQUIT

2013-09-11 Thread Noah Misch
On Wed, Sep 11, 2013 at 02:00:41PM -0400, Robert Haas wrote: > On Wed, Sep 11, 2013 at 10:38 AM, Stephen Frost wrote: > > * Noah Misch (n...@leadboat.com) wrote: > >> On Tue, Sep 10, 2013 at 07:13:16PM -0700, David Johnston wrote: > >> > Your feelings on how far to back-patch? > >> > >> All suppor

Re: [HACKERS] 9.4 HEAD: select() failed in postmaster

2013-09-11 Thread Noah Misch
On Tue, Sep 10, 2013 at 05:18:21PM -0700, Jeff Janes wrote: > I've been getting some failures after an immediate shutdown or crash, > during severe IO stress, with the message: > > LOG: XX000: select() failed in postmaster: Invalid argument > LOCATION: ServerLoop, postmaster.c:1560 > > It is tr

Re: [HACKERS] Protocol forced to V2 in low-memory conditions?

2013-09-11 Thread David Fetter
On Tue, Sep 10, 2013 at 03:55:30PM +0200, Magnus Hagander wrote: > On Tue, Sep 10, 2013 at 3:53 PM, Tom Lane wrote: > > Andres Freund writes: > >> On 2013-09-10 12:31:22 +0200, Magnus Hagander wrote: > >>> On Tue, Sep 10, 2013 at 5:29 AM, Tom Lane wrote: > I've been thinking of late that it

[HACKERS] citext tests "with and without index" had no index

2013-09-11 Thread Kevin Grittner
I added the CREATE INDEX statement in the below citext regression tests, since it seemed to have been omitted by accident: -- Test aggregate functions and sort ordering CREATE TEMP TABLE srt (    name CITEXT ); INSERT INTO srt (name) VALUES ('aardvark'),    ('AAA'),    ('aba'),    ('

Re: [HACKERS] Valgrind Memcheck support

2013-09-11 Thread Andres Freund
On 2013-09-06 21:55:09 +0100, Greg Stark wrote: > On Sun, Jun 9, 2013 at 10:25 PM, Noah Misch wrote: > > > - Test recovery, such as by running a streaming replica under Memcheck > > while > > the primary runs "make installcheck-world". > > > > In general we need a lot more testing on the recov

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-11 Thread Andres Freund
Hi Peter, Nice to see the next version, won't have time to look in any details in the next few days tho. On 2013-09-10 22:25:34 -0700, Peter Geoghegan wrote: > I am working on an analysis of the broader deadlock hazards - the > implications of simultaneously holding multiple shared buffer locks >

Re: [HACKERS] proposal: Set effective_cache_size to greater of .conf value, shared_buffers

2013-09-11 Thread Josh Berkus
> I think that most of the arguments in this thread drastically > overestimate the precision and the effect of effective_cache_size. The > planner logic behind it basically only uses it to calculate things > within a single index scan. That alone shows that any precise > calculation cannot be very

Re: [HACKERS] Protocol forced to V2 in low-memory conditions?

2013-09-11 Thread Andrew Dunstan
On 09/11/2013 02:30 PM, Robert Haas wrote: On Tue, Sep 10, 2013 at 9:53 AM, Tom Lane wrote: Andres Freund writes: On 2013-09-10 12:31:22 +0200, Magnus Hagander wrote: On Tue, Sep 10, 2013 at 5:29 AM, Tom Lane wrote: I've been thinking of late that it might be time to retire libpq's suppor

Re: [HACKERS] Protocol forced to V2 in low-memory conditions?

2013-09-11 Thread Robert Haas
On Tue, Sep 10, 2013 at 9:53 AM, Tom Lane wrote: > Andres Freund writes: >> On 2013-09-10 12:31:22 +0200, Magnus Hagander wrote: >>> On Tue, Sep 10, 2013 at 5:29 AM, Tom Lane wrote: I've been thinking of late that it might be time to retire libpq's support for V2 protocol (other than i

Re: [HACKERS] proposal: Set effective_cache_size to greater of .conf value, shared_buffers

2013-09-11 Thread Andres Freund
On 2013-09-11 12:53:29 -0400, Bruce Momjian wrote: > On Wed, Sep 11, 2013 at 12:43:07PM -0300, Alvaro Herrera wrote: > > Bruce Momjian escribió: > > > > > > So, are you saying you like 4x now? > > > > > > Here is an arugment for 3x. First, using the documented 25% of RAM, 3x > > > puts our effec

Re: [HACKERS] proposal: Set effective_cache_size to greater of .conf value, shared_buffers

2013-09-11 Thread Claudio Freire
On Wed, Sep 11, 2013 at 12:27 PM, Bruce Momjian wrote: >> > Another argument in favor: this is a default setting, and by default, >> > shared_buffers won't be 25% of RAM. >> >> So, are you saying you like 4x now? > > Here is an arugment for 3x. First, using the documented 25% of RAM, 3x > puts ou

Re: [HACKERS] proposal: Set effective_cache_size to greater of .conf value, shared_buffers

2013-09-11 Thread Josh Berkus
On 09/11/2013 08:27 AM, Bruce Momjian wrote: > On Wed, Sep 11, 2013 at 09:18:30AM -0400, Bruce Momjian wrote: >> On Tue, Sep 10, 2013 at 03:08:24PM -0700, Josh Berkus wrote: >>> Another argument in favor: this is a default setting, and by default, >>> shared_buffers won't be 25% of RAM. >> >> So, a

Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

2013-09-11 Thread Robert Haas
On Tue, Sep 10, 2013 at 11:33 PM, Noah Misch wrote: > I'm thinking to preserve postmaster.pid at immediate shutdown in all released > versions, but I'm less sure about back-patching a change to make > PGSharedMemoryCreate() pickier. On the one hand, allowing startup to proceed > with backends sti

Re: [HACKERS] Pending query cancel defeats SIGQUIT

2013-09-11 Thread Robert Haas
On Wed, Sep 11, 2013 at 10:38 AM, Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: >> On Tue, Sep 10, 2013 at 07:13:16PM -0700, David Johnston wrote: >> > Your feelings on how far to back-patch? >> >> All supported versions. The current behavior is a bug every way I look at >> it.

Re: [HACKERS] proposal: Set effective_cache_size to greater of .conf value, shared_buffers

2013-09-11 Thread Bruce Momjian
On Wed, Sep 11, 2013 at 12:43:07PM -0300, Alvaro Herrera wrote: > Bruce Momjian escribió: > > > > So, are you saying you like 4x now? > > > > Here is an arugment for 3x. First, using the documented 25% of RAM, 3x > > puts our effective_cache_size as 75% of RAM, giving us no room for > > kernel,

Re: [HACKERS] proposal: Set effective_cache_size to greater of .conf value, shared_buffers

2013-09-11 Thread Alvaro Herrera
Bruce Momjian escribió: > > So, are you saying you like 4x now? > > Here is an arugment for 3x. First, using the documented 25% of RAM, 3x > puts our effective_cache_size as 75% of RAM, giving us no room for > kernel, backend memory, and work_mem usage. If anything it should be > lower than 3x,

Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

2013-09-11 Thread Stephen Frost
* Noah Misch (n...@leadboat.com) wrote: > Shouldn't it instead check the same things as PGSharedMemoryIsInUse()? Offhand, I tend to agree that we should really be doing a very careful job of looking at if an existing segment is still in use. > The concrete situation in which I encountered this in

[HACKERS] Improve setup for documentation building with FOP

2013-09-11 Thread Peter Eisentraut
In order to modernize our documentation tool chain, I have made a few tweaks to allow using FOP to build the PDF documentation. I'd like to get some testing on different operating systems and versions thereof in order to learn whether this solution is robust and easily accessible by users and deve

Re: [HACKERS] proposal: Set effective_cache_size to greater of .conf value, shared_buffers

2013-09-11 Thread Bruce Momjian
On Wed, Sep 11, 2013 at 09:18:30AM -0400, Bruce Momjian wrote: > On Tue, Sep 10, 2013 at 03:08:24PM -0700, Josh Berkus wrote: > > Merlin, > > > > > I vote 4x on the basis that for this setting (unlike almost all the > > > other memory settings) the ramifications for setting it too high > > > gener

Re: [HACKERS] Pending query cancel defeats SIGQUIT

2013-09-11 Thread Stephen Frost
* Noah Misch (n...@leadboat.com) wrote: > On Tue, Sep 10, 2013 at 07:13:16PM -0700, David Johnston wrote: > > Your feelings on how far to back-patch? > > All supported versions. The current behavior is a bug every way I look at it. Agreed. I noticed a stale backend hanging around after a cancel

Re: [HACKERS] Triggers on foreign tables

2013-09-11 Thread Ronan Dunklau
On Wednesday 11 September 2013 06:27:24 Michael Paquier wrote: > As your patch is targeting the implementation of a new feature, please > consider adding this patch to the next commit fest that is going to > begin in a couple of days: > https://commitfest.postgresql.org/action/commitfest_view?id=19

[HACKERS] review: pgbench progress report improvements

2013-09-11 Thread Pavel Stehule
Hello * patched with minor warning * compilable cleanly * zero impact on PostgreSQL server functionality * it does what was in proposal ** change 5sec progress as default (instead no progress) ** finalise a rate limit support - fixes a latency calculation * code is clean * documentation is includ

Re: [HACKERS] Triggers on foreign tables

2013-09-11 Thread Michael Paquier
On Tue, Sep 10, 2013 at 5:08 AM, Ronan Dunklau wrote: > Hello. > > I wanted to know what it would take to implement triggers on foreign tables. > It seems that statement-level triggers can work provided they are allowed in > the code. > > Please find attached a simple POC patch that implement just

Re: [HACKERS] proposal: Set effective_cache_size to greater of .conf value, shared_buffers

2013-09-11 Thread Bruce Momjian
On Tue, Sep 10, 2013 at 03:08:24PM -0700, Josh Berkus wrote: > Merlin, > > > I vote 4x on the basis that for this setting (unlike almost all the > > other memory settings) the ramifications for setting it too high > > generally aren't too bad. Also, the o/s and temporary memory usage as > > a sha

Re: [HACKERS] Compression of full-page-writes

2013-09-11 Thread Andres Freund
On 2013-09-11 19:39:14 +0900, Fujii Masao wrote: > * Benchmark > pgbench -c 32 -j 4 -T 900 -M prepared > scaling factor: 100 > > checkpoint_segments = 1024 > checkpoint_timeout = 5min > (every checkpoint during benchmark were triggered by checkpoint_timeout) > > * Result > [tps] > 1

Re: [HACKERS] Compression of full-page-writes

2013-09-11 Thread Fujii Masao
On Fri, Aug 30, 2013 at 11:55 AM, Fujii Masao wrote: > Hi, > > Attached patch adds new GUC parameter 'compress_backup_block'. > When this parameter is enabled, the server just compresses FPW > (full-page-writes) in WAL by using pglz_compress() before inserting it > to the WAL buffers. Then, the co

Re: [HACKERS] [GENERAL] problem in installation of postgresql-jdbc

2013-09-11 Thread Vivek Singh Raghuwanshi
java version "1.6.0_33" is already installed but after firing yum install postgresql-jdbc java-1.6.0-openjdk is also going to installed as dependencies. On Wed, Sep 11, 2013 at 1:53 PM, Albe Laurenz wrote: > Vivek Singh Raghuwanshi wrote: > > I am trying to install postgresql-jdbc but facing jav

Re: [HACKERS] [GENERAL] problem in installation of postgresql-jdbc

2013-09-11 Thread Albe Laurenz
Vivek Singh Raghuwanshi wrote: > I am trying to install postgresql-jdbc but facing java error. It would be helpful to know which error you are facing. Yours, Laurenz Albe -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postg

[HACKERS] problem in installation of postgresql-jdbc

2013-09-11 Thread Vivek Singh Raghuwanshi
Hi All, I am trying to install postgresql-jdbc but facing java error. sun java is already installed but postgresql-jdbc installing openjdj. please let me know how to resolve this and if you require any other details. [root@172-24-1-54 ~]# java -version java version "1.6.0_33" Java(TM) SE Runtime