Re: [HACKERS] Replication server timeout patch

2011-03-31 Thread Heikki Linnakangas
On 31.03.2011 05:46, Fujii Masao wrote: On Wed, Mar 30, 2011 at 10:54 PM, Robert Haasrobertmh...@gmail.com wrote: On Wed, Mar 30, 2011 at 4:08 AM, Fujii Masaomasao.fu...@gmail.com wrote: On Wed, Mar 30, 2011 at 5:03 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On

Re: [HACKERS] crash-safe visibility map, take four

2011-03-31 Thread 高增琦
On Wed, Mar 30, 2011 at 8:52 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 30.03.2011 06:24, 高增琦 wrote: Should we do full-page write for visibilitymap all the time? Now, when clear visiblitymap, there is no full-page write for vm since we don't save buffer info in

Re: [HACKERS] crash-safe visibility map, take four

2011-03-31 Thread 高增琦
2011/3/30 Robert Haas robertmh...@gmail.com Maybe we could check PD_ALL_VISIBLE before taking the buffer lock - if it appears to be set, then we pin the visibility map page before taking the buffer lock. Otherwise, we take the buffer lock at once. Either way, once we have the lock, we

Re: [HACKERS] Re: [COMMITTERS] pgsql: Fix plpgsql to release SPI plans when a function or DO block is

2011-03-31 Thread Jan Urbański
On 31/03/11 07:35, Heikki Linnakangas wrote: On 30.03.2011 21:21, Jan Urbański wrote: Valgrind showed me the way. PFA a trivial patch to avoid leaking a PLyProcedure struct in inline blocks. Hmm, any reason the PLyProcedure struct needs to be allocated in TopMemoryContext in the first

Re: [HACKERS] Re: [COMMITTERS] pgsql: Fix plpgsql to release SPI plans when a function or DO block is

2011-03-31 Thread Heikki Linnakangas
On 31.03.2011 12:30, Jan Urbański wrote: On 31/03/11 07:35, Heikki Linnakangas wrote: On 30.03.2011 21:21, Jan Urbański wrote: Valgrind showed me the way. PFA a trivial patch to avoid leaking a PLyProcedure struct in inline blocks. Hmm, any reason the PLyProcedure struct needs to be

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-03-31 Thread Noah Misch
[moving to pgsql-hackers] On Thu, Feb 03, 2011 at 11:24:42AM -0500, Robert Haas wrote: On Mon, Jan 31, 2011 at 6:42 AM, Naoya Anzai anzai-na...@mxu.nes.nec.co.jp wrote: In PostgreSQL8.4.5, I found that the catalog pg_attribute.attinhcount is not correct. I executed the following

Re: [HACKERS] crash-safe visibility map, take four

2011-03-31 Thread Heikki Linnakangas
On 31.03.2011 11:33, 高增琦 wrote: Consider a example: 1. delete on two pages, emits two log (1, page1, vm_clear_1), (2, page2, vm_clear_2) 2. vm_clear_1 and vm_clear_2 on same vm page 3. checkpoint, and vm page get torned, vm_clear_2 was lost 4. delete another page, emits one log (3, page1,

Re: [HACKERS] SHMEM_INDEX_SIZE exceeded on startup

2011-03-31 Thread Heikki Linnakangas
On 29.03.2011 20:20, Kevin Grittner wrote: I doubt that this is going to matter much, and should only have a trivial impact on shared space calculations and postmaster and connection startup time, but just as a matter of principle we might want to set SHMEM_INDEX_SIZE at least as large as the

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-03-31 Thread Bernd Helmle
--On 31. März 2011 06:06:49 -0400 Noah Misch n...@leadboat.com wrote: The best way I can see is to make ATExecAddColumn more like ATExecDropColumn, ATAddCheckConstraint, and ATExecDropConstraint. Namely, recurse at Exec-time rather than Prep-time, and cease recursing when we satisfy the ADD

[HACKERS] wal_buffers = -1 and SIGHUP

2011-03-31 Thread Bernd Helmle
This might be nitpicking (or i'm currently missing something), but i recognized that setting wal_buffers = -1 always triggers the following on reload, even if nothing to wal_buffers had changed: $ pg_ctl reload LOG: received SIGHUP, reloading configuration files LOG: parameter wal_buffers

Re: [HACKERS] SSI bug?

2011-03-31 Thread Kevin Grittner
YAMAMOTO Takashi y...@mwd.biglobe.ne.jp wrote: hoge=# select locktype,count(*) from pg_locks group by locktype; -[ RECORD 1 ] locktype | virtualxid count| 1 -[ RECORD 2 ] locktype | relation count| 1 -[ RECORD 3 ] locktype | tuple count| 7061

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Bruce Momjian
Bruce Momjian wrote: Bruce Momjian wrote: It does seem possible that that could happen, but I'm not sure exactly what would be causing autovacuum to fire in the first place. It wouldn't have to be triggered by the anti-wraparound machinery - if the table appeared to be in need of

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Adrian Klaver
On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: On 31 March 2011 03:15, Steve Crawford scrawf...@pinpointresearch.com wrote: On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for SUN:... test(5432)aklaver=select to_date('2011-13-SUN',

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch n...@leadboat.com wrote: I think this is a manifestation the same problem mentioned here: http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=31b6fc06d83c6de3644c8f2921eb7de0eb92fac3 I believe this requires some refactoring to fix.  It

Re: [HACKERS] Comments on SQL/Med objects

2011-03-31 Thread Robert Haas
On Mon, Mar 28, 2011 at 12:29 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Mar 28, 2011 at 12:06 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Mar 23, 2011 at 12:53 PM, Tom Lane t...@sss.pgh.pa.us wrote: Yeah, I had a private TODO about that.  

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 02:00, Adrian Klaver adrian.kla...@gmail.com wrote: On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: If we wanted to make it work, then I think the thing to do would be to add a new set of formatting tokens IDY, IDAY etc.  I don't like the idea of interpreting DY and

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Heikki Linnakangas
On 31.03.2011 17:55, Bruce Momjian wrote: I will work on code to allow autovacuum_max_workers to be set to zero in HEAD and 9.0, and have pg_upgrade us that. We've intentionally not allowed the user to disable anti-wraparound autovacuum before. Do we really want to allow it now for the sake

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Marc Munro
On Thu, 2011-03-31 at 08:00 -0700, Adrian Klaver wrote: On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: On 31 March 2011 03:15, Steve Crawford scrawf...@pinpointresearch.com wrote: On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for

Re: [HACKERS] Libpq PGRES_COPY_BOTH - version compatibility

2011-03-31 Thread Robert Haas
On Mon, Mar 28, 2011 at 7:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: Now if we had a track record showing that we could tweak the protocol version without causing problems, it'd be fine with me to do it for this usage.  But we don't, and this particular case doesn't seem like the

Re: [HACKERS] SSI bug?

2011-03-31 Thread Heikki Linnakangas
On 31.03.2011 16:31, Kevin Grittner wrote: I've stared at the code for hours and have only come up with one race condition which can cause this, although the window is so small it's hard to believe that you would get this volume of orphaned locks. I'll keep looking, but if you could try this to

Re: [HACKERS] SSI bug?

2011-03-31 Thread Kevin Grittner
Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Did we get anywhere with the sizing of the various shared memory structures? Did we find the cause of the out of shared memory warnings? The patch you just committed is related to that. Some tuple locks for summarized

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 02:35, Marc Munro m...@bloodnok.com wrote: Just to be clear, the reason I was mixing things in this way was that I wanted to validate that the dayname being passed was valid for the current locale, and I could find no easier way of doing it. Ah, I see. In that case I think

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Bruce Momjian
Heikki Linnakangas wrote: On 31.03.2011 17:55, Bruce Momjian wrote: I will work on code to allow autovacuum_max_workers to be set to zero in HEAD and 9.0, and have pg_upgrade us that. We've intentionally not allowed the user to disable anti-wraparound autovacuum before. Do we really want

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote:  I think the maintenance overhead of an invisible variable is too much. A simple GUC or command-line switch isn't much code. I like the idea of a command-line switch. -- Robert Haas EnterpriseDB:

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Bruce Momjian
Robert Haas wrote: On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: ?I think the maintenance overhead of an invisible variable is too much. A simple GUC or command-line switch isn't much code. I like the idea of a command-line switch. If

Re: [HACKERS] Libpq PGRES_COPY_BOTH - version compatibility

2011-03-31 Thread Magnus Hagander
On Thu, Mar 31, 2011 at 17:35, Robert Haas robertmh...@gmail.com wrote: On Mon, Mar 28, 2011 at 7:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: Now if we had a track record showing that we could tweak the protocol version without causing problems, it'd be fine with me to do it for this

[HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Bruce Momjian
Looking over the autovacuum.c code, I see: /* * Determine the oldest datfrozenxid/relfrozenxid that we will allow to * pass without forcing a vacuum. (This limit can be tightened for * particular tables, but not loosened.) */ recentXid = ReadNewTransactionId();

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 12:11 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: ?I think the maintenance overhead of an invisible variable is too much. A simple GUC or command-line

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Adrian Klaver
On 03/31/2011 08:27 AM, Brendan Jurd wrote: On 1 April 2011 02:00, Adrian Klaveradrian.kla...@gmail.com wrote: On Wednesday, March 30, 2011 8:39:25 pm Brendan Jurd wrote: If we wanted to make it work, then I think the thing to do would be to add a new set of formatting tokens IDY, IDAY etc.

Re: [HACKERS] Process local hint bit cache

2011-03-31 Thread Robert Haas
On Wed, Mar 30, 2011 at 6:30 PM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Mar 30, 2011 at 2:35 PM, Merlin Moncure mmonc...@gmail.com wrote: btw I haven't forgotten your idea to move TransactionIdInProgress Down. I think this is a good idea, and will experiment with it pre and post

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Gurjeet Singh
On Wed, Mar 30, 2011 at 10:57 AM, Bruce Momjian br...@momjian.us wrote: I am hearing only second-hand reports of this problem through Rhodiumtoad on IRC. I don't have IRC access this week If the firewalls allow port 80, you can use Freenode's web interface: webchat.freenode.net Regards, --

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 12:17 PM, Bruce Momjian br...@momjian.us wrote: Looking over the autovacuum.c code, I see:    /*     * Determine the oldest datfrozenxid/relfrozenxid that we will allow to     * pass without forcing a vacuum.  (This limit can be tightened for     * particular tables,

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 03:32, Adrian Klaver adrian.kla...@gmail.com wrote: Now I am confused the docs say: D       day of the week, Sunday(1) to Saturday(7) ID      ISO day of the week, Monday(1) to Sunday(7) This would seem to say they both are one-based but differ on the day that is 1. That's

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Steve Crawford
- a special purpose format included within ISO8601. 2011-03-31 is also an ISO date as are 20110331, 20110331T013212 and 20110331T21.3344298. Fixing this is probably as simple as a clarification in the documentation. 2. The ISO week-date format is defined as having the week-number prefaced by a W

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Alvaro Herrera
Excerpts from Robert Haas's message of jue mar 31 13:58:41 -0300 2011: On Thu, Mar 31, 2011 at 12:17 PM, Bruce Momjian br...@momjian.us wrote: Looking over the autovacuum.c code, I see:    /*     * Determine the oldest datfrozenxid/relfrozenxid that we will allow to     * pass without

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
: 1. What we describe in the documentation as an ISO date is actually an ISO *week* date - a special purpose format included within ISO8601. 2011-03-31 is also an ISO date as are 20110331, 20110331T013212 and 20110331T21.3344298. Fixing this is probably as simple as a clarification

Re: [HACKERS] SSI bug?

2011-03-31 Thread Dan Ports
On Thu, Mar 31, 2011 at 11:06:30AM -0500, Kevin Grittner wrote: The only thing I've been on the fence about is whether it makes more sense to allocate it all up front or to continue to allow incremental allocation but set a hard limit on the number of entries allocated for each shared memory

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Steve Crawford
On 03/31/2011 10:51 AM, Brendan Jurd wrote: I agree with your summary of the ISO standards. Unfortunately, to_date and its cohorts are not targeting ISO. They are targeting quasi-compatibility with some Oracle functions of the same name, I suppose to make life easier for folks who are

Re: [HACKERS] SSI bug?

2011-03-31 Thread Kevin Grittner
Dan Ports d...@csail.mit.edu wrote: On Thu, Mar 31, 2011 at 11:06:30AM -0500, Kevin Grittner wrote: The only thing I've been on the fence about is whether it makes more sense to allocate it all up front or to continue to allow incremental allocation but set a hard limit on the number of

Re: [HACKERS] SSI bug?

2011-03-31 Thread Heikki Linnakangas
On 31.03.2011 21:23, Kevin Grittner wrote: Dan Portsd...@csail.mit.edu wrote: On Thu, Mar 31, 2011 at 11:06:30AM -0500, Kevin Grittner wrote: The only thing I've been on the fence about is whether it makes more sense to allocate it all up front or to continue to allow incremental allocation

Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-31 Thread Brendan Jurd
On 1 April 2011 05:16, Steve Crawford scrawf...@pinpointresearch.com wrote: Well, to return to the original issue, should we allow the day to be spelled out and fix it (as noted in this thread it is non-standard but also unambiguous and we already allow plenty of non-standard formats) or throw

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Bruce Momjian
Alvaro Herrera wrote: That would probably work, but the existing coding actually makes more sense. It's essentially trying to scan backwards by autovacuum_freeze_max_age XIDs through the circular XID space. But the XID space isn't actually circular, because there are 3 special values.

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Bruce Momjian
Robert Haas wrote: On Thu, Mar 31, 2011 at 12:11 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: ?I think the maintenance overhead of an invisible variable is too much. A

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Bruce Momjian
Bruce Momjian wrote: Yeah, I think this change would have the effect of moving the freeze limit by one (or two?) counts. Given the moving nature of values returned by ReadNewTransactionId this would probably have no practical effect. Still, the code as is seems more natural to me (Tom

Re: [HACKERS] SSI bug?

2011-03-31 Thread Kevin Grittner
Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: That's not enough. The hash tables can grow beyond the maximum size you specify in ShmemInitHash. It's just a hint to size the directory within the hash table. We'll need to teach dynahash not to allocate any more entries after

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 2:59 PM, Bruce Momjian br...@momjian.us wrote: Bruce Momjian wrote: Yeah, I think this change would have the effect of moving the freeze limit by one (or two?) counts.  Given the moving nature of values returned by ReadNewTransactionId this would probably have no

[HACKERS] Windows build issues

2011-03-31 Thread Peter Eisentraut
I was trying to build the Windows msvc build for the first time and ran into some issues. The documentation talks about obtaining and using the Platform SDK. I understand that this is nowadays called the Windows SDK. Searching for the former on the Microsoft download site doesn't offer anything

Re: [HACKERS] corner case about replication and shutdown

2011-03-31 Thread Robert Haas
[ sorry for not responding sooner ] On Wed, Mar 23, 2011 at 9:46 AM, Fujii Masao masao.fu...@gmail.com wrote: When I read the shutdown code to create the smart shutdown patch for sync rep, I found the corner case where shutdown can get stuck infinitely. This happens when postmaster reaches

Re: [HACKERS] Windows build issues

2011-03-31 Thread Andrew Dunstan
On 03/31/2011 03:38 PM, Peter Eisentraut wrote: So is 2010 supported, and where is the vcbuild program supposed to come from? Not that I know of. But VS 2008 is, and should be readily available. In fact, I recently made patches to allow it to to be used to build all the live branches.

Re: [HACKERS] wal_buffers = -1 and SIGHUP

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 8:38 AM, Bernd Helmle maili...@oopsware.de wrote: This might be nitpicking (or i'm currently missing something), but i recognized that setting wal_buffers = -1 always triggers the following on reload, even if nothing to wal_buffers had changed: $ pg_ctl reload LOG:  

Re: [HACKERS] Windows build issues

2011-03-31 Thread Dave Page
No, 2010 is not yet supported, though I beleive some initial work was done. I'm intending to work on it for 9.2. On 3/31/11, Peter Eisentraut pete...@gmx.net wrote: I was trying to build the Windows msvc build for the first time and ran into some issues. The documentation talks about

Re: [HACKERS] Windows build issues

2011-03-31 Thread Magnus Hagander
On Thu, Mar 31, 2011 at 22:00, Andrew Dunstan and...@dunslane.net wrote: On 03/31/2011 03:38 PM, Peter Eisentraut wrote: So is 2010 supported, and where is the vcbuild program supposed to come from? Not that I know of. But VS 2008 is, and should be readily available. In fact, I recently

Re: [HACKERS] Windows build issues

2011-03-31 Thread Peter Eisentraut
On tor, 2011-03-31 at 16:00 -0400, Andrew Dunstan wrote: On 03/31/2011 03:38 PM, Peter Eisentraut wrote: So is 2010 supported, and where is the vcbuild program supposed to come from? Not that I know of. But VS 2008 is, and should be readily available. In fact, I recently made

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Bruce Momjian
Robert Haas wrote: On Thu, Mar 31, 2011 at 2:59 PM, Bruce Momjian br...@momjian.us wrote: Bruce Momjian wrote: Yeah, I think this change would have the effect of moving the freeze limit by one (or two?) counts. ?Given the moving nature of values returned by ReadNewTransactionId this

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Bruce Momjian
Bruce Momjian wrote: Robert Haas wrote: On Thu, Mar 31, 2011 at 12:11 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: ?I think the maintenance overhead of an invisible

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 4:16 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Thu, Mar 31, 2011 at 2:59 PM, Bruce Momjian br...@momjian.us wrote: Bruce Momjian wrote: Yeah, I think this change would have the effect of moving the freeze limit by one (or two?) counts. ?Given

[HACKERS] cast from integer to money

2011-03-31 Thread Robert Haas
On the open items list, we have: conversion from integer literals to money type http://archives.postgresql.org/pgsql-testers/2011-01/msg0.php What this is really complaining about is that we added a cast from numeric to money, but not from integer to money. This isn't really a bug: the fact

[HACKERS] pg_upgrade exit_nicely()

2011-03-31 Thread Peter Eisentraut
While reading around in pg_upgrade code I came across the slightly bizarre function void exit_nicely(bool need_cleanup) The parameter doesn't actually determine whether any cleanup is done. The cleanup is done anyway and the parameter only controls the exit code in a backwards way. Also most of

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Bruce Momjian
Robert Haas wrote: The effect is to map max xid + 1 to max xid - FirstNormalTransactionId(3) + 1, which makes the xid look like it is going backwards, less than max xid --- not good. The XID space is *circular*. Right but you would think that as the xid moves forward, the

[HACKERS] GSoC 2011 Eager MV implementation proposal

2011-03-31 Thread AAMIR KHAN
Title: Implementation of Eager Materialized views in postgres Name of Proposer Email : Aamir Khan ak4u2...@gmail.com Synopsis: I would like to implement eager materialized view.An eager materialized view will be updated whenever the view changes. This is done with a system of triggers on

Re: [HACKERS] pg_upgrade exit_nicely()

2011-03-31 Thread Bruce Momjian
Feel free to apply this to HEAD. --- Peter Eisentraut wrote: While reading around in pg_upgrade code I came across the slightly bizarre function void exit_nicely(bool need_cleanup) The parameter doesn't actually

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: On the open items list, we have: conversion from integer literals to money type http://archives.postgresql.org/pgsql-testers/2011-01/msg0.php What this is really complaining about is that we added a cast from numeric to money, but not from

Re: [HACKERS] proposal: a validator for configuration files

2011-03-31 Thread Alexey Klyukin
Hi Selena, On Mar 30, 2011, at 11:42 PM, Selena Deckelmann wrote: Hi! On Wed, Mar 30, 2011 at 8:40 AM, Alexey Klyukin al...@commandprompt.com wrote: I did a little bit of work on this, and we discussed it here: http://archives.postgresql.org/pgsql-hackers/2009-03/msg00345.php

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 4:58 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: On the open items list, we have: conversion from integer literals to money type http://archives.postgresql.org/pgsql-testers/2011-01/msg0.php What this is really

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 4:35 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: The effect is to map max xid + 1 to max xid - FirstNormalTransactionId(3) + 1, which makes the xid look like it is going backwards, less than max xid --- not good. The XID space is *circular*.

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Bruce Momjian
Robert Haas wrote: ? ?xidForceLimit = recentXid - autovacuum_freeze_max_age; ? ?if (xidForceLimit FirstNormalTransactionId) ? ? ? ?xidForceLimit -= FirstNormalTransactionId; The values: ? ? ? ?xidForceLimit ? Result ? ? ? ?--- ? ? ? ?max_xid-2 ? ? ?

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: There were reasonable arguments made why this could be a bad idea -- primarily around the question of whether '395' represented $3.95 or $395.00. That's not too hard to figure out, right? If 1.00 means $1.00, 1 had better not mean $0.01, or there

Re: [HACKERS] Process local hint bit cache

2011-03-31 Thread Merlin Moncure
On Wed, Mar 30, 2011 at 2:35 PM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Mar 30, 2011 at 11:23 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 30.03.2011 18:02, Robert Haas wrote: On Wed, Mar 30, 2011 at 10:40 AM, Greg Starkgsst...@mit.edu  wrote: But one way

Re: [HACKERS] Process local hint bit cache

2011-03-31 Thread Merlin Moncure
On Thu, Mar 31, 2011 at 5:33 PM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Mar 30, 2011 at 2:35 PM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Mar 30, 2011 at 11:23 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 30.03.2011 18:02, Robert Haas wrote: On Wed,

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Stephen Frost
* Kevin Grittner (kevin.gritt...@wicourts.gov) wrote: If you're just talking about going in the one direction, I might be persuaded that's sane, especially because of the case of literals, and especially since there are currencies where fractional amounts aren't used in the conventional

Re: [HACKERS] GSoC 2011 Eager MV implementation proposal

2011-03-31 Thread Greg Smith
On 03/31/2011 04:38 PM, AAMIR KHAN wrote: I would like to implement eager materialized view.An eager materialized view will be updated whenever the view changes. This is done with a system of triggers on all of the underlying tables. Last summer someone worked on snapshot materialized views.

[HACKERS] Should psql support URI syntax?

2011-03-31 Thread Joshua D. Drake
Hello, Most database connectors/frameworks nowadays support a URI style connection string. Something like: pgsql://user:pass@host/database Do we think psql should support this style of connection string? Sincerely, Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc:

Re: [HACKERS] Should psql support URI syntax?

2011-03-31 Thread Andrew Dunstan
On 03/31/2011 07:25 PM, Joshua D. Drake wrote: Hello, Most database connectors/frameworks nowadays support a URI style connection string. Something like: pgsql://user:pass@host/database Do we think psql should support this style of connection string? Syntactic sugar aside, what is the

Re: [HACKERS] Should psql support URI syntax?

2011-03-31 Thread Joshua D. Drake
On Thu, 2011-03-31 at 19:32 -0400, Andrew Dunstan wrote: On 03/31/2011 07:25 PM, Joshua D. Drake wrote: Hello, Most database connectors/frameworks nowadays support a URI style connection string. Something like: pgsql://user:pass@host/database Do we think psql should support this

Re: [HACKERS] 2nd Level Buffer Cache

2011-03-31 Thread Greg Smith
On 03/24/2011 03:36 PM, Jim Nasby wrote: On Mar 23, 2011, at 5:12 PM, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: It looks like the only way anything can ever get put on the free list right now is if a relation or database is dropped. That doesn't seem too good.

[HACKERS] Foreign table permissions and cloning

2011-03-31 Thread Thom Brown
Hi, I've noticed some weirdness when trying to grant various types of permissions on a foreign table and thought I'd report it here: postgres=# \d stuff Foreign table public.stuff Column | Type | Modifiers +-+--- id | integer | colour | text| animal | text

Re: [HACKERS] Should psql support URI syntax?

2011-03-31 Thread Joshua Berkus
I would think it would be purely syntatic sugar really, which does incorporate a familiar interface for those who are working in different worlds (.Net/Drupal/JAVA) etc... I wouldn't mind having something more standard supported; I'm always looking up the conninfo for the options I don't

Re: [HACKERS] Foreign table permissions and cloning

2011-03-31 Thread Thom Brown
On 1 April 2011 00:54, Thom Brown t...@linux.com wrote: Hi, I've noticed some weirdness when trying to grant various types of permissions on a foreign table and thought I'd report it here: postgres=# \d stuff  Foreign table public.stuff  Column |  Type   | Modifiers

Re: [HACKERS] Should psql support URI syntax?

2011-03-31 Thread Christopher Browne
An advantage to this uri form is that it allows applications to be configured uniformly - I do not need to ask is this using libpq, needing one sort of configuration, or Java, needing another? Rather, I may say, here is a uri I may use with any of my applications

Re: [HACKERS] Should psql support URI syntax?

2011-03-31 Thread Joshua D. Drake
On Thu, 2011-03-31 at 19:10 -0500, Joshua Berkus wrote: I would think it would be purely syntatic sugar really, which does incorporate a familiar interface for those who are working in different worlds (.Net/Drupal/JAVA) etc... I wouldn't mind having something more standard supported;

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Greg Stark
On Thu, Mar 31, 2011 at 10:59 PM, Bruce Momjian br...@momjian.us wrote: OK, just keep going below 100:        105 - 5        104 - 4        103 - 3        102 - max_xid        101 - max_xid - 1        100 - max_xid - 2         99 - max_id         98 - max_id -1 Yeah, I think this is

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Robert Haas
On Mar 31, 2011, at 6:39 PM, Stephen Frost sfr...@snowman.net wrote: * Kevin Grittner (kevin.gritt...@wicourts.gov) wrote: If you're just talking about going in the one direction, I might be persuaded that's sane, especially because of the case of literals, and especially since there are

Re: [HACKERS] corner case about replication and shutdown

2011-03-31 Thread Fujii Masao
On Fri, Apr 1, 2011 at 4:48 AM, Robert Haas robertmh...@gmail.com wrote: I think this problem is harmless in practice since it doesn't happen too often. But that can happen... The simple fix is to change ServerLoop() so that it periodically calls PostmasterStateMachine() while shutdown is

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-03-31 Thread Noah Misch
On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote: On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch n...@leadboat.com wrote: I think this is a manifestation the same problem mentioned here:

Re: [HACKERS] Keywords in pg_hba.conf should be field-specific

2011-03-31 Thread Brendan Jurd
On 29 October 2010 09:59, Brendan Jurd dire...@gmail.com wrote: On 18 October 2010 01:19, Tom Lane t...@sss.pgh.pa.us wrote: Brendan Jurd dire...@gmail.com writes: On 17 October 2010 09:59, Tom Lane t...@sss.pgh.pa.us wrote: Good point.  Maybe the correct fix is to remember whether each token