Re: [HACKERS] Welcome 2012 GSOC students

2012-04-24 Thread Qi Huang
Thanks for the hackers' support. The discussion on the mailing is quite encouraging. Expecting to enjoy the 3 months' fun with Postgres. I'm still under the final period of my university, will participate more after the exams finish. Thanks! Sent from my Windows Phone __

Re: [HACKERS] remove dead ports?

2012-04-24 Thread Tom Lane
Robert Haas writes: > I have no position on whether those operating systems are dead enough > to warrant removing support, but on a related point, I would like it > if we could get rid of as many spinlock implementations as are > applicable only to platforms that are effectively defunct. I'm > su

[HACKERS] Temporary tables under hot standby

2012-04-24 Thread Noah Misch
A key barrier to migrations from trigger-based replication to WAL-based replication is the lack of temporary tables under hot standby. I'd like to close that gap; the changes needed will also reduce the master-side cost of temporary table usage. Here is a high-level design for your advice and com

Re: [HACKERS] 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-24 Thread Josh Berkus
On 4/21/12 2:40 PM, Jeff Davis wrote: > If we do use WAL for hint bit updates, that has an impact on Hot > Standby, because HS can't write WAL. So, it would seem that HS could not > set hint bits. If we're WAL-logging hint bits, then the standby would be receiving them, so it doesn't *need* to wri

Re: [HACKERS] remove dead ports?

2012-04-24 Thread Greg Stark
On Tue, Apr 24, 2012 at 9:49 PM, Robert Haas wrote: >  I'm > suspicious of s_lock.h's support for National Semiconductor 32K, > Renesas' M32R, Renesas' SuperH, UNIVEL, SINIX / Reliant UNIX, > Nextstep, and Sun3 Were there ever multiprocessor Nextstep or Sun3 machines anyways? Wouldn't someone on

Re: [HACKERS] 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-24 Thread Greg Stark
On Tue, Apr 24, 2012 at 9:40 PM, Robert Haas wrote: >  For three things, index pages > have hint-type changes that are not single-bit changes. ? Just how big are these? Part of the reason hint bit updates are safe is because one bit definitely absolutely has to be entirely in one page. You can't

Re: [HACKERS] Timsort performance, quicksort (was: Re: Memory usage during sorting)

2012-04-24 Thread Robert Haas
On Tue, Apr 24, 2012 at 7:16 PM, Peter Geoghegan wrote: >>> That makes sense to me, but obviously more data is needed here. >> >> What more data do you think is needed?  I've been suspicious of that >> code since the first time I looked at it, and I'm now fairly well >> convinced that it's full of

Re: [HACKERS] Timsort performance, quicksort (was: Re: Memory usage during sorting)

2012-04-24 Thread Robert Haas
On Tue, Apr 24, 2012 at 12:51 PM, Peter Geoghegan wrote: > On 24 April 2012 16:17, Robert Haas wrote: >> If they are in sorted order with an empty string >> appended onto the end, it takes about 25 seconds. > > That's exactly what I'd have expected, but was surprised to have not > found with my o

Re: [HACKERS] Timsort performance, quicksort (was: Re: Memory usage during sorting)

2012-04-24 Thread Robert Haas
On Tue, Apr 24, 2012 at 12:30 PM, Greg Stark wrote: > On Tue, Apr 24, 2012 at 4:17 PM, Robert Haas wrote: >> Based on that, I'm inclined to propose rejiggering things so that the >> presorted-input check runs only at the top level, and not during any >> recursive steps. > > Just a thought. What a

Re: [HACKERS] New sync commit mode remote_write

2012-04-24 Thread Robert Haas
On Tue, Apr 24, 2012 at 12:21 PM, Jeff Janes wrote: > On Thu, Apr 19, 2012 at 11:50 AM, Robert Haas wrote: >> On 4/19/12, Jeff Janes wrote: >>> The work around would be for the master to refuse to automatically >>> restart after a crash, insisting on a fail-over instead (or a manual >>> forcing

Re: [HACKERS] remove dead ports?

2012-04-24 Thread Robert Haas
On Tue, Apr 24, 2012 at 2:29 PM, Peter Eisentraut wrote: > I propose that we remove support for the following OS ports from our > source tree.  They are totally dead, definitely don't work, and/or > probably no one remembers what they even were.  The code just bit rots > and is in the way of futur

Re: [HACKERS] 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-24 Thread Robert Haas
On Sat, Apr 21, 2012 at 7:08 PM, Greg Stark wrote: > The earlier consensus was to move all the hint bits to a dedicated > area and exclude them from the checksum. I think double-write buffers > seem to have become more fashionable but a summary that doesn't > describe the former is definitely inco

Re: [HACKERS] 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-24 Thread Robert Haas
On Sat, Apr 21, 2012 at 5:40 PM, Jeff Davis wrote: > * In addition to detecting random garbage, we also need to be able to > detect zeroing of pages. Right now, a zero page is not considered > corrupt, so that's a problem. We'll need to WAL table extension > operations, and we'll need to mitigate

Re: [HACKERS] remove dead ports?

2012-04-24 Thread Stefan Kaltenbrunner
On 04/24/2012 08:29 PM, Peter Eisentraut wrote: > I propose that we remove support for the following OS ports from our > source tree. They are totally dead, definitely don't work, and/or > probably no one remembers what they even were. The code just bit rots > and is in the way of future improvem

[HACKERS] remove dead ports?

2012-04-24 Thread Peter Eisentraut
I propose that we remove support for the following OS ports from our source tree. They are totally dead, definitely don't work, and/or probably no one remembers what they even were. The code just bit rots and is in the way of future improvements. * Dead/remove: dgux nextstep sunos4 svr4 ultrix4

Re: [HACKERS] Welcome 2012 GSOC students

2012-04-24 Thread Atri Sharma
On Tue, Apr 24, 2012 at 10:36 PM, Josh Berkus wrote: > Hackers, > > We've chosen the 5 GSOC projects for this year: > > * JDBC Foreign Data Wrapper, by Atri, mentored by Merlin Moncure > * Document Collection Foreign Data Wrapper, by Zheng Yang (a returning > student), mentored by Satoshi Nagayasu

Re: [HACKERS] [BUG] Checkpointer on hot standby runs without looking checkpoint_segments

2012-04-24 Thread Fujii Masao
On Tue, Apr 24, 2012 at 3:47 PM, Kyotaro HORIGUCHI wrote: > Hello, > >> >  - xlog.c: Make StandbyMode shared. >> > >> >  - checkpointer.c: Use IsStandbyMode() to check if postmaster is >> >   under standby mode. >> >> IsStandbyMode() looks overkill to me. The standby mode flag is forcibly >> turne

Re: [HACKERS] [BUG] Checkpointer on hot standby runs without looking checkpoint_segments

2012-04-24 Thread Fujii Masao
On Tue, Apr 24, 2012 at 3:53 PM, Heikki Linnakangas wrote: > On 23.04.2012 02:59, Fujii Masao wrote: >> >> On Thu, Apr 19, 2012 at 2:20 PM, Kyotaro HORIGUCHI >>  wrote: >>> >>> Hello, this is new version of standby checkpoint_segments patch. >> >> >> Thanks for the patch! > > > This still makes c

[HACKERS] Welcome 2012 GSOC students

2012-04-24 Thread Josh Berkus
Hackers, We've chosen the 5 GSOC projects for this year: * JDBC Foreign Data Wrapper, by Atri, mentored by Merlin Moncure * Document Collection Foreign Data Wrapper, by Zheng Yang (a returning student), mentored by Satoshi Nagayasu * Implementing TABLESAMPLE, by Qi, mentored by Stephen Frost * Be

Re: [HACKERS] Timsort performance, quicksort (was: Re: Memory usage during sorting)

2012-04-24 Thread Peter Geoghegan
On 24 April 2012 16:17, Robert Haas wrote: > If they are in sorted order with an empty string > appended onto the end, it takes about 25 seconds. That's exactly what I'd have expected, but was surprised to have not found with my own test. Perhaps it was same kind of fluke (i.e. a re-creatable one

Re: [HACKERS] Timsort performance, quicksort (was: Re: Memory usage during sorting)

2012-04-24 Thread Greg Stark
On Tue, Apr 24, 2012 at 4:17 PM, Robert Haas wrote: > Based on that, I'm inclined to propose rejiggering things so that the > presorted-input check runs only at the top level, and not during any > recursive steps. Just a thought. What about running only every nth step. Maybe something like every

Re: [HACKERS] New sync commit mode remote_write

2012-04-24 Thread Jeff Janes
On Thu, Apr 19, 2012 at 11:50 AM, Robert Haas wrote: > On 4/19/12, Jeff Janes wrote: >> The work around would be for the master to refuse to automatically >> restart after a crash, insisting on a fail-over instead (or a manual >> forcing of recovery)? > > I suppose that would work, but I think Si

Re: [HACKERS] New sync commit mode remote_write

2012-04-24 Thread Robert Haas
On Fri, Apr 20, 2012 at 3:58 PM, Fujii Masao wrote: > On Sat, Apr 21, 2012 at 12:20 AM, Simon Riggs wrote: >> On Thu, Apr 19, 2012 at 7:50 PM, Robert Haas wrote: >>> On 4/19/12, Jeff Janes wrote: The work around would be for the master to refuse to automatically restart after a crash,

Re: [HACKERS] Timsort performance, quicksort (was: Re: Memory usage during sorting)

2012-04-24 Thread Robert Haas
On Wed, Apr 18, 2012 at 9:31 PM, Peter Geoghegan wrote: > Thoughts? Interesting work. I thought about trying to code up timsort at one point, but I've been running short of round tuits. I did some quick tests of quicksort using half a million random strings. On my MacBook Pro, if the strings a

Re: [HACKERS] Usage of planner_ctx

2012-04-24 Thread Tom Lane
Amit Kapila writes: > So what is the use of having PlannerInfo->planner_ctx which only contains > CurrentMemoryContext? It might be clearer if you read up on the memory management in GEQO planning mode. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-ha

Re: [HACKERS] Postgres install program files folder

2012-04-24 Thread Robert Haas
On Wed, Apr 18, 2012 at 12:00 PM, Flavio Vodzinski wrote: > Hello, > Windows environment, has a problem in installing postgres in the Program > Files folder? I have this doubt because Windows works with locking system to > this folder. This question is off-topic for pgsql-hackers, which is for di

Re: [HACKERS] Dump EXTENSION sequences too

2012-04-24 Thread Robert Haas
On Thu, Apr 19, 2012 at 6:42 AM, Gianni Ciolli wrote: > currently an EXTENSION can mark some of its tables as "configuration > tables" using pg_catalog.pg_extension_config_dump(), so that pg_dump > "does the right thing". > > I think it would be useful to mark sequences too, but unfortunately it >

Re: [HACKERS] DOMAINs and CASTs

2012-04-24 Thread Robert Haas
On Tue, Apr 24, 2012 at 3:00 AM, Jaime Casanova wrote: > are we going to put this warning in this release? Done. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] B-tree page deletion boundary cases

2012-04-24 Thread Noah Misch
On Tue, Apr 24, 2012 at 09:08:36AM +0100, Simon Riggs wrote: > On Sat, Apr 21, 2012 at 5:52 PM, Noah Misch wrote: > > The fix is to compare the stored XID to RecentGlobalXmin, not RecentXmin. > > ?We > > already use RecentGlobalXmin when wal_level = hot_standby. ?If no running > > transaction has

Re: [HACKERS] Foreign table scan estimates

2012-04-24 Thread Albe Laurenz
Tom Lane wrote: >> While playing around with ANALYZE on foreign tables, I noticed >> that the row count estimate for foreign scans is still >> initialized to 1000 even if there are statistics for the >> foreign table. I think that this should be improved. >> The attached patch illustrates my sugg

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-24 Thread Ants Aasma
On Tue, Apr 24, 2012 at 10:31 AM, Sandro Santilli wrote: > On Tue, Apr 24, 2012 at 08:49:26AM +0200, Sandro Santilli wrote: >> On Mon, Apr 23, 2012 at 08:34:44PM +0300, Ants Aasma wrote: > >> > SELECT (SELECT reservoir_sample(some_table, 50) AS samples >> >    FROM some_table WHERE ctid =~ ANY (rn

Re: [HACKERS] ECPG FETCH readahead

2012-04-24 Thread Michael Meskes
> OK, I will implement #2. Another question popped up: what to do > with FETCH ALL? The current readahead window size or temporarily > bumping it to say some tens of thousands can be used. We may not > know how much is the "all records". This, although lowers performance, > saves memory. I would s

Re: [HACKERS] B-tree page deletion boundary cases

2012-04-24 Thread Simon Riggs
On Sat, Apr 21, 2012 at 5:52 PM, Noah Misch wrote: > As I mentioned[1] peripherally back in November, that algorithm has been > insufficient since the introduction of non-XID-bearing transactions in > PostgreSQL 8.3.  Such transactions do not restrain RecentXmin.  If no running > transaction has

Re: [HACKERS] PL/PGSQL bug in handling composite types

2012-04-24 Thread Boszormenyi Zoltan
2012-04-24 10:01 keltezéssel, Boszormenyi Zoltan írta: 2012-04-24 09:59 keltezéssel, Boszormenyi Zoltan írta: Hi, we have found a way to make pl/pgsql throw an error for a legitimate use case that works in plain SQL. Minimal test case: create table x1 (id serial primary key, d timestamptz); c

Re: [HACKERS] PL/PGSQL bug in handling composite types

2012-04-24 Thread Boszormenyi Zoltan
2012-04-24 09:59 keltezéssel, Boszormenyi Zoltan írta: Hi, we have found a way to make pl/pgsql throw an error for a legitimate use case that works in plain SQL. Minimal test case: create table x1 (id serial primary key, d timestamptz); create table x2 (id serial primary key, d timestamptz); i

[HACKERS] PL/PGSQL bug in handling composite types

2012-04-24 Thread Boszormenyi Zoltan
Hi, we have found a way to make pl/pgsql throw an error for a legitimate use case that works in plain SQL. Minimal test case: create table x1 (id serial primary key, d timestamptz); create table x2 (id serial primary key, d timestamptz); insert into x2 (d) values ('now'); create type mytype as

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-24 Thread Sandro Santilli
On Tue, Apr 24, 2012 at 08:49:26AM +0200, Sandro Santilli wrote: > On Mon, Apr 23, 2012 at 08:34:44PM +0300, Ants Aasma wrote: > > SELECT (SELECT reservoir_sample(some_table, 50) AS samples > >FROM some_table WHERE ctid =~ ANY (rnd_pgtids)) > > FROM random_pages('some_table', 50) AS rnd_pgtids

Re: [HACKERS] B-tree page deletion boundary cases

2012-04-24 Thread Nikhil Sontakke
> > Was wondering if there's a similar bug which gets triggered while using > > VACUUM FULL. See for instance this thread: > > > > > http://postgresql.1045698.n5.nabble.com/index-corruption-in-PG-8-3-13-td4257589.html > > > > This issue has been reported on-off from time to time and in most cases >

Re: [HACKERS] [PATCH] lock_timeout and common SIGALRM framework

2012-04-24 Thread Boszormenyi Zoltan
2012-04-23 15:08 keltezéssel, Marc Cousin írta: On Mon, 2012-04-23 at 10:53 +0200, Boszormenyi Zoltan wrote: 2012-04-10 09:02 keltezéssel, Boszormenyi Zoltan írta: 2012-04-06 14:47 keltezéssel, Cousin Marc írta: On 05/04/12 08:02, Boszormenyi Zoltan wrote: 2012-04-04 21:30 keltezéssel, Alvaro

Re: [HACKERS] DOMAINs and CASTs

2012-04-24 Thread Jaime Casanova
On Tue, Nov 29, 2011 at 10:12 PM, Robert Haas wrote: > On Tue, Nov 29, 2011 at 11:11 AM, Jaime Casanova > wrote: >> On Tue, Nov 29, 2011 at 10:42 AM, Tom Lane wrote: >>> Bruce Momjian writes: Tom Lane wrote: > Robert Haas writes: >> Well, if we apply this, it has the possibility