[ADMIN] trigger ddl actions in a table

2007-11-15 Thread König, Monika
I need a way for logging every action on the system catalog. I must have a table which shows when a tables was created or updated or deleted. I need the date of the change . I tried to make an trigger on pg_catalog.pg_class but this throws an error : "ERROR: permission denied: "pg_class" is a s

Re: [ADMIN] Upgrading a database with pg_dumpall / psql ...

2007-11-15 Thread Marc G. Fournier
[EMAIL PROTECTED] (Paul Lambert) writes: >Marc G. Fournier From: wrote: >> This is one of those 'stupid questions I hate to ask' ... I've rechecked the >> docs to make sure I haven't missed something stupid, and unless I'm blind, >> I haven't ... >> >> I'm trying to upgrade a database from 8.1

Re: [ADMIN] Upgrading a database with pg_dumpall / psql ...

2007-11-15 Thread Paul Lambert
Marc G. Fournier From: wrote: This is one of those 'stupid questions I hate to ask' ... I've rechecked the docs to make sure I haven't missed something stupid, and unless I'm blind, I haven't ... I'm trying to upgrade a database from 8.1 -> 8.2 ... on a seperate server, with 8.2 pg_dump alread

Re: [ADMIN] Error: duplicate key violates unique constraint - "pg_toast_3270368541_index

2007-11-15 Thread Tomeh, Husam
Thanks Tom. As a temporarily solution though, would reorging the table (pgdump,drop/truncate, reload) resolve the OID collision issue and buy us some time until we get the upgrade going? Regards, Husam Tomeh -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wedne

Re: [ADMIN] functions pg_get...

2007-11-15 Thread Ilan Volow
I've found the queries at this link to be very good for getting detailed postgresql schema information (table columns, triggers, etc) http://www.alberton.info/postgresql_meta_info.html -- Ilan On Nov 15, 2007, at 10:33 AM, König, Monika wrote: I'm looking for a postgres-funtion that shows me

Re: [ADMIN] cached memory

2007-11-15 Thread Campbell, Lance
DJK, I used Oracle for quite a while myself. I found I had to think outside the box when looking at PostgreSQL. I maintain a very heavily used PostgreSQL database now. The key I found was for PostgreSQL 8.2.4: 1) Make sure to set effective_cache_size to how much memory PostgreSQL w

[ADMIN] PG Service won't start

2007-11-15 Thread Trent Pingenot
Hello list, I made a really dumb mistake of killing a fairly simple select query (no inserts or updates) that was taking way to long to cancel. I foolishly killed the query by closing the window in PGAdmin3. Alas I figured it was time for a reboot so I rebooted. Upon reboot my PG Service won'

Re: [ADMIN] any way to make query use index?

2007-11-15 Thread Tom Lane
"Chris Hoover" <[EMAIL PROTECTED]> writes: > On Nov 15, 2007 11:25 AM, Tom Lane <[EMAIL PROTECTED]> wrote: >> If changing the queries seems impractical, you could add an index on >> rev_code::text, or reconsider the choice of column type. > how would you create this index? create index rev_code_t

Re: [ADMIN] functions pg_get...

2007-11-15 Thread Andrew Sullivan
On Thu, Nov 15, 2007 at 04:33:34PM +0100, "König, Monika" wrote: > I'm looking for a postgres-funtion that shows me the definition of a table. In psql, this is retrieved by \d [tablename]. By running psql -E, you'll be able to see how it generates that. (No, I'm not going to tell you, because I

[ADMIN] 2 problems

2007-11-15 Thread Lukas
Hello, I am running PostgreSQL 8.1.0 on Gentoo Linux, DB is replicated with Slon version 1.2.0. Fist problem started with one node, with stopped to replicate with such error: 2007-11-15 13:17:21 EET ERROR remoteWorkerThread_1: "insert into "public"."kainos" (paslaugos,laikai,abonimentas,kaina,

Re: [ADMIN] Error: duplicate key violates unique constraint - "pg_toast_3270368541_index

2007-11-15 Thread Tom Lane
"Tomeh, Husam" <[EMAIL PROTECTED]> writes: > We've started getting duplicate key violates unique constraint error on > one of the toast index starting last weekend. > PG version is 8.0 with postgis extension. Consider updating to something more recent. That problem was addressed in this 8.1-cycl

Re: [GENERAL] [ADMIN] "global/pg_control": Permission denied

2007-11-15 Thread Alvaro Herrera
Richard Broersma Jr wrote: > --- On Thu, 11/15/07, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > > > My desktop (acting as a db-server for my discipline's > > group) has it power cycled this morning at 4:10 > >... > > C:\Program > > Files\PostgreSQL\8.2\bin>2007-11-15 06:36:13 > > PANIC: could

Re: [ADMIN] help to Brazil

2007-11-15 Thread Kevin Grittner
>>> On Wed, Nov 14, 2007 at 4:08 PM, in message <[EMAIL PROTECTED]>, "Cristiano Marques" <[EMAIL PROTECTED]> wrote: > I have necessity of integrate a data base > Sybase and data base Postgresql. The propose is migration data of > approximate 7000 tables. > > I like make cluster of two bases. >

Re: [ADMIN] trigger ddl actions in a table

2007-11-15 Thread Andrew Sullivan
On Thu, Nov 15, 2007 at 04:29:51PM +0100, "König, Monika" wrote: > I can see all ddl in my log files, but > - there are even the errors in and > - i can't use it for a select There are logging options that should allow you to collect the DDL and then parse it. You could then load it

Re: [GENERAL] [ADMIN] "global/pg_control": Permission denied

2007-11-15 Thread Alvaro Herrera
Richard Broersma Jr wrote: > --- On Thu, 11/15/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > What is the problem with the file? > > I looked at the pg_control file, postgres had the proper permission to it. > > > Why is it not accessible to Postgres? > > My guess is that something (antivir

Re: [GENERAL] [ADMIN] "global/pg_control": Permission denied

2007-11-15 Thread Richard Broersma Jr
--- On Thu, 11/15/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > What is the problem with the file? I looked at the pg_control file, postgres had the proper permission to it. > Why is it not accessible to Postgres? > My guess is that something (antivirus?) was messing with > the file when the s

Re: [ADMIN] Error: duplicate key violates unique constraint - "pg_toast_3270368541_index

2007-11-15 Thread Tom Lane
"Tomeh, Husam" <[EMAIL PROTECTED]> writes: > Thanks Tom. As a temporarily solution though, would reorging the table > (pgdump,drop/truncate, reload) resolve the OID collision issue and buy > us some time until we get the upgrade going? Probably. I wouldn't bother with pg_dump, just INSERT ... S

Re: [ADMIN] any way to make query use index?

2007-11-15 Thread Chris Hoover
On Nov 15, 2007 11:25 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > > Here is the table definition: > > CREATE TABLE rev_code_desc > > ( > > rev_code character(4) NOT NULL, > If changing the queries seems impractical, you could add an index on > rev_code::text, or reconsider the choice of column ty

Re: [ADMIN] any way to make query use index?

2007-11-15 Thread Tom Lane
"Chris Hoover" <[EMAIL PROTECTED]> writes: > SELECT rev_desc FROM rev_code_desc WHERE rev_code = lpad('0300', 4, '0') > Is there anyway to make postgres use an index on this query? > Here is the table definition: > CREATE TABLE rev_code_desc > ( > rev_code character(4) NOT NULL, Since rev_code

Re: [ADMIN] help to Brazil

2007-11-15 Thread jm
Listo. _ De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Cristiano Marques Enviado el: miércoles, 14 de noviembre de 2007 23:08 Para: pgsql-admin@postgresql.org Asunto: [ADMIN] help to Brazil Hello My name is Marques, Cristiano. I have necessity of integrate a data b

Re: [ADMIN] "global/pg_control": Permission denied

2007-11-15 Thread Richard Broersma Jr
--- On Thu, 11/15/07, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > My desktop (acting as a db-server for my discipline's > group) has it power cycled this morning at 4:10 >... > C:\Program > Files\PostgreSQL\8.2\bin>2007-11-15 06:36:13 > PANIC: could not open control file > "global/pg_control

[ADMIN] Upgrading a database with pg_dumpall / psql ...

2007-11-15 Thread Marc G. Fournier From
This is one of those 'stupid questions I hate to ask' ... I've rechecked the docs to make sure I haven't missed something stupid, and unless I'm blind, I haven't ... I'm trying to upgrade a database from 8.1 -> 8.2 ... on a seperate server, with 8.2 pg_dump already installed, I do: pg_dumpall

[ADMIN] functions pg_get...

2007-11-15 Thread König, Monika
I'm looking for a postgres-funtion that shows me the definition of a table. I found the -- pg_catalog.pg_get_viewdef(oid) -- pg_catalog.pg_get_constraintdef(oid) -- pg_catalog.pg_get_triggerdef(oid) -- pg_get_indexdef(oid) but I miss the same for a relation. Monika König --

[ADMIN] trigger ddl actions in a table

2007-11-15 Thread König, Monika
I need a way for logging every action on the system catalog. I must have a table which shows when a tables was created or updated or deleted. I need the date of the change . I tried to make an trigger on pg_catalog.pg_class but this throws an error : "ERROR: permission denied: "pg_class" is a sy

[ADMIN] any way to make query use index?

2007-11-15 Thread Chris Hoover
I am working through our application looking for ways to eliminate seq scans in our database. I am looking for some help with this query. SELECT rev_desc FROM rev_code_desc WHERE rev_code = lpad('0300', 4, '0') Is there anyway to make postgres use an index on this query? Here is the table defin

[ADMIN] "global/pg_control": Permission denied

2007-11-15 Thread Richard Broersma Jr
Last night, My desktop (acting as a db-server for my discipline's group) has it power cycled this morning at 4:10 (I am not sure what triggered the power cycle). When the computer restarted itself PostgreSQL failed to start on its own. I attempted to start it manually but encounter the follow

Re: [ADMIN] cached memory

2007-11-15 Thread dx k9
Hi Scott, Thanks for the reply. Top is showing 10157008 / 15897160 in kernel cache, so postgres is using 37% right now, following what you are saying. I realize the load isn't peaking right now, but wouldn't it be nice to have some of the indexes cached in memory? In your case 1868064 / 200

[ADMIN] help to Brazil

2007-11-15 Thread Cristiano Marques
Hello My name is Marques, Cristiano. I have necessity of integrate a data base Sybase and data base Postgresql. The propose is migration data of approximate 7000 tables. I like make cluster of two bases. Is possible? Help me, please. Tks

Re: [ADMIN] insufficient file descriptors on Mac OS X

2007-11-15 Thread Maximilian Tyrtania
Hi, > Maximilian Tyrtania <[EMAIL PROTECTED]> writes: >> <%2007-11-09 14:46:42 CETFATAL: 53000: insufficient file descriptors >> available to start server process > > This is not a shared-memory problem. > > On my Mac, ulimit -n seems to be 256 by default, and you've got > max_connections = 24