Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Manuel Sugawara wrote: > >> A friend is doing the queries right now but it takes time :-(, mean >> time I was wondering if it will be safe to apply the following patch >> just to get the database up and be able to run p

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Manuel Sugawara wrote: >> Alvaro Herrera <[EMAIL PROTECTED]> writes: >> >> > Hmm, nope -- take away the relnamespace check, because there is a >> > different namespace for each backend (pg_temp_2, pg_temp

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Hmm, nope -- take away the relnamespace check, because there is a > different namespace for each backend (pg_temp_2, pg_temp_3, etc). Still no luck, changed the query to: select relname, age(relfrozenxid) from pg_class join pg_namespace n on (n.oi

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-08 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Manuel Sugawara wrote: > > Hi Manuel, > >> The funny thing is that there was no open transactions, even after >> restarting the cluster the same message was logged. Today, the >> database stopped working as expected:

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-07 Thread Manuel Sugawara
Manuel Sugawara <[EMAIL PROTECTED]> writes: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > >> Hi Manuel, > > Hi Alvaro! > >> I suggest you look for temp tables that have not been reclaimed. >> We've had a couple of reports where leftover temp

Re: [GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-07 Thread Manuel Sugawara
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Hi Manuel, Hi Alvaro! > I suggest you look for temp tables that have not been reclaimed. > We've had a couple of reports where leftover temp tables have > stopped the frozen-xid counter from advancing. (They would have a > very old relfrozenxid.) Th

[GENERAL] Cannot use a standalone backend to VACUUM in "postgres""

2008-04-07 Thread Manuel Sugawara
We have a PostgreSQL 8.2.6 installation running for about six-months now. There was a lot of log entries saying (sometimes 10 or more in just one second): WARNING: oldest xmin is far in the past HINT: Close open transactions soon to avoid wraparound problems. (actually it was in Spanish but I t

Re: [GENERAL] Audit-trail engine inner-workings

2007-08-27 Thread Manuel Sugawara
"Marcelo de Moraes Serpa" <[EMAIL PROTECTED]> writes: > I know that this PostgreSQL C module has a static var that in turn keeps the > integer set by the function "set_session_id" - but is this var global to the > server's service ? Does PostgreSQL mantain one "instance" of this var per > requeste

Re: [GENERAL] FInding "corrupt" values in UTF-8 tables (regexp question, I think)

2007-08-17 Thread Manuel Sugawara
"Phoenix Kiula" <[EMAIL PROTECTED]> writes: > > select id, t_code > from traders > where t_code ~ '[^A-Za-z1-9\-\_]' > limit 100; > > This gives me an error: "ERROR: invalid regular expression: invalid > character range". Put the dash at the start of the character class: [^-A-Za-

Re: [GENERAL] permission denied for schema

2007-06-25 Thread Manuel Sugawara
Tom Lane <[EMAIL PROTECTED]> writes: > jef peeraer <[EMAIL PROTECTED]> writes: >> Tom Lane schreef: >>> That's a foreign-key check, which is supposed to be done as the owner of >>> the table. You did not show us who owns table clienten, but I think >>> that role must be missing the intended(?) me

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-04-25 Thread Manuel Sugawara
"Marcelo de Moraes Serpa" <[EMAIL PROTECTED]> writes: > Hi Manuel, > >> each time the user sends a request I do more or less the following: > > Could a trigger be used to implement this ? Or are you doing this from the > application layer? I'm doing it form the application layer and I don't thin

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-04-25 Thread Manuel Sugawara
Tilmann Singer <[EMAIL PROTECTED]> writes: > Can I define a view which references a table in a way so that it will > use a temporary table of the same name if it exists, otherwise the > permanent table with that name? I think you can use a plpgsql function with execute. For instance, if the name

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-04-25 Thread Manuel Sugawara
Tilmann Singer <[EMAIL PROTECTED]> writes: > So the view will reference the original table and not the temporary > table. Is there a way to achieve this kind of transaction local > setting? A transaction based solution would give more security in a > situation where a web app server uses a connect

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-04-25 Thread Manuel Sugawara
"Marcelo de Moraes Serpa" <[EMAIL PROTECTED]> writes: > I'm sorry Manuel, but after some time trying to fully understand your > approach, I think I really don't have the required elements to do so. > > How do you pass your application's usename to this table? Or you don't keep > the username at al

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-04-24 Thread Manuel Sugawara
"Marcelo de Moraes Serpa" <[EMAIL PROTECTED]> writes: > Hey guys, > > Mine is an web application - three tier. The app connects to the db using > only one user and it has it's own authentication system and doesn't > rely on the database for user management. I solved the problem using a C program

Re: [GENERAL] Slow query in 8.2.0

2006-12-13 Thread Manuel Sugawara
Tom Lane <[EMAIL PROTECTED]> writes: > 8.2 is a good bit more conservative than previous releases about > optimizing views involving volatile functions, so I'm wondering whether > that could have anything to do with it ... Oh well, you are indeed right, I went through the whole view hierarchy and

[GENERAL] Slow query in 8.2.0

2006-12-13 Thread Manuel Sugawara
Hi all, I have a query that use to work fine in 3 or 4 releases before 8.2 but now it's very slow, same database same data set, explain analyze follows: 8.2.0 ciencias=# explain analyze SELECT registro_id FROM vregacd.registro_trayectoria WHERE cuenta = '086521071' AND grupo_id = '160940';

Re: [GENERAL] Regular expressions w localization problem

2005-11-25 Thread Manuel Sugawara
Tom Lane <[EMAIL PROTECTED]> writes: > I believe the meanings of [[:upper:]] and friends depend on the > database locale, Indeed they depend on the locale settings, that's why this used to work. > and the current code for them probably doesn't work at all in > multibyte database encodings eithe

[GENERAL] Regular expressions w localization problem

2005-11-25 Thread Manuel Sugawara
I'm facing a problem I have seen before but never got the time to report until now that is biting me again. I have a table which has some CHECK constrains using regular expressions and one check is failing when I try to insert some valid data. The constraint definition is: «nombre propio válido» C

Re: [GENERAL] PostgreSQL 8.0 Feature List?

2004-08-16 Thread Manuel Sugawara
Richard Welty <[EMAIL PROTECTED]> writes: >String query > = "SELECT foo " > + "FROM bar " > + "WHERE baz = 'bletch';" This particular expression is rewritten by the compiler to use StringBuffer, so is equivalent to: >StringBuffer query = new StringBuffer(); > >query.a

Re: [GENERAL] [REPOST] Problem for dumping a 6.5.2 database

2003-07-03 Thread Manuel Sugawara
"Bruno BAGUETTE" <[EMAIL PROTECTED]> writes: > Hello, > > I'm trying to dump a PostgreSQL 6.5.2. database table in order to add it > in a PostgreSQL 7.3.3 database but I'm encountering some errors : You are using the pg_dump from 7.3 and the lastest version it supports is 7.0. Try using the 6.5.

Re: [GENERAL] 7.3.3 RPM build

2003-06-26 Thread Manuel Sugawara
Lamar Owen <[EMAIL PROTECTED]> writes: > If you want to help troubleshoot, look at the > filter-requires-perl-Pg.sh script (Source16) and see where it needs > to be invoked But ... contrib *depends* on perl (see contrib/rserv for instance). May be contrib is too generic. What about split it

Re: [GENERAL] Current database name

2001-06-05 Thread Manuel Sugawara
Alexander Solianic <[EMAIL PROTECTED]> writes: > Hi, Posgres Gurus! > > Does anybody know if there's a way to get name of the current > session's database in stored procedure, i.e. something like > CURRENT_USER variable? what's wrong with current_user? create function my_user() returns text as

Re: [GENERAL] timestamp goober

2001-02-08 Thread Manuel Sugawara
Culley Harrelson <[EMAIL PROTECTED]> writes: > columns with default timestamp('now') see to be > defaulting to the time I started posgresql! try using: default 'now' instead of: default timestamp('now') in your table definitions. The latter is evaluated by postgres just once, when the table is i