[GENERAL] streaming replication across platforms

2015-03-05 Thread Alan Nilsson
Is it possible to use streaming replication across different platforms (OSX/linux)? As I read it, you must use a file system level base backup to setup the slave. I ran into problems trying pg_basebackup and, as was pointed out, that is not supported. So will a tarball or any other file syste

Re: [GENERAL] pgxs question - linking c-functions to external libraries

2014-12-12 Thread Alan Nilsson
I recently had need to do the same thing and I am having no luck. Admittedly, I am not too keen on the postgres build setup and have not debugged this extensively, but rather hoped there was an easy answer up front. That said…. I am trying to link libuuid into a custom extension, here is my ma

Re: [GENERAL] pgxs question - linking c-functions to external libraries

2014-12-12 Thread Alan Nilsson
Awesome - thanks Tom, works. alan > On Dec 12, 2014, at 1:06 PM, Tom Lane wrote: > > Alan Nilsson writes: >> I am trying to link libuuid into a custom extension, here is my make file >> (building PG 9.3.5 on CentOS 6.5 (GCC 4.4.7) fwiw): > >> MODULES = aitpow

[GENERAL] 'missing' data on replicate

2015-02-27 Thread Alan Nilsson
I have 4 machines in a cluster: 1 master & 2 replicates (hot standby mode) on OSX, 1 replicate (hot standby mode) on Linux (centos6.5). All replicates were created with pg_basebackup (+ X option). I have a table that returns no results when queried by the primary key on the replicate running o

Re: [GENERAL] 'missing' data on replicate

2015-02-27 Thread Alan Nilsson
Thank you for that, makes sense. Another fine example of RTFM! alan > On Feb 27, 2015, at 10:04 AM, David G Johnston > wrote: > > Alan Nilsson wrote >> I have 4 machines in a cluster: 1 master & 2 replicates (hot standby mode) >> on OSX, 1 replicate (hot stand

[GENERAL] Need an explanation

2013-05-07 Thread Alan Nilsson
Could someone explain to me what I'm missing here. Given the following 3 queries: mqsql01.automation > select count(asp_id) from asps where asp_id>9 and asp_id not in (select asp_id from dasp where asp_id>1); count --- 84 (1 row) mqsql01.automation > select count(asp_id) from asp

Re: [GENERAL] Need an explanation

2013-05-07 Thread Alan Nilsson
that was indeed the case. Did not think to look at that, thanks much for the kick :) alan On May 7, 2013, at 7:30 PM, Tom Lane wrote: > Alan Nilsson writes: >> Could someone explain to me what I'm missing here. > > Probably there are some NULLs in dasp.asp_id. NOT IN c

[GENERAL] variadic args to C functions

2013-06-19 Thread Alan Nilsson
Has anyone got any pointers on implementing a C function in an extension that takes variadic args? I would like to do something like: select my_function(XXX,...); where XXX will be between 1 and many integers. Possible? I didn't see any examples in the contrib directory. -- Sent via pgsq

Re: [GENERAL] variadic args to C functions

2013-06-21 Thread Alan Nilsson
| text, VARIADIC "any" | normal > (3 rows) > > look to http://okbob.blogspot.cz/2010/11/new-version-of-pst-collection-is.html > source code (string functions) > > Code should be same without differences between external and internal > functions. > > Regards > >

Re: [GENERAL] psql client memory usage

2013-09-09 Thread Alan Nilsson
On Sep 6, 2013, at 6:56 AM, Merlin Moncure wrote: > On Fri, Sep 6, 2013 at 8:19 AM, Tim Kane wrote: >> Ahh. All these years (albeit sporadic), I never knew about FETCH_COUNT. >> That makes sense. Thanks muchly. > > Not your fault: FETCH_COUNT is a hack IMO. The real issue was that > libpq (un

Re: [GENERAL] Segmentation fault: pg_upgrade 9.1 to 9.3: pg_dump: row number 0 is out of range 0..-1

2013-10-25 Thread Alan Nilsson
I ran into something tonight that seems relevant here, or certainly related: I recently updated my app(s) libpq version from 9.1 to 9.3 and immediately I starting seeing: row number 0 is out of range 0..-1 spewed to stdout. I traced it down to this code: if (PQresultStatus(result) ==

Re: [GENERAL] Segmentation fault: pg_upgrade 9.1 to 9.3: pg_dump: row number 0 is out of range 0..-1

2013-10-26 Thread Alan Nilsson
ly I mangle the use of libpq, it should not be sending anything to stdout. alan On Oct 26, 2013, at 6:53 AM, Tom Lane wrote: > Alan Nilsson writes: >> I ran into something tonight that seems relevant here, or certainly related: >> I recently updated my app(s) libpq version

[GENERAL] pg_basebackup failing

2014-01-14 Thread Alan Nilsson
Could someone give me some insight to the following error message: [mqsql06:/Volumes/SQL_Set] _postgres% pg_basebackup --user=replicate --host=mqsql03 -xP -Fp --pgdata=pgsql 19439890/65873894 kB (29%), 1/1 tablespace pg_basebackup: could not get transaction log end position from server: ERROR:

Re: [GENERAL] pg_basebackup failing

2014-01-15 Thread Alan Nilsson
Thanks all alan On Jan 15, 2014, at 6:30 AM, Michael Paquier wrote: > > > > On Wed, Jan 15, 2014 at 8:05 PM, Sameer Kumar wrote: > The error you are seeing is triggered because this relation file > exceeds MAX_TAR_MEMBER_FILELEN or 8GB for a single tar member, which > is as well the norm fo

[GENERAL] pg_basebackup and checkpoints

2014-02-05 Thread Alan Nilsson
I tried (and finally succeeded) to do a base backup tonight using pg_basebackup. I was backing up a server that had no activity on it. The backup connected but no data was transferring, both ends sitting idle. It finally occurred to me to try a manual checkpoint and it then the backup took

[GENERAL] shared memory allocation - C function

2014-04-16 Thread Alan Nilsson
Is it possible to allocate a small chunk of shared memory outside of any pools(i.e. manually alloced & de-alloced) that is visible to all processes? I would like a small amount to store a mutex and a condition variable that is accessible in a c function from any process. Is there an SPI/API to

Re: [GENERAL] shared memory allocation - C function

2014-04-17 Thread Alan Nilsson
Perfect, thank you. On Apr 16, 2014, at 9:56 PM, Michael Paquier wrote: > On Thu, Apr 17, 2014 at 8:04 AM, Alan Nilsson wrote: > Is it possible to allocate a small chunk of shared memory outside of any > pools(i.e. manually alloced & de-alloced) that is visible to all processes

[GENERAL] logging hook

2014-05-13 Thread Alan Nilsson
All Is there a hook that someone could direct me to that I can use to redirect logging output? I.e. I would like to write a small module that pre loads and substitutes the loggers file descriptor with my own to redirect that output. Possible? thanks alan -- Sent via pgsql-general mailin

Re: [GENERAL] logging hook

2014-05-13 Thread Alan Nilsson
er you want with it. > > Susan > > > On Tue, May 13, 2014 at 2:29 PM, Alan Nilsson wrote: > All > > Is there a hook that someone could direct me to that I can use to redirect > logging output? I.e. I would like to write a small module that pre loads > and substitu

[GENERAL] Multiple Schema and extensions

2012-09-25 Thread Alan Nilsson
Is it the case that extensions can be added to only one schema? If so, what is the recommended practice for accessing a function from an extension in multiple schemas? Is it *ok* to load the extension in the pg_catalog schema so functions can be accessed by unqualified names? Is it *better* t

[GENERAL] Log rolling

2012-12-20 Thread Alan Nilsson
Is there any sql/psql command to force a log roll (i.e. start a new log file)? alan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general