Re: [HACKERS] pg_upgrade and rsync

2015-01-24 Thread Bruce Momjian
On Fri, Jan 23, 2015 at 02:34:36PM -0500, Stephen Frost wrote: > > > You'd have to replace the existing data directory on the master to do > > > that, which pg_upgrade was designed specifically to not do, in case > > > things went poorly. > > > > Why? Just rsync the new data directory onto the old

[HACKERS] Re: Abbreviated keys for Datum tuplesort (was: Re: B-Tree support function number 3 (strxfrm() optimization))

2015-01-24 Thread Peter Geoghegan
On Sat, Jan 24, 2015 at 6:19 PM, Robert Haas wrote: > I think this is a good idea. Do you have a test case that shows the benefit? I agree. It seems likely that this will show a similar benefit to other cases already tested, but I'd like to see a test case too. -- Peter Geoghegan -- Sent vi

[HACKERS] Re: Abbreviated keys for Datum tuplesort (was: Re: B-Tree support function number 3 (strxfrm() optimization))

2015-01-24 Thread Robert Haas
On Fri, Jan 23, 2015 at 4:13 PM, Andrew Gierth wrote: > [pruning the Cc: list and starting a new thread] > > Here's the cleaned-up version of the patch to allow abbreviated keys > when sorting a single Datum. This also removes comments that suggest > that the caller of tuplesort_begin_datum should

Re: [HACKERS] New CF app deployment

2015-01-24 Thread Tomas Vondra
Hi, seems the CF app uses an invalid e-mail address when sending messages to pgsql-hackers - I've added a comment to one of the patches and got this: pgsql-hackers-testing@localhost Unrouteable address Maybe that's expected as the CF app is new, but I haven't seen it mentioned in this thre

Re: [HACKERS] Failback to old master

2015-01-24 Thread Maeldron T.
2014-11-13 9:05 GMT+01:00 Heikki Linnakangas : > > Right. You have to be careful to make sure the standby really did fully > catch up with the master, though. If it happens that the replication > connection is momentarily down when you shut down the master, for example, > then the master won't wai

Re: [HACKERS] logical column ordering

2015-01-24 Thread Tomas Vondra
On 20.1.2015 22:30, Alvaro Herrera wrote: > I've decided to abandon this patch. I have spent too much time looking > at it now. > > If anyone is interested in trying to study, I can provide the patches I > came up with, explanations, and references to prior discussion -- feel > free to ask. I'll

Re: [HACKERS] Shortcoming in CLOBBER_FREED_MEMORY coverage: disk buffer pointers

2015-01-24 Thread Tom Lane
Peter Geoghegan writes: > On Sat, Jan 24, 2015 at 1:31 PM, Tom Lane wrote: >> Another idea is to teach Valgrind that whenever a backend reduces its >> pin count on a shared buffer to zero, that buffer should become undefined >> memory. > That should be fairly straightforward to implement. >> Bu

Re: [HACKERS] Shortcoming in CLOBBER_FREED_MEMORY coverage: disk buffer pointers

2015-01-24 Thread Peter Geoghegan
On Sat, Jan 24, 2015 at 1:31 PM, Tom Lane wrote: > Another idea is to teach Valgrind that whenever a backend reduces its > pin count on a shared buffer to zero, that buffer should become undefined > memory. That should be fairly straightforward to implement. > But I don't know if that will help

[HACKERS] Shortcoming in CLOBBER_FREED_MEMORY coverage: disk buffer pointers

2015-01-24 Thread Tom Lane
While the CLOBBER_FREED_MEMORY hack does a fairly good job of catching stale pointers to already-freed memory, commit fd496129d160950e exhibits a case that is not caught at all: RelationBuildRowSecurity was copying *pointers into disk buffers* into backend-local relcaches. This would of course wor

Re: [HACKERS] numeric access out of bounds

2015-01-24 Thread Tom Lane
Andrew Gierth writes: > I can see two possible fixes: one to correct the assumptions in the > macros, the other to check for NaN before calling init_var_from_num in > numeric_send (all the other functions seem to do this check explicitly). > Which would be preferable? I'm inclined to think specia

[HACKERS] numeric access out of bounds

2015-01-24 Thread Andrew Gierth
Happened to notice this: postgres=# select numeric_send('NaN'); numeric_send \x7f7ec000 (1 row) 7f7e obviously screams "accessing memory beyond the end of data", and indeed this is so: init_var_from_num, when passed a NaN, accesses two bytes after the input.

Re: [HACKERS] hung backends stuck in spinlock heavy endless loop

2015-01-24 Thread Martijn van Oosterhout
On Thu, Jan 22, 2015 at 03:50:03PM -0600, Merlin Moncure wrote: > Quick update: not done yet, but I'm making consistent progress, with > several false starts. (for example, I had a .conf problem with the > new dynamic shared memory setting and git merrily bisected down to the > introduction of th

Re: [HACKERS] proposal: searching in array function - array_position

2015-01-24 Thread Pavel Stehule
Hi with array_offsets - returns a array of offsets Regards Pavel 2015-01-20 21:32 GMT+01:00 Jim Nasby : > On 1/20/15 11:12 AM, Pavel Stehule wrote: > >> I am sending updated version - it allow third optional argument that >> specify where searching should to start. With it is possible repeatab