[GENERAL] Multiple call handlers per language

2014-12-05 Thread Kelly Burkhart
Hello, our production database has existed for quite a few years and been dumped/restored several times for hardware or postgresql upgrades. Original version was late 7 or early 8, we're currently on 8.4.2. I noticed on our production database I have two call handlers for plpgsql and for plpython;

Re: [GENERAL] Binary params in libpq

2011-03-01 Thread Kelly Burkhart
On Mon, Feb 28, 2011 at 8:42 AM, Merlin Moncure wrote: > On Sun, Feb 27, 2011 at 7:39 PM, Craig Ringer >> AFAIK, the `timestamp' type moved from a floating-point to an integer >> representation internally, which would've affected the binary protocol >> representation. That was even a compile-time

Re: [GENERAL] libpq sendQuery -- getResult not returning until all queries complete

2010-12-22 Thread Kelly Burkhart
On Wed, Dec 22, 2010 at 9:18 AM, Merlin Moncure wrote: > On Wed, Dec 22, 2010 at 10:07 AM, Kelly Burkhart > wrote: >> On Tue, Dec 21, 2010 at 6:11 PM, Tom Lane wrote: >>> Merlin Moncure writes: >>>> On Tue, Dec 21, 2010 at 6:49 PM, Tom Lane wrote: >>>

Re: [GENERAL] libpq sendQuery -- getResult not returning until all queries complete

2010-12-22 Thread Kelly Burkhart
On Tue, Dec 21, 2010 at 6:11 PM, Tom Lane wrote: > Merlin Moncure writes: >> On Tue, Dec 21, 2010 at 6:49 PM, Tom Lane wrote: >>> If you just unconditionally flush there, it will result in an extra >>> network message in the normal case where there's not another query >>> to do.  The current cod

Re: [GENERAL] libpq sendQuery -- getResult not returning until all queries complete

2010-12-21 Thread Kelly Burkhart
This should do it: #include #include #include #define CONNINFO "your info here" #define COMMANDS "select current_timestamp; select pg_sleep(5); select current_timestamp" void fatal( const char *msg ) { fprintf( stderr, "%s\n", msg ); exit(1); } int main() { PGresult *res = 0; PGconn

Re: [GENERAL] libpq sendQuery -- getResult not returning until all queries complete

2010-12-21 Thread Kelly Burkhart
Yes, I omitted the PQclear for simplicity. I'm not concurrently executing queries, I'm sending multiple queries to be executed serially by the backend. I'm expecting the server to send me the PQresult objects as each query completes rather than sending them all *after* all of the queries have com

[GENERAL] libpq sendQuery -- getResult not returning until all queries complete

2010-12-21 Thread Kelly Burkhart
Hello, I'm sending a group of queries to the database with PQsendQuery and using PQgetResult to return results similar to this: PQsendQuery( "select current_timestamp; select pg_sleep(1); select current_timestamp" ); while( result = PQgetResult() ) doSomethingWith( result ) I'm finding that

Re: [GENERAL] Backend Crash v8.4.2

2010-06-30 Thread Kelly Burkhart
On Wed, Jun 30, 2010 at 11:07 AM, Tom Lane wrote: > Best guess from here is that you managed to run into some sort of > cache-reload bug; those are very sensitive to concurrent operations > since you only see them when a shared cache inval event happens at > just the wrong time.  I would recommend

Re: [GENERAL] Backend Crash v8.4.2

2010-06-30 Thread Kelly Burkhart
On Tue, Jun 29, 2010 at 9:34 AM, Tom Lane wrote: > Kelly Burkhart writes: >> The crash left a core file, does the stack trace indicate anything crucial? > >> (gdb) where >> #0  0x0068d884 in SearchCatCacheList () >> #1  0x0001 in ?? () >> #

[GENERAL] Backend Crash v8.4.2

2010-06-29 Thread Kelly Burkhart
Hello, We had a backend crash this morning. Version is PostgreSQL 8.4.2 running on openSuSE 11.2. This machine is connected via iSCSI to a Dell Equallogic array. We've been running 8.4.2 since February (I believe) without issue, although we've recently upgraded this machine from 24G to 72G RAM.

[GENERAL] Catalog table with cursor definition

2010-06-16 Thread Kelly Burkhart
Is there a catalog table or function to get the text of the query associated with a cursor? If I query pg_stat_activity all I see is 'fetch forward 1000 from XYZ'. -K -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq

[GENERAL] pg/linux How much swap relative to physical memory is needed?

2010-06-10 Thread Kelly Burkhart
We have an openSUSE 11.2 machine running PostgreSQL 8.4.2 that we recently upgraded from 24 to 74G RAM.  We have a single swap partition of 2G that free tells us is completely used.  I don't see any swap IO when I run vmstat at reasonably busy points in the day (although it must happen some time...

[GENERAL] synchronous_commit and mvcc

2009-08-12 Thread Kelly Burkhart
Hello, We have synchronous_commit=off in our postgresql.conf file. Does this setting affect mvcc? For instance if I have two connections from processes on different machines that do the following: c1 begins transaction c1 inserts rows into table c1 commits transaction c2 begins transaction c2 q

Re: [GENERAL] Alter definition of a column

2007-01-20 Thread Kelly Burkhart
On 1/20/07, Shoaib Mir <[EMAIL PROTECTED]> wrote: Should help --> ALTER TABLE tablename ALTER columname TYPE text; I was looking for a way to alter a column from varchar(n) to text without using the alter command and consequently touching every single row. Below is sql which seems to work, but

Re: [GENERAL] Alter definition of a column

2007-01-19 Thread Kelly Burkhart
On 1/19/07, Martijn van Oosterhout wrote: ALTER TABLE, to be correct, actually has to check the entire table to make sure it's ok. By doing it directly you're basically telling the DB it's OK. For making a varchar column longer it's safe though, and the easiest way. Is it possible to use a s

Re: [GENERAL] Problems with sequences

2006-09-07 Thread Kelly Burkhart
On 9/6/06, Arturo Perez <[EMAIL PROTECTED]> wrote: What happens is that if I do a select nextval('seq') I get a number that's lower than the max primary key id. This is inspite of my doing SELECT setval('seq', ((SELECT MAX(seq_ID) FROM table)+1)) ALTER SEQUENCE seq RESTART WITH ; select

Re: [GENERAL] Listening on more than one port?

2006-08-30 Thread Kelly Burkhart
On 8/30/06, Michael Nolan <[EMAIL PROTECTED]> wrote: Situation in a nutshell: Production and test databases are on two separate systems inside the firewall. The web server is at an ISP, outside the firewall. The firewall sends all data coming from the ISP, port 5432 to a specific IP address i

Re: [GENERAL] default_index_tablespace?

2005-12-01 Thread Kelly Burkhart
On 12/1/05, Alexander M. Pravking <[EMAIL PROTECTED]> wrote: PostgreSQL 8.0 brought a great tablespaces feature. However, it's stilla real pain for one who wants to separate tables and indices to differenttablespaces: he has to do it manually, explicitely specifying tablespace for each index.Thus,

[GENERAL] Array of created types

2005-09-01 Thread Kelly Burkhart
Should something similar to the following be possible in PG 8.0.3? create type foo_t as ( c1 int, c2 int ); create table tab ( name varchar not null, foos foo_t[] ); The response I get is: ERROR: type "foo_t[]" does not exist The create type documentation says that postgres silently create

Re: [GENERAL] optimum settings for dedicated box

2005-09-01 Thread Kelly Burkhart
On Wed, 2005-08-31 at 00:50 -0700, Matthew Peter wrote: > Hmmm. I was thinking of a more comprehensive solution > or document resource. I would like to know what does > what. Why tweak that or why not to ya know? Matt, I've found the annotated postgresql.conf references on this page (as well as r

[GENERAL] C++-Language Function/Process List

2005-05-23 Thread Kelly Burkhart
I've written a simple function to return a list of processes running on the server. The function uses the Linux /proc filesystem, so is not portable. Usage is like this: tradebot01@ [local] => select * from tb_ps() where command like '%post%'; pid | username |command

[GENERAL] Finding IP of front end

2005-05-20 Thread Kelly Burkhart
Is there a way to query for the IP address (or other attributes) of the front-end process attached to a given backend? Perhaps something similar to: pg_stat_get_frontend_*( backendid ) -K ---(end of broadcast)--- TIP 9: the planner will ignore you