Re: [GENERAL] C Function Memory Management

2012-12-12 Thread Martin French
> Usually I'd allocate the space in fcinfo->flinfo->fn_mcxt (which is a > query-lifespan context) and keep a pointer to it in > fcinfo->flinfo->fn_extra (which is a void * field that a C function > can do what it pleases with). There are plenty of examples in the > Postgres source code. If you ar

Re: [GENERAL] Looking for cooperators

2012-12-12 Thread yinminmin
For our product, actually, we are doing the both way. We added some facility functions into PostgreSQL make it become a customized product which is free. And charge professional service for user. We are trying to look for a potential cooperator to improve our product in technical area. For further

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Thomas Kellerer
Emi Lu wrote on 12.12.2012 17:17: Good morning, Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? All you need to do is to query the source database, then use ResultSet.getString() to obtain the data and use a PreparedStatement and PreparedStatemen

Re: [GENERAL] Deleting WAL archives and pg_xlog when there is not a shared drive

2012-12-12 Thread Yamen LA
Thanks for the input Jeff. The purpose is primarily automating failover (high-availability). There is no intention of using PITR. We decided to actually keep the WAL logs in the archive directory (until they start to pose a storage problem) and delete what's under pg_xlog (in the situation I a

Re: [GENERAL] Deleting WAL archives and pg_xlog when there is not a shared drive

2012-12-12 Thread Yamen LA
Thank you for your input. > From: gray...@gmail.com > Date: Tue, 11 Dec 2012 14:06:32 -0800 > Subject: Re: [GENERAL] Deleting WAL archives and pg_xlog when there is not a > shared drive > To: iya...@live.com > CC: pgsql-general@postgresql.org > > On Tue, Dec 11, 2012 at 9:37 AM, Eng. AlSamman

Re: [GENERAL] Columns defined not matching pg_attibute

2012-12-12 Thread Tom Lane
Justin Arnold writes: > Hey guys, having a bizarre issue I have not seen before and couldn't locate > anything via Google (though I might not be choosing the correct phrasing). Apparently, those last couple of rows in pg_attribute are visible to a regular MVCC scan but not to SnapshotNow scans.

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Paul Jungwirth
I don't think your Java code does what you think it does. You should read some more about how Java handles string encodings. Here is a method I wrote some years ago that might also help you. It converts streams, not strings, but what you need should be pretty close (and simpler): /** * Interp

Re: [GENERAL] NOTIFY/LISTEN on server, asynchronous processing

2012-12-12 Thread Sergey Konoplev
On Tue, Dec 11, 2012 at 1:48 PM, rektide wrote: > PgQ looks like cool technology, but it still violates the #1 thing I'm > looking for, which is > a postgres-only solution. I don't see any reason why I'd want an external > daemon ticking > the system over, and I'm hoping perhaps there's some way

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Emi Lu
Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? JAVA codes work for most of characters, but not "-È". Someone knows why the following codes cannot load "-È" to mysql@latin1? Thanks a lot! -- public static String utf8_to_latin1(String str) thro

Re: [GENERAL] large database

2012-12-12 Thread Mihai Popa
Another question is whether there's a particular reason that you're converting to CSV prior to importing the data? All major ETL tools that I know of, including the major open source ones (Pentaho / Talend) can move data directly from Access databases to Postgresql. Yes, I wish somebody ask

Re: [GENERAL] C Function Memory Management

2012-12-12 Thread Tom Lane
Martin French writes: > So out of curiosity, what would be your approach for data preservation > cross call? Usually I'd allocate the space in fcinfo->flinfo->fn_mcxt (which is a query-lifespan context) and keep a pointer to it in fcinfo->flinfo->fn_extra (which is a void * field that a C functi

Re: [GENERAL] Columns defined not matching pg_attibute

2012-12-12 Thread Adrian Klaver
On 12/12/2012 07:46 AM, Justin Arnold wrote: Hey guys, having a bizarre issue I have not seen before and couldn't locate anything via Google (though I might not be choosing the correct phrasing). We have a table being dumped via pg_dumpall that is receiving the error... pg_dump: SQL command fail

Re: [GENERAL] Deleting WAL archives and pg_xlog when there is not a shared drive

2012-12-12 Thread Jeff Janes
On Tue, Dec 11, 2012 at 9:37 AM, Eng. AlSamman wrote: > Hello everyone, > > I am trying to implement a high-availability cluster using only two nodes, > without any shared disk storage. > > In my implementation, the primary database has continuous archiving set up > to a directory residing on the

[GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Emi Lu
Good morning, Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? Thanks a lot! Emi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Columns defined not matching pg_attibute

2012-12-12 Thread Justin Arnold
Hey guys, having a bizarre issue I have not seen before and couldn't locate anything via Google (though I might not be choosing the correct phrasing). We have a table being dumped via pg_dumpall that is receiving the error... pg_dump: SQL command failed pg_dump: Error message from server: ERROR:

Re: [GENERAL] C Function Memory Management

2012-12-12 Thread Martin French
> > One thing to know about it is that repalloc re-sizes the given chunk > while keeping it in the same memory context it was originally allocated > in (ie, CurrentMemoryContext doesn't matter). This may not matter much > if you're only dealing with allocations that just live as long as the > cur

Re: [GENERAL] C Function Memory Management

2012-12-12 Thread Tom Lane
Martin French writes: >> repalloc > Maybe I should've looked a little harder for that one! Ha Ha! > I assume it's an exact functional copy of realloc, and see where I get > with it! One thing to know about it is that repalloc re-sizes the given chunk while keeping it in the same memory context

Re: [GENERAL] Looking for cooperators

2012-12-12 Thread wd
Seems they fork from postgres, pgadmin and rename them to highgo and hgadmin, but didn't announce this anywhere. (Merlln, sorry for the individual mail) On Tue, Dec 11, 2012 at 10:31 PM, Merlin Moncure wrote: > On Mon, Dec 10, 2012 at 7:02 PM, Fan, Yi wrote: > > To whom it my concern, > > > >

Re: [GENERAL] NOTIFY/LISTEN on server, asynchronous processing

2012-12-12 Thread Sim Zacks
I have experience with LIsten/Notify and as you mention the only problem is that I need a server side client that calls the listen and then calls a db function on the notify. One thought I had to do this completely in the database is to right notify

Re: [GENERAL] C Function Memory Management

2012-12-12 Thread Martin French
Hi Pavel > > yes, > > repalloc > Maybe I should've looked a little harder for that one! Ha Ha! I assume it's an exact functional copy of realloc, and see where I get with it! Many Thanks. = Romax Technology Limited Rutherford House Nottingham Sc

Re: [GENERAL] C Function Memory Management

2012-12-12 Thread Pavel Stehule
Hello 2012/12/12 Martin French : > Ok, so just a (hopefully) quick question. > > I know that I should be using the Postgres function palloc in place of > malloc, but what about realloc? Is there an equivalent? yes, repalloc Regards Pavel Stehule > > Thanks. >

[GENERAL] C Function Memory Management

2012-12-12 Thread Martin French
Ok, so just a (hopefully) quick question. I know that I should be using the Postgres function palloc in place of malloc, but what about realloc? Is there an equivalent? Thanks. = Romax Technology Limited Rutherford House Nottingham Science & Technolo

Re: [GENERAL] effective_cache_size and work_ram

2012-12-12 Thread a...@hsk.hk
Hi, yes it is a dedicated server. and THANKS! On 12 Dec 2012, at 3:55 PM, Pavel Stehule wrote: > hello > > 2012/12/12 a...@hsk.hk : >> Hi, >> >> I have a new server for PostgreSQL 9.2.2 with 8GB physical RAM, I want to >> turn the server with the following changes from default: >> >> max