Re: [GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Alvaro Herrera
sing pg_standby, including cleanup of old logs; see https://projects.commandprompt.com/public/pitrtools Mind you, the WAL files are not stored in a database but in raw files. I have never seen anyone advocating the use of a database to store them. -- Alvaro Herrera

Re: [GENERAL] WAL and master multi-slave replication

2009-06-24 Thread Alvaro Herrera
shot before bringing it online, and then restoring that snapshot when you want to apply some more segments to bring it up to date (so from Postgres' point of view it seems like it was never brought up in the first place). -- Alvaro Herrerahttp://www.CommandPromp

Re: [GENERAL] example of aggregate function for product

2009-06-24 Thread Alvaro Herrera
ent function uses a plpgsql function and is self-contained. Other than that (and the fact that the second one is for averages not multiplication), both examples are technically identical ... -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company -

Re: [GENERAL] create a table inside a function

2009-06-25 Thread Alvaro Herrera
CHAR(512), locality VARCHAR(512)) WITH > > (OIDS=FALSE);'; > > EXECUTE 'ALTER TABLE sw.tmp_import OWNER TO usr_audit'; > > return false; > > END IF; Just leave out the EXECUTE and quotes. This example should work without them. -- Alvaro Herrera

Re: [GENERAL] PG 8.3.7 initdb -E LATIN1 fails on Windows

2009-06-25 Thread Alvaro Herrera
Abraham, Danny wrote: > Hi, > > Runnning: initdb -E LATIN1 -D . > > Error: encoding mismatch Right. Try using Win1252 instead of Latin1: initdb -E win1252 ... Or just leave -E out entirely, since it will be picked up by default from the locale setting anyway. --

Re: [GENERAL] planned recovery from a certain transaction

2009-06-25 Thread Alvaro Herrera
going to be painful too because restoring from a base backup is going to take long for your big tables. Lastly, you could use a filesystem snapshot taken just before the long procedure, to which to revert if you don't like how it went. -- Alvaro Herrerahttp

Re: [GENERAL] about pg_stat_get_db_xact_commit

2009-07-08 Thread Alvaro Herrera
transactions. (Also, each time you call the function it starts and commit a new transaction). -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] is autovacuum recommended?

2009-07-09 Thread Alvaro Herrera
pgrading to 8.4 may give you several benefits in this area. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Performance problem with low correlation data

2009-07-09 Thread Alvaro Herrera
id for one day, then next ne_id and so on until next day). > How is the "correlation" calculated? Can someone explain to me why, after the > procedure above,correlation is so low??? Did you run ANALYZE after the procedure above? -- Alvaro Herrerahtt

Re: [GENERAL] Overhead of union versus union all

2009-07-09 Thread Alvaro Herrera
an additional sort step, whereas UNION ALL does not need to uniquify its output and thus it can avoid the sort step. Using UNION ALL is recommended wherever possible. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.

Re: [GENERAL] BR/

2009-07-10 Thread Alvaro Herrera
ediately _above_ it, not the one below. So if you see this: LOG: foo bar LOCATION: somewhere line N ERROR: baz qux LOCATION: another line you know what to make of it, and it's not this: LOCATION: somewhere line N ERROR: baz qux -- Alvaro Herrerahttp://ww

Re: [GENERAL] how drop a role that owns stuff ?

2009-07-12 Thread Alvaro Herrera
NED (gives ownership to something else) and DROP OWNED (drops grants and removes objects owned). Normally you run both in that order. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mail

Re: [GENERAL] uuid_hash declaration

2009-07-13 Thread Alvaro Herrera
provide a C function named uuid_hash, which conflicts with the one in FreeBSD's libc. If that's the problem, my 2c is that uuid_hash is too generic a name to export and we should change ours. -- Alvaro Herrerahttp://www.CommandPrompt.com/ Th

Re: [GENERAL] Postgres 8.4 literal escaping

2009-07-13 Thread Alvaro Herrera
THEN '+'|| > regexp_replace( > regexp_replace( >regexp_replace($1, '[^0-9+()]', '', 'g') > , $$\(0\)||\(||\)$$, '', 'g') >

Re: [GENERAL] UUID datatype question

2009-07-13 Thread Alvaro Herrera
ts * (only the first format is used for output). We convert the first * two formats into the latter format before further processing. */ -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailin

Re: [GENERAL] Ascending / Descending Indexes

2009-07-14 Thread Alvaro Herrera
e btree index can be used for both cases. (Unless you want some columns ascending and other columns descending, in which case you need to work extra.) -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 supp

Re: [GENERAL] Best practices for moving UTF8 databases

2009-07-14 Thread Alvaro Herrera
ata? right. But > According to the OP his 8.3 database is UTF8... > So there should not be invalid data in there. I haven't followed this thread, but older PG versions had less strict checks on UTF8 data, which meant that some invalid data could creep in. -- Alvaro Herrera

Re: [GENERAL] Custom Class variables

2009-07-14 Thread Alvaro Herrera
do I access the values from the custom class in sql code? show iss.one; select current_setting('iss.one'); -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general maili

Re: [GENERAL] Automatic type conversion

2009-07-15 Thread Alvaro Herrera
CG wrote: > I could add the explicit type casts, but I'd rather find out what the > nature of the subtle (or not-so-subtle) difference I've stumbled upon > is... It's an intentional change, so adding typecasts is the appropriate solution. -- Alvaro Herrera

Re: [GENERAL] savepoints in 8.3.7 or whatever...

2009-07-15 Thread Alvaro Herrera
acle. There's a hard limit of 2^32 savepoints in a transaction, but you'll probably run into limits before that due to memory constraints (I think each savepoint will use at least 8kB). Anyway I suggest you do RELEASE SAVEPOINT after each insert to ensure resources are released

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Alvaro Herrera
sql-8.4/bin/pg_config > - --includedir-server) I suggest you rewrite your makefile to use PGXS. The problem might be a difference in CFLAGS. It would make the makefile a lot simpler too. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Compa

Re: [GENERAL] Autovacuum and pg_stat_reset()

2009-07-19 Thread Alvaro Herrera
d with updating the unrelated stats in pg_statistic, but it also sends dead/live tuple counts to pgstats which autovacuum relies on.) > Can the use of pg_stat_reset() affect performance in any way? Hmm, not sure. -- Alvaro Herrerahttp://www.CommandPrompt.com/ P

Re: [GENERAL] [PERFORM] Incr/Decr Integer

2009-07-19 Thread Alvaro Herrera
ttle deadlock problems if any, because no transaction needs to wait for another one to update the counter. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] Documentation Improvement suggestions

2009-07-20 Thread Alvaro Herrera
QL' in 'PostgresSQL' is hard to say and type. Everyone drops it > (even this list!). Why not change the official name? Again, it would make > googling and naming things easier. This is a taboo topic which has created the largest holy wars I've seen in this projec

Re: Help needed for reading postgres log : RE: [GENERAL] Concurrency issue under very heay loads

2009-07-20 Thread Alvaro Herrera
to do with a SQL-level COMMIT. If there were a true transaction commit you'd see a debug entry saying "CommitTransaction". You seem to be barking up the wrong tree here. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, C

Re: [GENERAL] psql \du [PATCH] extended \du with [+] - was missing

2009-07-22 Thread Alvaro Herrera
ot; \\du [PATRÓN] listar roles (usuarios)\n" and it needs to read instead: msgid " \\du[+] [PATTERN] list roles (users)\n" msgstr " \\du[+] [PATRÓN] listar roles (usuarios)\n" -- Alvaro Herrerahttp://www.CommandPrompt.com

Re: [GENERAL] psql \du [PATCH] extended \du with [+] - was missing

2009-07-22 Thread Alvaro Herrera
Tom Lane wrote: > We've never before expected patch submitters to patch the .po files, > and in fact I would have thought it would be useless to do so. The > masters are not in our CVS. Why is Andreas being told to worry about > this? I must admit I don't know :

Re: [GENERAL] synchronous_commit=off doesn't always return immediately

2009-07-26 Thread Alvaro Herrera
s is why Tom was suggesting you to increase wal_buffers. Did you try that? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] comparing NEW and OLD (any good this way?)

2009-07-26 Thread Alvaro Herrera
prominent link right at the start page that > links to that page and your excellent collection. Agreed, just added one. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (

Re: [GENERAL] Copying only incremental records to another DB..

2009-07-26 Thread Alvaro Herrera
ur config file specifies a data_directory other than the default one. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscri

Re: [GENERAL] Calculating the difference between timetz values

2009-07-28 Thread Alvaro Herrera
(or something like that), so what we want is to prevent such an update from happening. The problem being presented is not 23:32 > 00:32 but rather 23:32:23.0001 > 23:32:23.00012. On the border condition that 23:59:59.9 > 00:00:00.0 (which is obviously ambiguous) we just avoid t

Re: [GENERAL] Problems compiling contribs in Open Solaris

2009-07-29 Thread Alvaro Herrera
line 20: cannot find include file: > "xpath.c", line 21: cannot find include file: > "xpath.c", line 22: cannot find include file: You need to tell configure where to find libxml's headers (--with-includes). -- Alvaro Herrerahtt

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Alvaro Herrera
; analyze Hmm, does the tuning wizard not touch these? -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"

2009-08-03 Thread Alvaro Herrera
art in the latin codesets > - or to simple ignore wrong characters? Perhaps this is useful: http://wiki.postgresql.org/wiki/Strip_accents_from_strings -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql

Re: [GENERAL] character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"

2009-08-03 Thread Alvaro Herrera
e using the wrong tool for that purpose. Changing to a different encoding does not remove any diacritical marks, only change the underlying byte encoding. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 supp

Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Alvaro Herrera
es with the function name; and/or declare named blocks inside the function, and qualify the variables with the block name. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general m

Re: [GENERAL] Sequence Not created with pg_dump

2009-08-06 Thread Alvaro Herrera
. He means: are they output as SERIAL columns in the dump too? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] Does PERFORM hold a lock?

2009-08-11 Thread Alvaro Herrera
T FOR UPDATE). -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] trouble building pgbench on CentOS 5.3: /usr/bin/ld: cannot find -lpgport

2009-08-12 Thread Alvaro Herrera
at least the > src/port/ part. Sounds like a makefile bug to me. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] totally different plan when using partitions

2009-08-13 Thread Alvaro Herrera
gt;data.time between '2006-10-01 00:00:00' and '2006-10-06 00:00:00' > and data1.time >=cell_bsc.starttime and data1.time <=cell_bsc.endtime >anddata1.time between '2006-10-01 00:00:00' and '2006-10-06 > 00:00

Re: [GENERAL] multiple paramters in aggregate function

2009-08-13 Thread Alvaro Herrera
osterhout's tagged types? http://svana.org/kleptog/pgsql/taggedtypes.html -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] totally different plan when using partitions

2009-08-13 Thread Alvaro Herrera
> the root table. That's just a placeholder for the partitions. It will > never contain any data" when I create the tables. > > Otherwise the planner might get fooled by an empty table index scan in > a loop (which is what happens here), thi

Re: [GENERAL] licensing/distribution of DLL's question

2009-08-14 Thread Alvaro Herrera
gh I could include all of > postgres. You can do whatever suits your fancy. It is BSD-licensed. Just don't sue us and we're all set. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-

Re: [GENERAL] 8.4 rpm packaging problem?

2009-08-16 Thread Alvaro Herrera
languages, but not english. > > Intentional? > > English FAQ moved to wiki -- it is not even in 8.4.0 tarball. That's why > RPM's don't ship it. Huh, but the tarball does not contain the FAQs in other languages either. -- Alvaro Herrerahttp://

Re: [GENERAL] 8.4 rpm packaging problem?

2009-08-16 Thread Alvaro Herrera
Devrim GÜNDÜZ wrote: > On Sun, 2009-08-16 at 18:35 -0400, Alvaro Herrera wrote: > > Huh, but the tarball does not contain the FAQs in other languages > > either. > > See doc/src/FAQ directory in 8.4.0 tarball. Hmm, this is strange -- the directory is not there in CVS ... /

Re: [GENERAL] Generating random unique alphanumeric IDs

2009-08-16 Thread Alvaro Herrera
Ivan Sergio Borgonovo escribió: > Sometimes ago Daniel Verite posted an implementation of a fiestel > cipher in plpgsql. It's in the wiki, in the Snippets area. wiki.postgresql.org/wiki/Snippets (pseudo encrypt or something like that I think it's called) --

Re: [GENERAL] Function Logging

2009-08-17 Thread Alvaro Herrera
t the end), or stuff like the session identifier as described in the docs. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] binary timestamp conversion

2009-08-17 Thread Alvaro Herrera
g varies from platform to > platform. There are two representations, one using 64 bit integers and the other using floating point. Which one is your installation using depends on compile-time settings. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQ

Re: [GENERAL] ERROR: XLogFlush: request AF/5703EDC8 is not satisfied --- flushed only to AF/50F15ABC

2009-08-17 Thread Alvaro Herrera
utsav.turray wrote: > > Dear Richard, > > I can't exclude the table because it is important table. > Is there any way , i could get the data back. Dump it and restore the dump. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreS

Re: [GENERAL] pg_autovacuum exceptions question

2009-08-17 Thread Alvaro Herrera
this feature, the way to do it would be to add an option in pg_database or something like that, not the config file. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general maili

Re: [GENERAL] psql command line editor

2009-08-17 Thread Alvaro Herrera
the docs. I have in my .inputrc this line: set editing-move vi and it works like a charm. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] psql command line editor

2009-08-17 Thread Alvaro Herrera
lso logging in again) > 2) I did the set on the command line and then started psql > > No luck. Try reading my first sentence. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsq

Re: [GENERAL] index "pg_authid_rolname_index" is not a btree

2009-08-18 Thread Alvaro Herrera
guess is that you'll find that there's corruption elsewhere that's not so easily recoverable ... -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mai

Re: [GENERAL] Unit conversion database (was: multiple paramters in aggregate function)

2009-08-19 Thread Alvaro Herrera
o ample opportunity to peek. > > [1] It doesn't correctly convert °C to °F or vv, that was one of the > first things I tried. Seems it's easy to misuse it. You need tempF(x) and tempC notation for converting absolute temperature differences: You have: tempF(212) You wan

Re: [GENERAL] Re: Unit conversion database (was: multiple paramters in aggregate function)

2009-08-19 Thread Alvaro Herrera
Greg Stark wrote: > On Wed, Aug 19, 2009 at 8:24 PM, Alvaro > Herrera wrote: > >> [1] It doesn't correctly convert °C to °F or vv, that was one of the > >> first things I tried. > > > > Seems it's easy to misuse it.  You need tempF(x) and tempC no

Re: [GENERAL] Stock Market Price Data & postgreSQL? HELLPPP Please

2009-08-19 Thread Alvaro Herrera
remember somebody talking about how Truviso was all set up to solve the stock ticker problem, but if you go to their site now they don't mention stock at all. Does this mean anything? -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Comma

Re: [GENERAL] Clustering with enough work_mem: copy heap in mem?

2009-08-20 Thread Alvaro Herrera
e new heap in that order". It's pretty stupid. There was an attempt to fix it (for example so that it could try to do a seqscan+sort instead of indexscan), but it stalled. http://archives.postgresql.org/message-id/87vdxg6a3d@oxford.xeocode.com http://archi

Re: [GENERAL] "ownership" of sequences, pseudo random unique id

2009-08-20 Thread Alvaro Herrera
a hack? You need to ensure you have a retry loop in your insertion code, because if the generated code conflicts with a manually inserted code, it will cause an error. Other than that, seems like it should work ... -- Alvaro Herrerahttp://www.CommandPrompt.com

Re: [GENERAL] Questions about encoding between two databases

2009-08-21 Thread Alvaro Herrera
gt;You can edit the ENCODING options in the CREATE DATABASE commands > >though. (Didn't we explain this to you already?) > > > Well, I did send this query with an incorrect email address so it > got stuck and was never posted properly, so I have not seen any such > reply.

Re: [GENERAL] "Number of columns exceed limit" on a hierarchy of views

2009-08-21 Thread Alvaro Herrera
to E, or might it decide to join B with E > first before joining the result to A? It may switch join order, yes. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] "Could not open relation XXX: No such file or directory"

2009-08-23 Thread Alvaro Herrera
locate its data > files, the problem is solved.   Yes, Postgres expects that the CWD is not changed. Files that were previously opened continue to work fine, because they are kept open. Do not chdir() in a function. -- Alvaro Herrerahttp://www.CommandPrompt.

Re: [GENERAL] Getting listed on "Community Guide to PostgreSQL GUI Tools"

2009-08-23 Thread Alvaro Herrera
ad software, I think you should create a section at the end of the page and move dead projects there. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-

Re: R: [GENERAL] Field's position in Table

2009-08-24 Thread Alvaro Herrera
to > be more organized than the general public. Just because we don't have it implemented does not make it a bad idea. I think (and others do as well) it's a good idea to be able to handle this; it's just that nobody has gotten around to implement it. -- Alvaro Herrera

Re: R: [GENERAL] Field's position in Table

2009-08-24 Thread Alvaro Herrera
it. It doesn't require rewriting the whole table. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: R: [GENERAL] Field's position in Table

2009-08-25 Thread Alvaro Herrera
ed-length not nullable attributes together at the start of the tuple. That should give slightly better performance. -- Alvaro Herrera http://www.flickr.com/photos/alvherre/ "No tengo por qué estar de acuerdo con lo que pienso" (Carlo

Re: R: [GENERAL] Field's position in Table

2009-08-25 Thread Alvaro Herrera
ation, I'll take a look at it if no one beats me to it (probably not for 8.5 anyway). -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Alvaro Herrera
configuration or a bug somewhere (for example maybe you have untrusted functions that try to open files?) -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-25 Thread Alvaro Herrera
Tom Lane wrote: > Vick Khera writes: > > On Tue, Aug 25, 2009 at 1:09 PM, Alvaro > > Herrera wrote: > >> PG is not supposed to crash when it runs out of file descriptors. �In > >> fact there's a whole abstraction layer to ensure this does not happen. > &g

Re: [GENERAL] ETL software and training

2009-08-26 Thread Alvaro Herrera
Lew wrote: > I used to work for a company called "MyWebOS" (later "WebOS"). > Spanish speakers thought that a very amusing name. I completely agree :-D -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting

Re: [GENERAL] Data audit trail techniques in postgresql

2009-08-27 Thread Alvaro Herrera
Nathaniel Smith wrote: > What do others use to accomplish this? Do most pg users just write > triggers by hand? Or is there some nice auditing module that Google > just isn't revealing to me? I think tablelog (to be found in pgfoundry too) is the most commonly used audit modul

Re: [SQL] [GENERAL] Data audit trail techniques in postgresql

2009-08-27 Thread Alvaro Herrera
Rob Sargent escribió: > tablelog doesn't appear any more lively than the OPs audittrail2. Perhaps, but I have heard of people using it successfully recently, whereas Nathaniel reported that audittrail2 seems to have obvious bugs. -- Alvaro Herrera

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-27 Thread Alvaro Herrera
until Postgres is restarted. This doesn't sound so far-fetched if the connections are long lived, perhaps from a pooler. Maybe we should have another inter-backend signal: when a process gets ENFILE, signal all other backends and they close a bunch of files each. -- Alvaro Herrera

Re: [GENERAL] Update /src/tools/msvc to VC++ 2008

2009-08-28 Thread Alvaro Herrera
atch getting rejected are pretty high. But you can try. The other option is having a single program that can emit both formats, assuming that the differences can be kept at a minimum. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consultin

Re: [GENERAL] Create language PLPERL error

2009-09-03 Thread Alvaro Herrera
e platform. Avoid using them. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] What happens when syslog gets blocked?

2009-09-03 Thread Alvaro Herrera
Of course, if auditing is critical to > >your > >scenario, then your priorities are different ... > > Bingo. I'm thinking we should make mention of this in the docs... I propose the following patch. -- Alvaro Herrerahttp://www.CommandPrompt.

Re: [GENERAL] Got could not truncate directory "pg_multixact/offsets": apparent wraparound

2009-09-04 Thread Alvaro Herrera
w for sure, but I think this is innocuous (particularly so if there's a single file in that directory, because then there's nothing to truncate anyway). -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent

Re: [GENERAL] Create language PLPERL error

2009-09-04 Thread Alvaro Herrera
x27;t > compiled with support for plperl. How would I find this out, and > hopefully fix it? Did you install the postgresql-plperl package? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: [GENERAL] Create language PLPERL error

2009-09-07 Thread Alvaro Herrera
Shakil Shaikh wrote: > -- > From: "Alvaro Herrera" > > >Shakil Shaikh wrote: > > > >> > >>ERROR: could not access file "$libdir/plperl": No such file or directory > >> &g

Re: [GENERAL] Data folder in differnet filesystem

2009-09-07 Thread Alvaro Herrera
gt; to be able to mount and unmount databases you will need to use > separate "clusters", No, you can also use tablespaces for this. Just create a directory inside /data/db1 (say /data/db1/ts) and then CREATE TABLESPACE ts_for_db1 LOCATION '/data/db1/ts'. Then you can create th

Re: [GENERAL] Adding integers ( > 8 bytes) to an inet

2009-09-08 Thread Alvaro Herrera
--+--- inet| + | bigint | inet bigint | + | inet | inet (2 filas) > Am I doing it the wrong way? Bug? I'd say this is just a missing feature. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consult

Re: [GENERAL] PG connections going to 'waiting'

2009-09-08 Thread Alvaro Herrera
andidate for what could be locking up the tables? Vacuum full, which is what your script is using, locks tables. But it's not recommended. You should be looking at an alternative vacuuming strategy that does not involve vacuum full at all. Perhaps autovacuum, properly tuned, is a better s

Re: [GENERAL] vacuum won't even start

2009-09-09 Thread Alvaro Herrera
ours) > > Looking with top and iotop, I see the process takes some cpu and > disk io time during several minutes, then it seems to fall asleep. > The process isn't locked according to pg_stat_activity. What are your vacuum_cost_% parameters? -- Alvaro Herrera

Re: [DOCS] [GENERAL] What happens when syslog gets blocked?

2009-09-10 Thread Alvaro Herrera
Alvaro Herrera wrote: > decibel wrote: > > On Aug 6, 2009, at 2:00 PM, Bill Moran wrote: > > > >Well ... "life better" really depends on which failure scenario you're > > >more comfortable with ... personally, I'd rather lose log messages > &g

Re: [GENERAL] COPY command character set

2009-09-10 Thread Alvaro Herrera
Peter Headland wrote: > As a general comment, I18N/L10N is a hairy enough topic that it merits > its own heading in any commands where it is an issue. I agree, this seems a good idea because people is often confused by this. -- Alvaro Herrera

Re: [GENERAL] Unicode normalization

2009-09-16 Thread Alvaro Herrera
s wrong, which is why we published a correct version here: http://wiki.postgresql.org/wiki/Strip_accents_from_strings -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing

Re: [GENERAL] DDL with Reference on them.

2009-09-21 Thread Alvaro Herrera
for the row to be inserted or saved? If they are NULL, they are not checked against the other table. If you want the value to be always checked, add a NOT NULL constraint to those columns. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication

Re: [GENERAL] citext like query and index usage

2009-09-22 Thread Alvaro Herrera
O test select md5(random()::text) FROM generate_series(0, 100, > 1); > CREATE INDEX test_citext_idx ON test USING btree(citext); Hmm, I think this needs one of the *_pattern_ops indexes. I'm not sure if you can use the builtin ones with citext though. -- Alvaro

Re: [GENERAL] lazy vacuum and AccessExclusiveLock

2009-09-24 Thread Alvaro Herrera
VACUUM over this table > because after 50 minutes of work it allocate AccessExclusiveLock on this > table and all other connections start to timeout. What version are you running? -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - C

Re: [GENERAL] pgadmin is changing pgpass.conf

2009-09-24 Thread Alvaro Herrera
er, > when I open PGAdmin, one of the entries disappears. Perhaps it > resolves the address and thinks they are the same entries? I think you should file this as a pgadmin bug -- see the pgadmin lists for that. -- Alvaro Herrerahttp://www.CommandProm

Re: [GENERAL] lazy vacuum and AccessExclusiveLock

2009-09-25 Thread Alvaro Herrera
Jaromír Talíř wrote: > Alvaro Herrera píše v Čt 24. 09. 2009 v 14:41 -0400: > > Jaromír Talíř wrote: > > > > > we are facing strange situation with exclusively locked table during > > > normal lazy vacuum. There is one big table (66GB) that is heavily > >

Re: [GENERAL] lazy vacuum and AccessExclusiveLock

2009-09-25 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > An alternative solution would be to lower the vacuum delay settings before > > starting the truncating phase, but this doesn't work very well in autovacuum > > due to the autobalancing code (which can cause other processes to

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-09-30 Thread Alvaro Herrera
date; > update foo set a=1000 where a>5; > fetch all from c1; Interesting. If I create an non-unique index on the table before declaring the cursor, FETCH throws an error: alvherre=# fetch all from c1; ERROR: attempted to lock invisible tuple -- Alvaro Herrera

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-09-30 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > Interesting. If I create an non-unique index on the table before > > declaring the cursor, FETCH throws an error: > > > alvherre=# fetch all from c1; > > ERROR: attempted to lock invisible tuple > > I get t

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-09-30 Thread Alvaro Herrera
Alvaro Herrera escribió: > I played a bit with doing this only when the OPT_CURSOR_INSENSITIVE bit > is set, but I'm not ever seeing it set -- with or with FOR UPDATE ... Oh, I see, that's a grammar only bit. I need to check rowMarks == NIL instead. It doesn't help

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-09-30 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > Tom Lane escribi�: > >> I think we need to ensure that when a cursor is created, it obtains a > >> private copy of the current snapshot ... but I'm not sure where that > >> ought to happen. Thoughts? >

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-10-01 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > Tom Lane escribió: > >> Well, the first problem is that 8.4 is failing to duplicate the > >> historical behavior. > > > Oh! That's easy. > > I don't think that testing rowMarks is the righ

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-10-01 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > Tom Lane escribió: > >> Well, the first problem is that 8.4 is failing to duplicate the > >> historical behavior. > > > Oh! That's easy. > > I don't think that testing rowMarks is the righ

Re: [GENERAL] Vacuumdb Fails: Huge Tuple

2009-10-01 Thread Alvaro Herrera
th files on which that error message appears are still at the same versions there were at when 8.4.0 was released, so I doubt the bug has been fixed. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-gener

Re: [GENERAL] Weird behavior with "sensitive" cursors.

2009-10-01 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > Tom Lane escribi�: > >> I don't think that testing rowMarks is the right thing at all here. > >> That tells you whether it's a SELECT FOR UPDATE, but actually we > >> want any cursor (and only cursors) t

Re: [GENERAL] Procedure for feature requests?

2009-10-01 Thread Alvaro Herrera
REATE FUNCTION" > to allow PostgreSQL to deny requests to drop a table/view/ > function that is needed by a function - where would I pro- > pose that? On -hackers, just like any other feature request, trivial or not. -- Alvaro Herrerahttp://www.Com

<    4   5   6   7   8   9   10   11   12   13   >