Re: [GENERAL]silent install

2007-10-12 Thread longlong
2007/10/12, Richard Huxton <[EMAIL PROTECTED]>: > > Please remember to cc: the list. sorry. The first result of that search is this page: > http://pgfoundry.org/pipermail/pginstaller-devel/2005-November/000712.html > If you read the next couple of messages you get to this page: > http://pgfoundr

[GENERAL] how to truncate/purge the pg_xlog directory?

2007-10-12 Thread tfinneid
Hi As far as I understand pg_xlog is the transaction log i.e. the WAL. I have a pg 8.2 which has consumed about 113MB in pg_xlog/, while the cluster is virtually empty. There are a couple of tables in the postgres schema, but they contain no data at the moment. My disk is filling up and I want t

Re: [GENERAL] how to truncate/purge the pg_xlog directory?

2007-10-12 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Hi As far as I understand pg_xlog is the transaction log i.e. the WAL. Correct. And it should have files called e.g. 0001000500E9 each 16MB long. I have a pg 8.2 which has consumed about 113MB in pg_xlog/, while the cluster is virtually empty. OK, so

[GENERAL] pg_dump - schema diff compatibility

2007-10-12 Thread Tomi N/A
Looking at the mailing list archive, this is just one in a rather long line of questions regarding diffing db schema dumps, but I've been unable to find what I was looking for in any of the prior conversations. I know of apgdiff (seems to work very nicely) and of other specialized pg diff tools (as

Re: [GENERAL] how to truncate/purge the pg_xlog directory?

2007-10-12 Thread tfinneid
> As checkpoints are issued, old WAL files will either be recycled > (renamed) or deleted. Change the setting, then try (as user postgres) > issuing a "vacuum full " followed by "SELECT pg_switch_xlog()" that > should recycle them quicker. That'll only get you down to 3 or 4 files > though - that's

Re: [GENERAL] Coercing compound types to use generic ROW comparison operators

2007-10-12 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > AIUI, the biggest problem with the current behavior is that there is > no way to usefully index composite types, it looks like > create index bar_idx on bar(f); > create index bar_idx on bar((f).*); > create index bar_idx on bar((f).a, (f).b); The la

Re: [GENERAL] Query problem

2007-10-12 Thread Rodrigo De León
On 10/12/07, Clemens Schwaighofer <[EMAIL PROTECTED]> wrote: > I probably need to approach the problem different. So both are read > "independent" or something like this. Also, email_a, email_b, etc. indicate that you need to consider refactoring your schema. You can find a lot of tutorials on no

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Richard Huxton
Tom Lane wrote: Richard Huxton <[EMAIL PROTECTED]> writes: Hmm - I can't think how that could reach 1.9GB in size, especially since it has to be something different between a "raw" connection and how ODBC is doing things. Try turning on log_statement to see what's really being executed. I see

Re: [GENERAL] DB errors

2007-10-12 Thread Filip Rembiałkowski
2007/10/12, Akash Garg <[EMAIL PROTECTED]>: > We had a crash of one of our db systems last night. After doing a fsck of > he file system and getting the db backup, we're getting a lot of these > messages in our logs. The DB will also occasionally crash now. > > Oct 12 07:40:16 postgres[30770]: [3

[GENERAL] Detailed logging, but only for one user?

2007-10-12 Thread Michael Nolan
Is there any way to enable detailed logging (ie, at the SQL statement level) but only for one user? -- Mike Nolan

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Relyea, Mike
> From: Richard Huxton [mailto:[EMAIL PROTECTED] > > MessageContext: 1946198040 total in 258 blocks; 26624 free (43 > > chunks); > > 1946171416 used > > Well, I don't have to be a developer to know that if there's > a memory problem it's that big number starting 1946... that's > the problem. I

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Richard Huxton
Relyea, Mike wrote: From: Richard Huxton [mailto:[EMAIL PROTECTED] Do you see a backend process growing to 2GB+ before failure? I'm running PG 8.2.4 on WinXP. I used the task manager (as a quick and dirty utility) to watch the memory usage of the backend and it seemed to peak around 1.2GB.

Re: [GENERAL] DB errors

2007-10-12 Thread Alan Hodgson
On Friday 12 October 2007, "Akash Garg" <[EMAIL PROTECTED]> wrote: > We had a crash of one of our db systems last night. After doing a fsck > of he file system and getting the db backup, we're getting a lot of these > messages in our logs. The DB will also occasionally crash now. > > Oct 12 07:40

Re: [GENERAL] DB errors

2007-10-12 Thread Akash Garg
8.2 On 10/12/07, Filip Rembiałkowski <[EMAIL PROTECTED]> wrote: > > 2007/10/12, Akash Garg <[EMAIL PROTECTED]>: > > We had a crash of one of our db systems last night. After doing a fsck > of > > he file system and getting the db backup, we're getting a lot of these > > messages in our logs. The

[GENERAL] max_*, shared_buffers, and shared memory

2007-10-12 Thread Erik Jones
Hey, everyone, a quick shared memory. So, max_connections are ~400b per connection max_prepared_transactions are ~600b per prepared transaction for lock management the cost is in table slots in units of ~220b per table slot with total table slots = (max_locks_per_transaction + (max_connect

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > Hmm - I can't think how that could reach 1.9GB in size, especially since > it has to be something different between a "raw" connection and how ODBC > is doing things. Try turning on log_statement to see what's really being executed. I seem to recall r

Re: [GENERAL] Need advice on keeping backup database up to date

2007-10-12 Thread Richard Huxton
Matthew Wilson wrote: I am trying to figure out how I can keep the postgresql database in the backup data center as up to date as possible. The ideal solution would keep the backup database updated in real time as the primary database changes. What you are after is called "replication". There

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Richard Huxton
Relyea, Mike wrote: From: Richard Huxton [mailto:[EMAIL PROTECTED] Relyea, Mike wrote: If I execute this query in PGAdmin III it runs without any errors and returns no records. Hmm. So what's different about the queries? Nothing. The SQL is identical. I copied out of the log file and pas

Re: [GENERAL] Missing files under pg_data following power failure

2007-10-12 Thread Brad Nicholson
On Fri, 2007-10-12 at 10:54 -0500, Scott Marlowe wrote: > On 10/12/07, Jack Orenstein <[EMAIL PROTECTED]> wrote: > > Our testing involves cutting power to machines running postgres 7.4, > > while under load (lots of reads and writes). When we do this, we often > > lose some files under pg_data stor

Re: [GENERAL] not work in IE

2007-10-12 Thread SCassidy
Try checking the web server log. For example, if using apache, check /etc/httpd/logs/error_log, or the location your logs directory is installed. Very often web-based applications send STDERR to the web server log. Susan Cassidy manju arumugam <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECT

Re: [GENERAL] Coercing compound types to use generic ROW comparison operators

2007-10-12 Thread Merlin Moncure
On 10/12/07, Tom Lane <[EMAIL PROTECTED]> wrote: > "Merlin Moncure" <[EMAIL PROTECTED]> writes: > > AIUI, the biggest problem with the current behavior is that there is > > no way to usefully index composite types, it looks like > > > create index bar_idx on bar(f); > > create index bar_idx on bar(

Re: [GENERAL] Missing files under pg_data following power failure

2007-10-12 Thread Martijn van Oosterhout
On Fri, Oct 12, 2007 at 11:28:04AM -0400, Jack Orenstein wrote: > Our testing involves cutting power to machines running postgres 7.4, > while under load (lots of reads and writes). When we do this, we often > lose some files under pg_data storing table content. I.e., the file > named for a table's

Re: [GENERAL] not work in IE

2007-10-12 Thread Martin Gainty
if you give us the URL we can try from here M-- - Original Message - From: "Scott Marlowe" <[EMAIL PROTECTED]> To: "manju arumugam" <[EMAIL PROTECTED]> Cc: Sent: Friday, October 12, 2007 10:40 AM Subject: Re: [GENERAL] not work in IE > On 10/11/07, manju arumugam <[EMAIL PROTECTED]> wr

[GENERAL] DB errors

2007-10-12 Thread Akash Garg
We had a crash of one of our db systems last night. After doing a fsck of he file system and getting the db backup, we're getting a lot of these messages in our logs. The DB will also occasionally crash now. Oct 12 07:40:16 postgres[30770]: [3-1] 2007-10-12 07:40:16 PDTERROR: could not access s

Re: [GENERAL] not work in IE

2007-10-12 Thread Scott Marlowe
On 10/11/07, manju arumugam <[EMAIL PROTECTED]> wrote: > Hi, > > > In my site when am update the edit user info page its > prperly works in firefox .But not works in IE...But > the updation takes place in the database but the page > is not displayed...Wats the reason? You should go to a web site d

Re: [GENERAL] different date-time in base and in system

2007-10-12 Thread Richard Huxton
Alexander Kuprijanov wrote: $ date; echo 'select CURRENT_TIME;' | psql MyBase Fri Oct 12 14:51:10 MSD 2007 timetz 10:51:11.031388+00 I'm currently at a +1 hour offset from UTC, so. => set time zone 'UTC'; SET => SELECT current_timestamp;

[GENERAL] different date-time in base and in system

2007-10-12 Thread Alexander Kuprijanov
Hello I see this problem: $ date; echo 'select CURRENT_TIME;' | psql MyBase Fri Oct 12 14:51:10 MSD 2007 timetz 10:51:11.031388+00 (1 row) Can you please help, what I must do to correct it As I understand this is tom

Re: [GENERAL] how to truncate/purge the pg_xlog directory?

2007-10-12 Thread Richard Huxton
[EMAIL PROTECTED] wrote: As checkpoints are issued, old WAL files will either be recycled (renamed) or deleted. Change the setting, then try (as user postgres) issuing a "vacuum full " followed by "SELECT pg_switch_xlog()" that should recycle them quicker. That'll only get you down to 3 or 4 file

Re: [GENERAL] Need advice on keeping backup database up to date

2007-10-12 Thread Bill Moran
In response to Matthew Wilson <[EMAIL PROTECTED]>: > > I have been using postgresql for my web application for a while now and > it has been great. > > I want to set up a separate emergency failover server and database in a > different data center. > > In the event that my primary data center b

[GENERAL] Need advice on keeping backup database up to date

2007-10-12 Thread Matthew Wilson
I have been using postgresql for my web application for a while now and it has been great. I want to set up a separate emergency failover server and database in a different data center. In the event that my primary data center becomes inaccessible, I want to update a DNS record and then redirect

Re: [GENERAL] ORDER BY - problem with NULL values

2007-10-12 Thread Tommy Gildseth
Stefan Schwarzer wrote: Hi there, if I order a given year in DESCending ORDER, so that the highest values (of a given variable) for the countries are displayed at the top of the list, then actually the NULL values appear as first. Only below, I find the values ordered correctly. Is there an

Re: [GENERAL] how to truncate/purge the pg_xlog directory?

2007-10-12 Thread Richard Huxton
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: OK, so that's 7 files? What is your checkpoint_segments setting in postgresql.conf? If it's 3 then you can indeed expect a maximum of 7 WAL files. For a low-activity system you can always turn the setting down. The setting was not set, so I exp

Re: [GENERAL] how to truncate/purge the pg_xlog directory?

2007-10-12 Thread tfinneid
> [EMAIL PROTECTED] wrote: > > OK, so that's 7 files? > What is your checkpoint_segments setting in postgresql.conf? If it's 3 > then you can indeed expect a maximum of 7 WAL files. For a low-activity > system you can always turn the setting down. The setting was not set, so I expect that it used

[GENERAL] [OT] xkcd - A webcomic of romance, sarcasm, math, and language

2007-10-12 Thread John D. Burger
DB-related humor: http://xkcd.com/327/ - John D. Burger MITRE ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] replicating to a stopped server

2007-10-12 Thread Richard Huxton
Joao Miguel Ferreira wrote: Hello, I have a 'strange' situation: I need to make a replica copy of my database to a reduntant spare computer. The reduntant computer is not running postgres, but postgres is installed. The

Re: [GENERAL] Missing files under pg_data following power failure

2007-10-12 Thread Scott Marlowe
On 10/12/07, Jack Orenstein <[EMAIL PROTECTED]> wrote: > Our testing involves cutting power to machines running postgres 7.4, > while under load (lots of reads and writes). When we do this, we often > lose some files under pg_data storing table content. I.e., the file > named for a table's pg_class

[GENERAL] Missing files under pg_data following power failure

2007-10-12 Thread Jack Orenstein
Our testing involves cutting power to machines running postgres 7.4, while under load (lots of reads and writes). When we do this, we often lose some files under pg_data storing table content. I.e., the file named for a table's pg_class.oid value is simply gone. This can affect many tables followi

Re: [GENERAL] ORDER BY - problem with NULL values

2007-10-12 Thread Nico Sabbi
Stefan Schwarzer ha scritto: From 8.3 beta release notes: - ORDER BY ... NULLS FIRST/LAST I think this is what you want right? Yes, indeed. Sounds great. unfortunately I am on 8.1. And wouldn't really want to migrate to 8.3 and beta for the moment order by 1 ? ---

Re: [GENERAL] Query problem

2007-10-12 Thread Pavel Stehule
2007/10/12, Clemens Schwaighofer <[EMAIL PROTECTED]>: > hi, > > thats the first time I am a bit confused by a query not working. > > I have this table: > > gullevek=# \d test > Table "public.test" > Column | Type| Modifiers > --

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Richard Huxton
Relyea, Mike wrote: I tried posting this to the OBC list but didn't get any responses, so I'm trying my luck here. I'm receiving an out of memory error when trying to execute a long, complex query involving many temp tables. I'm using psqlODBC ver 8.02.0500 and PG 8.2.4 on WinXP. I'm trying

[GENERAL] Query problem

2007-10-12 Thread Clemens Schwaighofer
hi, thats the first time I am a bit confused by a query not working. I have this table: gullevek=# \d test Table "public.test" Column | Type| Modifiers -+---+---

Re: [GENERAL] replicating to a stopped server

2007-10-12 Thread Erik Jones
On Oct 12, 2007, at 1:59 PM, Richard Huxton wrote: Joao Miguel Ferreira wrote: Hello, I have a 'strange' situation: I need to make a replica copy of my database to a reduntant spare computer. The reduntant computer is not runnin

Re: [GENERAL] disjoint union types

2007-10-12 Thread Sam Mason
On Wed, Oct 10, 2007 at 12:10:10PM -0500, Erik Jones wrote: > On Oct 10, 2007, at 11:42 AM, Sam Mason wrote: >> On Wed, Oct 10, 2007 at 05:02:36PM +0100, Ian Barber wrote: >>> CREATE TABLE shapes ( >>> shape_id serial PRIMARY KEY, >>> area real not null >>> ); >>> >>> CREATE TABLE circle ( >>> r

Re: [GENERAL] Coercing compound types to use generic ROW comparison operators

2007-10-12 Thread Merlin Moncure
On 10/11/07, Tom Lane <[EMAIL PROTECTED]> wrote: > Randall Lucas <[EMAIL PROTECTED]> writes: > > Still, this would fail in a nested situation because it wouldn't > > recurse (if col1 of the compound type were another compound type, > > ferinstance), as would your suggestion above. It might be wort

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Relyea, Mike
> From: Richard Huxton [mailto:[EMAIL PROTECTED] > > Relyea, Mike wrote: >> If I execute this query in PGAdmin III it runs without any errors and returns no records. > > Hmm. So what's different about the queries? > Nothing. The SQL is identical. I copied out of the log file and pasted into

Re: [GENERAL] Out of memory with ODBC

2007-10-12 Thread Relyea, Mike
> From: Richard Huxton [mailto:[EMAIL PROTECTED] > Relyea, Mike wrote: > > This seems to be a problem with the ODBC driver? How can I narrow > > that down further? > > Well, first make 100% certain the query being executed is the > one you see being sent from Access. > > If so, the next obvio

Re: [GENERAL] DB errors

2007-10-12 Thread Scott Marlowe
On 10/12/07, Akash Garg <[EMAIL PROTECTED]> wrote: > We had a crash of one of our db systems last night. After doing a fsck of > he file system and getting the db backup, we're getting a lot of these > messages in our logs. The DB will also occasionally crash now. > > Oct 12 07:40:16 postgres[307

Re: [GENERAL] Query problem

2007-10-12 Thread Clemens Schwaighofer
On 2007/10/12, at 23:22, Pavel Stehule wrote: you get 0 rows. [EMAIL PROTECTED] isn't anywhere and [EMAIL PROTECTED] cannot do pair with any. else 0 * 1 = 0 Thanks, go it now. Basically very simple. I probably need to approach the problem different. So both are read "independent" or som

[GENERAL] replicating to a stopped server

2007-10-12 Thread Joao Miguel Ferreira
Hello, I have a 'strange' situation: I need to make a replica copy of my database to a reduntant spare computer. The reduntant computer is not running postgres, but postgres is installed. The redundant computer is running in

Re: [GENERAL] Detailed logging, but only for one user?

2007-10-12 Thread Richard Huxton
Michael Nolan wrote: Is there any way to enable detailed logging (ie, at the SQL statement level) but only for one user? ALTER ROLE SET = ; ALTER USER SET = ; -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 3: Have you checked

Re: [GENERAL] [OT] xkcd - A webcomic of romance, sarcasm, math, and language

2007-10-12 Thread Jack Orenstein
Erik Jones wrote: On Oct 12, 2007, at 2:40 PM, John D. Burger wrote: DB-related humor: http://xkcd.com/327/ Sanitize database inputs, by all means, but also use prepared statements. Jack Orenstein ---(end of broadcast)--- TIP 4: Have you se

Re: [GENERAL] [OT] xkcd - A webcomic of romance, sarcasm, math, and language

2007-10-12 Thread Erik Jones
On Oct 12, 2007, at 2:40 PM, John D. Burger wrote: DB-related humor: http://xkcd.com/327/ Yes, there have been many great xkcd comics, but that one should go down in history. Erik Jones Software Developer | Emma® [EMAIL PROTECTED] 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma h

[GENERAL] Guideline on use of temporary tables

2007-10-12 Thread Jimmy Choi
I'm looking for general guideline on the use of temporary tables. I would like to use temporary table as a caching mechanism to speed up queries within the same session. Specifically, a temporary table is created to store a subset of data from a possibly large table, and subsequent queries select

[GENERAL] can I define own variables?

2007-10-12 Thread Andreas
Hi, can I define connection-global variables within a ODBC connection ? Like that: connect to the DB set my_user_id = 42 Later a trigger would set a timestamp and the user-id when a record gets updated. obviously different connections would need differnt variable-values. the variable should

Re: [GENERAL] can I define own variables?

2007-10-12 Thread brian
Andreas wrote: Hi, can I define connection-global variables within a ODBC connection ? Like that: connect to the DB set my_user_id = 42 Later a trigger would set a timestamp and the user-id when a record gets updated. obviously different connections would need differnt variable-values. the

Re: [GENERAL] can I define own variables?

2007-10-12 Thread Sam Mason
On Sat, Oct 13, 2007 at 12:18:45AM +0200, Andreas wrote: > can I define connection-global variables within a ODBC connection ? You could use a temporary table, keyed on the variable name. Not particularly nice to use, but it works. You can create accessor functions reasonably easily if you want.

Re: [GENERAL] can I define own variables?

2007-10-12 Thread Tom Lane
Sam Mason <[EMAIL PROTECTED]> writes: > On Sat, Oct 13, 2007 at 12:18:45AM +0200, Andreas wrote: >> can I define connection-global variables within a ODBC connection ? > You could use a temporary table, keyed on the variable name. Not > particularly nice to use, but it works. You can create acce

[GENERAL] convert binary string to datum

2007-10-12 Thread Ron Peterson
How does one convert an octet string (e.g. something like a varlena structure) to a Datum? I want to create datums for use w/ heap_form_tuple in a function returning a tuple containing bytea representations of very large integers. TIA -- Ron Peterson https://www.yellowbank.com/ ---

Re: [GENERAL] can I define own variables?

2007-10-12 Thread Guy Rouillier
Tom Lane wrote: Sam Mason <[EMAIL PROTECTED]> writes: On Sat, Oct 13, 2007 at 12:18:45AM +0200, Andreas wrote: can I define connection-global variables within a ODBC connection ? You could use a temporary table, keyed on the variable name. Not particularly nice to use, but it works. You ca

Re: [GENERAL] can I define own variables?

2007-10-12 Thread Tom Lane
Guy Rouillier <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Another possibility, if you only need to store and retrieve values >> and not do anything especially interesting with them, is to abuse >> the "custom GUC variable" facility. > I've had several occasions when a user-defined variable wo

Re: [GENERAL] convert binary string to datum

2007-10-12 Thread Ron Peterson
2007-10-12_22:22:32-0400 Ron Peterson <[EMAIL PROTECTED]>: > How does one convert an octet string (e.g. something like a varlena > structure) to a Datum? I want to create datums for use w/ > heap_form_tuple in a function returning a tuple containing bytea > representations of very large integers.

[GENERAL] contrib / fuzzystr documentation

2007-10-12 Thread brien colwell
hi all, Is there documentation for the contrib / fuzzystr module? I haven't been able to find it ... Thanks!

Re: [GENERAL] convert binary string to datum

2007-10-12 Thread Gregory Stark
"Ron Peterson" <[EMAIL PROTECTED]> writes: > Is this a legitimate/blessed way to go about it? > > aval = (bytea *)palloc( len + VARHDRSZ ); > VARATT_SIZEP(aval) = len + VARHDRSZ; > memcpy( VARDATA(aval), myrawdata, len ); > values[0] = PointerGetDatum(aval); > ...etc > tuple = heap_formtuple( tupd