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 Haas wrote: On Wed, Mar 30, 2011 at 4:08 AM, Fujii Masao wrote: On Wed, Mar 30, 2011 at 5:03 PM, Heikki Linnakangas wrote: On 30.03.2011 10:58, Fujii Masao wrote: On Wed, Mar 30, 2011 at 4:24 PM, Heikki Linn

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 in

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

2011-03-31 Thread 高增琦
2011/3/30 Robert Haas > 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 > recheck the bit. Onl

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 firs

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 allocated

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 > wrote: > > In PostgreSQL8.4.5, I found that the catalog pg_attribute.attinhcount is not > > correct. > > > > I executed the following queries. > > > > --

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, vm_

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 num

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 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 COLUMN with a merg

[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" c

Re: [HACKERS] SSI bug?

2011-03-31 Thread Kevin Grittner
YAMAMOTO Takashi 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 I've stared at t

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

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 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', 'IYYY-IW-DY'); > >> to_

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 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 would be goo

Re: [HACKERS] Comments on SQL/Med objects

2011-03-31 Thread Robert Haas
On Mon, Mar 28, 2011 at 12:29 AM, Robert Haas wrote: > On Mon, Mar 28, 2011 at 12:06 AM, Tom Lane wrote: >> Robert Haas writes: >>> On Wed, Mar 23, 2011 at 12:53 PM, Tom Lane wrote: Yeah, I had a private TODO about that.  I'd like to see if we can refactor the grammar to eliminate som

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

2011-03-31 Thread Brendan Jurd
On 1 April 2011 02:00, Adrian Klaver 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 co. differentl

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 of

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 > > wrote: > > > On 03/29/2011 04:24 PM, Adrian Klaver wrote: > > >> ... > > >> Well the strange part is only fails for SUN:... [. . .]

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 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 >> place to start

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 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 transactions were not getting cleaned up

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

2011-03-31 Thread Brendan Jurd
On 1 April 2011 02:35, Marc Munro 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 to_date would have

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 real

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas 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: http://www.enterprisedb.com T

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 > 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 you want to do that y

Re: [HACKERS] Libpq PGRES_COPY_BOTH - version compatibility

2011-03-31 Thread Magnus Hagander
On Thu, Mar 31, 2011 at 17:35, Robert Haas wrote: > On Mon, Mar 28, 2011 at 7:07 PM, Tom Lane 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 thi

[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(); xid

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 12:11 PM, Bruce Momjian wrote: > Robert Haas wrote: >> On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas >> 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

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 Klaver 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

Re: [HACKERS] Process local hint bit cache

2011-03-31 Thread Robert Haas
On Wed, Mar 30, 2011 at 6:30 PM, Merlin Moncure wrote: > On Wed, Mar 30, 2011 at 2:35 PM, Merlin Moncure 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 cache. > > aside: > Moving Tran

Re: [HACKERS] Problem with pg_upgrade?

2011-03-31 Thread Gurjeet Singh
On Wed, Mar 30, 2011 at 10:57 AM, Bruce Momjian 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, -- Gurjeet Sing

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 12:17 PM, Bruce Momjian 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, but not loo

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

2011-03-31 Thread Brendan Jurd
On 1 April 2011 03:32, Adrian Klaver 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 correct for the us

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

2011-03-31 Thread Steve Crawford
ng of ISO formatting I see the following issues: 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" thi

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 wrote: > > Looking over the autovacuum.c code, I see: > > > >    /* > >     * Determine the oldest datfrozenxid/relfrozenxid that we will allow to > >     * pass without forcing

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

2011-03-31 Thread Brendan Jurd
t; 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 clarif

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 memor

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 migratin

Re: [HACKERS] SSI bug?

2011-03-31 Thread Kevin Grittner
Dan Ports 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 entries >> allocat

Re: [HACKERS] SSI bug?

2011-03-31 Thread Heikki Linnakangas
On 31.03.2011 21:23, Kevin Grittner wrote: Dan Ports 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 lim

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

2011-03-31 Thread Brendan Jurd
On 1 April 2011 05:16, Steve Crawford 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 an > error? For me personall

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 > >

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 wrote: > > Robert Haas wrote: > >> On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas > >> wrote: > >> >> ?I think the maintenance > >> >> overhead of an invisible variable is too much. > >> > > >> > A simple GUC or command-li

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

Re: [HACKERS] SSI bug?

2011-03-31 Thread Kevin Grittner
Heikki Linnakangas 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 the preallocation. A new HASH

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 2:59 PM, Bruce Momjian 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 practical

[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 anyth

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 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 PM_WAIT_BACKENDS state

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. c

Re: [HACKERS] wal_buffers = -1 and SIGHUP

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 8:38 AM, Bernd Helmle 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:  received SIGHUP,

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 wrote: > 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

Re: [HACKERS] Windows build issues

2011-03-31 Thread Magnus Hagander
On Thu, Mar 31, 2011 at 22:00, 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] 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

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 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 woul

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 wrote: > > > Robert Haas wrote: > > >> On Thu, Mar 31, 2011 at 11:32 AM, Heikki Linnakangas > > >> wrote: > > >> >> ?I think the maintenance > > >> >> overhead of an invisible variable is too much. > > >

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 4:16 PM, Bruce Momjian wrote: > Robert Haas wrote: >> On Thu, Mar 31, 2011 at 2:59 PM, Bruce Momjian 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 natur

[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 o

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

[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 a

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 actuall

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Kevin Grittner
Robert Haas 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 integer to money.

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 > 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 > http://archives.po

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 4:58 PM, Kevin Grittner wrote: > Robert Haas 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

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 4:35 PM, Bruce Momjian 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 *circu

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

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Kevin Grittner
Robert Haas 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 will be riots

Re: [HACKERS] Process local hint bit cache

2011-03-31 Thread Merlin Moncure
On Wed, Mar 30, 2011 at 2:35 PM, Merlin Moncure wrote: > On Wed, Mar 30, 2011 at 11:23 AM, Heikki Linnakangas > wrote: >> On 30.03.2011 18:02, Robert Haas wrote: >>> >>> On Wed, Mar 30, 2011 at 10:40 AM, Greg Stark  wrote: But one way or another the hint bits have to get set sometime. T

Re: [HACKERS] Process local hint bit cache

2011-03-31 Thread Merlin Moncure
On Thu, Mar 31, 2011 at 5:33 PM, Merlin Moncure wrote: > On Wed, Mar 30, 2011 at 2:35 PM, Merlin Moncure wrote: >> On Wed, Mar 30, 2011 at 11:23 AM, Heikki Linnakangas >> wrote: >>> On 30.03.2011 18:02, Robert Haas wrote: On Wed, Mar 30, 2011 at 10:40 AM, Greg Stark  wrote: > >

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 rep

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: http:

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 ad

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 sh

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 Haas 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. Why not? AIUI the

[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 | tex

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 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 sup

Re: [HACKERS] Bug in autovacuum.c?

2011-03-31 Thread Greg Stark
On Thu, Mar 31, 2011 at 10:59 PM, Bruce Momjian 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 wh

Re: [HACKERS] cast from integer to money

2011-03-31 Thread Robert Haas
On Mar 31, 2011, at 6:39 PM, Stephen Frost 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 currencies where

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 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 running. > >

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 wrote: > >> I think this is a manifestation the same problem mentioned here: > >> > >> http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=31b6fc06d83c6de3644c8f2921eb7de0eb92fac3 >

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 wrote: > On 18 October 2010 01:19, Tom Lane wrote: >> Brendan Jurd writes: >>> On 17 October 2010 09:59, Tom Lane wrote: Good point.  Maybe the correct fix is to remember whether each token was quoted or not, so that keyword detection can be done