Re: [HACKERS] xlog file naming

2012-08-22 Thread Peter Eisentraut
On Tue, 2012-08-21 at 12:01 -0400, Robert Haas wrote: > On Wed, Aug 15, 2012 at 8:43 PM, Bruce Momjian wrote: > > Are there any TODO items here? > > It's possible there's something we want to change here, but it's far > from obvious what that thing is. Our WAL file handling is > ridiculously har

[HACKERS] Why does analyze_new_cluster.sh use sleep?

2012-08-22 Thread Peter Eisentraut
The script analyze_new_cluster.sh output by pg_upgrade contains several "sleep" calls (see contrib/pg_upgrade/check.c). What is the point of this? If the purpose of this script is to get the database operational again as soon as possible, waiting a few seconds doing nothing surely isn't helping.

Re: [HACKERS] 9.2RC1 wraps this Thursday ...

2012-08-22 Thread Amit Kapila
From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Thursday, August 23, 2012 10:10 AM I wrote: >> ... I really can't take responsibility for any of this since >> I don't have a Windows development environment. One of the Windows- >> hacking committers needs to pick this issue up. Anyone? > [ cric

[HACKERS] [v9.3] writable foreign tables

2012-08-22 Thread Kohei KaiGai
Hello, The attached patch is just a proof-of-concept of writable foreign table feature; thus, I don't expect it getting merged at the upcoming commit fest. The purpose of this patch is to find out the best way to support "write stuff" in FDW. Basic idea of this patch is to utilize "ctid" field to

Re: [HACKERS] Clean up of postgresql_fdw.c

2012-08-22 Thread Michael Paquier
Sorry, this was not dedicated to this mailing list. My apologies. -- Michael Paquier http://michael.otacoo.com

[HACKERS] Clean up of postgresql_fdw.c

2012-08-22 Thread Michael Paquier
Hi all, I am looking at postgresql_fdw.c and I am cleaning up the functions inside it. Please find attached a patch that removes is_immutable_func as it does exactly the same thing as func_volatile in lsyscache.c. There is still one function remaining in postgresql_fdw.c called pgxc_is_expr_shippa

Re: [HACKERS] temporal support patch

2012-08-22 Thread Jeff Davis
On Tue, 2012-08-21 at 17:07 -0500, Kevin Grittner wrote: > The fact that it has an unknown sequence number or timestamp for > purposes of ordering visibility of transactions doesn't mean you > can't show that it completed in an audit log. In other words, I > think the needs for a temporal database

Re: [HACKERS] 9.2RC1 wraps this Thursday ...

2012-08-22 Thread Craig Ringer
On 08/23/2012 12:40 PM, Tom Lane wrote: I wrote: ... I really can't take responsibility for any of this since I don't have a Windows development environment. One of the Windows- hacking committers needs to pick this issue up. Anyone? [ crickets ] I guess everybody who might take an interest

Re: [HACKERS] 9.2RC1 wraps this Thursday ...

2012-08-22 Thread Tom Lane
I wrote: > ... I really can't take responsibility for any of this since > I don't have a Windows development environment. One of the Windows- > hacking committers needs to pick this issue up. Anyone? [ crickets ] I guess everybody who might take an interest in this is out sailing... After furt

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-22 Thread Jeff Davis
On Tue, 2012-08-21 at 17:56 -0500, Kevin Grittner wrote: > I don't think the concerns I raised about apparent order of > execution for serializable transactions apply to audit logs. If > we've moved entirely off the topic of the original subject, it is a > complete non-issue. Now I'm confused. Th

Re: [HACKERS] A caveat of partitioning tables in the document

2012-08-22 Thread Tom Lane
Fujii Masao writes: > On Wed, Aug 22, 2012 at 12:59 AM, Kasahara Tatsuhito > wrote: >> The latest document (doc/src/sgml/ddl.sgml) says >> === >> 2974 >> 2975 >> 2976 >> 2977 Constraint exclusion only works when the query's WHERE >> 2978

Re: [HACKERS] Unexpected plperl difference between 8.4 and 9.1

2012-08-22 Thread Tom Lane
Andrew Dunstan writes: > On 08/22/2012 11:08 PM, Tom Lane wrote: >> Curiously, I do *not* see the bug on my Fedora 16 machine, running >> perl-5.14.2-198.fc16.x86_64 > Possibly we need to look at the output of perl -V to see if there's a > difference. Mine sez Summary of my perl5 (revision 5 v

Re: [HACKERS] Unexpected plperl difference between 8.4 and 9.1

2012-08-22 Thread Andrew Dunstan
On 08/22/2012 11:08 PM, Tom Lane wrote: Alex Hunsaker writes: I can reproduce the failure with 5.14.2 Me too, however it works for me with 5.14.1, looking more like a strange perl bug. Curiously, I do *not* see the bug on my Fedora 16 machine, running perl-5.14.2-198.fc16.x86_64 I wondered

Re: [HACKERS] Unexpected plperl difference between 8.4 and 9.1

2012-08-22 Thread Tom Lane
Alex Hunsaker writes: >> I can reproduce the failure with 5.14.2 > Me too, however it works for me with 5.14.1, looking more like a strange > perl bug. Curiously, I do *not* see the bug on my Fedora 16 machine, running perl-5.14.2-198.fc16.x86_64 I wondered if Fedora is carrying a patch that fi

Re: [HACKERS] Unexpected plperl difference between 8.4 and 9.1

2012-08-22 Thread Alex Hunsaker
On Mon, Aug 20, 2012 at 10:14 AM, Alvaro Herrera wrote: > Excerpts from Alex Hunsaker's message of lun ago 20 12:03:11 -0400 2012: > > On Sun, Aug 19, 2012 at 2:26 PM, Joel Jacobson wrote: > > > > > After upgrading from 8.4 to 9.1, one of my plperl functions stopped > > > working properly. > > I

Re: [HACKERS] Is this an appropriate item?

2012-08-22 Thread Tatsuo Ishii
> On Wed, Aug 22, 2012 at 9:32 PM, Tatsuo Ishii wrote: >> Hi, >> >> I found following item in the Developer FAQ. >> I don't see why this is related to developers. >> >> Why aren't there more compression options w

Re: [HACKERS] Is this an appropriate item?

2012-08-22 Thread Jaime Casanova
On Wed, Aug 22, 2012 at 9:32 PM, Tatsuo Ishii wrote: > Hi, > > I found following item in the Developer FAQ. > I don't see why this is related to developers. > > Why aren't there more compression options when dump

[HACKERS] Is this an appropriate item?

2012-08-22 Thread Tatsuo Ishii
Hi, I found following item in the Developer FAQ. I don't see why this is related to developers. Why aren't there more compression options when dumping tables? pg_dump's built-in compression method is gzip. The p

Re: [HACKERS] larger shared buffers slows down cluster

2012-08-22 Thread Andrew Dunstan
On 08/22/2012 05:19 PM, Jeff Janes wrote: Shared Buffers Time 48Gb 2058ms 8Gb372ms 1gb 67ms Is this expected behaviour? Yeah. Clustering the table means that all the indexes and the old version of the table all get dropped, a

Re: [HACKERS] [PATCH] Docs: Make notes on sequences and rollback more obvious

2012-08-22 Thread Craig Ringer
On 08/21/2012 11:18 PM, Robert Haas wrote: On Mon, Aug 20, 2012 at 4:45 AM, Craig Ringer wrote: Trying again with the attachments; the archiver only seemed to see the first patch despite all three being attached. Including patches inline; if you want 'em prettier, see: https://github.com/ri

Re: [HACKERS] 64-bit API for large object

2012-08-22 Thread Tatsuo Ishii
> On Wed, 2012-08-22 at 01:14 -0400, Tom Lane wrote: >> Peter Eisentraut writes: >> > On Wed, 2012-08-22 at 07:27 +0900, Tatsuo Ishii wrote: >> >> I found this in the TODO list: >> >> Add API for 64-bit large object access >> >> If this is a still valid TODO item and nobody is working on this, I

Re: [HACKERS] larger shared buffers slows down cluster

2012-08-22 Thread Andrew Dunstan
On 08/22/2012 05:19 PM, Jeff Janes wrote: On Wed, Aug 22, 2012 at 1:48 PM, Andrew Dunstan wrote: This problem has been reported by a client. Consider the following very small table test case: create table bar as select a,b,c,d,e from generate_series(1,2) a, generate_series(3,4) b, ge

Re: [HACKERS] larger shared buffers slows down cluster

2012-08-22 Thread Jeff Janes
On Wed, Aug 22, 2012 at 1:48 PM, Andrew Dunstan wrote: > > This problem has been reported by a client. > > Consider the following very small table test case: > >create table bar as select a,b,c,d,e from generate_series(1,2) a, >generate_series(3,4) b, generate_series( 5,6) c, >generate

Re: [HACKERS] larger shared buffers slows down cluster

2012-08-22 Thread Tom Lane
Andrew Dunstan writes: > Now running: > cluster bar using bar_abcde; > appears to be very sensitive to the shared buffers setting. In an amazon > very large memory instance (64GB) and PostgreSQL 9.1.4, I observed the > following timings: > Shared Buffers Time >48Gb

[HACKERS] larger shared buffers slows down cluster

2012-08-22 Thread Andrew Dunstan
This problem has been reported by a client. Consider the following very small table test case: create table bar as select a,b,c,d,e from generate_series(1,2) a, generate_series(3,4) b, generate_series( 5,6) c, generate_series(7,8) d, generate_series(9,10) e; create index bar_a on ba

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-22 Thread Josh Berkus
> I don't think the concerns I raised about apparent order of > execution for serializable transactions apply to audit logs. If > we've moved entirely off the topic of the original subject, it is a > complete non-issue. That's true, your discusison is about Miroslav's original patch. But a lot

Re: [HACKERS] Isn't remote_write a really dumb name for that setting?

2012-08-22 Thread Tom Lane
Bruce Momjian writes: > On Wed, Aug 22, 2012 at 01:01:04PM -0400, Tom Lane wrote: >> AFAICT, the remote_write setting for synchronous_commit is named exactly >> backwards, because the point of the setting is that it *doesn't* wait >> for the remote to write anything. >> >> As an alternative I sug

Re: [HACKERS] Isn't remote_write a really dumb name for that setting?

2012-08-22 Thread Bruce Momjian
On Wed, Aug 22, 2012 at 01:01:04PM -0400, Tom Lane wrote: > AFAICT, the remote_write setting for synchronous_commit is named exactly > backwards, because the point of the setting is that it *doesn't* wait > for the remote to write anything. > > As an alternative I suggest "remote_receive". Perhap

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-22 Thread Jeff Davis
On Tue, 2012-08-21 at 10:41 -0400, Robert Haas wrote: > The thing to keep in mind here is that EVERY property of a foreign > table is subject to change at any arbitrary point in time, without our > knowledge. ... Why should CHECK constraints be any different than, > say, column types? So, let's

[HACKERS] Isn't remote_write a really dumb name for that setting?

2012-08-22 Thread Tom Lane
AFAICT, the remote_write setting for synchronous_commit is named exactly backwards, because the point of the setting is that it *doesn't* wait for the remote to write anything. As an alternative I suggest "remote_receive". Perhaps somebody else has a better idea? regards,

Re: [HACKERS] restartpoints stop generating on streaming replication slave

2012-08-22 Thread Mathieu Fenniak
Hi Fujii, Thanks for the quick reply. We tried setting the log_min_messages using set_config() to debug2, but this doesn't seem to take affect on the bgwriter process; if we changed this in postgresql.conf, we'd have to run with the verbose logging for days or weeks before the restartpoints stop.

Re: [HACKERS] Avoiding shutdown checkpoint at failover

2012-08-22 Thread Fujii Masao
On Fri, Aug 17, 2012 at 8:38 AM, Bruce Momjian wrote: > On Thu, Mar 8, 2012 at 08:20:02AM -0500, Robert Haas wrote: >> On Sat, Jan 28, 2012 at 8:57 AM, Simon Riggs wrote: >> > On Thu, Jan 26, 2012 at 5:27 AM, Fujii Masao wrote: >> > >> >> One thing I would like to ask is that why you think walr

Re: [HACKERS] A caveat of partitioning tables in the document

2012-08-22 Thread Fujii Masao
On Wed, Aug 22, 2012 at 12:59 AM, Kasahara Tatsuhito wrote: > Hi. > > The latest document (doc/src/sgml/ddl.sgml) says > === > 2974 > 2975 > 2976 > 2977 Constraint exclusion only works when the query's WHERE > 2978 clause contains cons

Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-22 Thread Jan Urbański
On 22/08/12 13:28, Sachin Srivastava wrote: Yes, It worked for me also.. So will this be a workaround? Or do we intend to use something like Py_SetPythonHome() before calling Py_Initialize()/ I think the best we can do is to document that for some installations you might need to set PYTHONHOME

Re: [HACKERS] [WIP] Performance Improvement by reducing WAL for Update Operation

2012-08-22 Thread Amit Kapila
From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Amit Kapila Sent: Wednesday, August 22, 2012 8:34 AM From: Jesper Krogh [mailto:jes...@krogh.cc] Sent: Wednesday, August 22, 2012 1:13 AM On 21/08/12 16:57, Amit kapila wrote: >>Test results: >>>1

Re: [HACKERS] multi-master pgbench?

2012-08-22 Thread David Fetter
On Wed, Aug 22, 2012 at 10:13:43AM +0900, Tatsuo Ishii wrote: > >> What does "propagation of the writes" mean? > > > > I apologize for not being clear. In a multi-master system, people > > frequently wish to know how quickly a write operation has been > > duplicated to the other nodes. In some s

Re: [HACKERS] restartpoints stop generating on streaming replication slave

2012-08-22 Thread Fujii Masao
On Wed, Aug 22, 2012 at 5:52 AM, Mathieu Fenniak wrote: > Hi all, > > I've been investigating an issue with our PostgreSQL 9.1.1 (Linux x86-64 > CentOS 5.8) database where restartpoints suddenly stop being generated on > the slave after working correctly for a week or two. The symptom of the > pr

Re: [HACKERS] Expressions without type

2012-08-22 Thread Tom Lane
Ashutosh Bapat writes: > I need to check type of expressions appearing in a Query tree and I am > using exprType() for that. But for certain expressions their type is not > defined like List, FromExpr, JoinExpr. Such expressions are acceptable in > the code, but expressions which have a type need

Re: [HACKERS] 9.2RC1 wraps this Thursday ...

2012-08-22 Thread Tom Lane
Amit kapila writes: >> Can't we test the same condition that postgres.exe itself would test? >To implement the postgre.exe way we have following options: >1. Duplicate the function pgwin32_is_admin and related function to pg_ctl, > as currently it is not exposed. >2. Make that v

Re: [HACKERS] 9.2RC1 wraps this Thursday ...

2012-08-22 Thread Amit kapila
From: Tom Lane [t...@sss.pgh.pa.us] Sent: Tuesday, August 21, 2012 10:31 PM Amit Kapila writes: > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tom Lane >> * pg_ctl crashes on Win32 when neither PGDATA nor -D specified >>> isn't there a way to actually test if we're in a restricted p

[HACKERS] Expressions without type

2012-08-22 Thread Ashutosh Bapat
Hi All, I need to check type of expressions appearing in a Query tree and I am using exprType() for that. But for certain expressions their type is not defined like List, FromExpr, JoinExpr. Such expressions are acceptable in the code, but expressions which have a type need to obey certain criteria

Re: [HACKERS] 64-bit API for large object

2012-08-22 Thread Peter Eisentraut
On Wed, 2012-08-22 at 01:14 -0400, Tom Lane wrote: > Peter Eisentraut writes: > > On Wed, 2012-08-22 at 07:27 +0900, Tatsuo Ishii wrote: > >> I found this in the TODO list: > >> Add API for 64-bit large object access > >> If this is a still valid TODO item and nobody is working on this, I > >> wo

Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-22 Thread Sachin Srivastava
Yes, It worked for me also.. So will this be a workaround? Or do we intend to use something like Py_SetPythonHome() before calling Py_Initialize()/ On Wed, Aug 22, 2012 at 3:32 PM, Jan Urbański wrote: > On 21/08/12 20:13, Josh Berkus wrote: > >> >> No. I get the same backtrace when I try agains

Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-22 Thread Jan Urbański
On 21/08/12 20:13, Josh Berkus wrote: No. I get the same backtrace when I try against the 9.1.5 (REL9_1_STABLE) branch. I have reproduced this on Linux, seems like the fix is to to run the postmaster with this env variable exported: PYTHONHOME=/opt/ActivePython-3.2/ (or wherever you insta

Re: [HACKERS] PATCH: psql boolean display

2012-08-22 Thread Pavel Stehule
2012/8/21 Tom Lane : > "Kevin Grittner" writes: >> The type itself does output true/false; it's just psql that uses >> t/f. > > No, 't'/'f' is what boolout() returns. The 'true'/'false' results from > casting bool to text are intentionally different --- IIRC, Peter E. > argued successfully that t

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-22 Thread Pavel Stehule
2012/8/22 Vlad Arkhipov : > On 08/22/2012 08:34 AM, Gavin Flower wrote: > > About 10 years ago, I implemented some temporal features in a database to > cope with insurance quotes that had to be valid for a specified number of > days in the future that was invariant with respect to future changes in

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-22 Thread Vlad Arkhipov
On 08/22/2012 08:34 AM, Gavin Flower wrote: About 10 years ago, I implemented some temporal features in a database to cope with insurance quotes that had to be valid for a specified number of days in the future that was invariant with respect to future changes in premiums with effective dates w