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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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
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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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: 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] 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: [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] 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] 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] 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] 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] 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] 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] 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] 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] 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_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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] How to use PQfn() in libpq library?

2009-06-19 Thread Alvaro Herrera
ctionality by setting up a prepared > >statement to define the function call. Then, executing the statement > >with binary transmission of parameters and results substitutes for a > >fast-path function call. -- Alvaro Herrerahttp://w

Re: [GENERAL] 10 TB database

2009-06-15 Thread Alvaro Herrera
month. Sounds a bit like what Truviso does ... -- Alvaro Herrera -- 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] Postgres auditing features

2009-06-11 Thread Alvaro Herrera
t; facilities yourself. I have added this to the FAQ http://wiki.postgresql.org/wiki/FAQ#Is_there_a_way_to_leave_an_audit_trail_of_database_operations.3F ... he says, hoping that it'll help generate interest in getting the FAQ updated ... -- Alvaro Herrera

Re: [GENERAL] aliases for sequences and other DB objects?

2009-06-09 Thread Alvaro Herrera
alias my_sequence_alias for my_sequence; > select nextval('my_sequence_alias'); No. What would this be used for? -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing lis

Re: [GENERAL] type cast in index

2009-06-09 Thread Alvaro Herrera
ng an AT TIME ZONE 'UTC' specification, which will cause it to be turned into a plain timestamp (without tz). -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-gen

Re: [GENERAL] lc_messages 8.3.7

2009-06-03 Thread Alvaro Herrera
------- PostgreSQL 8.3.7 on x86_64-unknown-linux-gnu, compiled by GCC gcc (Debian 4.3.3-3) 4.3.3 (1 fila) -- 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] How can I manually alter the statistics for a column?

2009-06-02 Thread Alvaro Herrera
h of pages with only dead tuples at the start of the table? Maybe a lot of empty pages at the start of the table (If this is 8.3 you have to consider sync_seqscan as well) -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.

Re: [GENERAL] pg_dump & table space

2009-06-01 Thread Alvaro Herrera
e it would be better if the dump has a RESET default_tablespace before the SET. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-gen

Re: [GENERAL] I can't drop a user if I don't drop his grants beforehand??????????????????

2009-05-29 Thread Alvaro Herrera
Nico Sabbi wrote: > Alvaro Herrera ha scritto: >>> I'm not speaking of object ownership, but of GRANTs. >> >> As Tom says, it's a known limitation. Did you try REASSIGN OWNED and/or DROP >> OWNED? > No, I didn't because the tables weren't o

Re: [GENERAL] Bloated Table

2009-05-27 Thread Alvaro Herrera
o expensive to be running every minute ... -- 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 s

Re: [GENERAL] Bloated Table

2009-05-27 Thread Alvaro Herrera
ign", then this code is broken because it only reports mingw32 as 8, all others as 4, which is wrong. However I think the big problem is that it relies on pg_class.relpages and reltuples which are only accurate just after VACUUM, only a sample-based estimate just after ANALYZE,

Re: [GENERAL] Need beginning and ending date value for a particular week in the year

2009-05-26 Thread Alvaro Herrera
ess to it anymore. There's something similar in the Wiki: http://wiki.postgresql.org/wiki/Date_and_Time_dimensions -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Alvaro Herrera
Havasvölgyi Ottó escribió: > I mean the Win32 distribution on the PgSql site. I always used that. If you want to find out whether a particular build used floating point or integer datetimes, issue "SHOW integer_datetimes". If it says "off", then it's floatin

Re: [GENERAL] Aggregate Function to return most common value for a column

2009-05-22 Thread Alvaro Herrera
nt to add your functions to http://wiki.postgresql.org/wiki/Snippets , that would be great. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] I can't drop a user if I don't drop his grants beforehand??????????????????

2009-05-22 Thread Alvaro Herrera
imitation. Did you try REASSIGN OWNED and/or DROP OWNED? -- 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: ht

Re: [GENERAL] array/function question

2009-05-19 Thread Alvaro Herrera
nnest() function in 8.3 ... -- 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 subscription: http://www.postgr

Re: [GENERAL] array/function question

2009-05-19 Thread Alvaro Herrera
Joshua Berry escribió: > Please forgive the lack of grace. I'd love tips on how to improve this! Tip: follow Pavel's suggestion. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Alvaro Herrera
e snapshot taken when the first query is executed. Otherwise (read committed), a new query always gets a fresh one. (Old snapshots are also used for stuff like cursors that remain open, but that's not the case here.) -- Alvaro Herrerahttp://www.CommandPrompt.c

Re: [GENERAL] array/function question

2009-05-18 Thread Alvaro Herrera
7}', '{1,4,8,9}'); is_element_present -------- {t,f,f,t,f} (1 fila) -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] pg_dump and 2gb limit on windows and version 8.1.3

2009-05-18 Thread Alvaro Herrera
ns the fix as well. -- 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] Btree indizes, FILLFACTOR, vacuum_freeze_min_age and CLUSTER

2009-05-14 Thread Alvaro Herrera
Philipp Marek wrote: > On Mittwoch, 13. Mai 2009, Alvaro Herrera wrote: > > > we're using postgresql 8.3 for some logging framework. > > > > > > There are several tables for each day (which are inherited from a common > > > base), which > > > -

Re: [GENERAL] Btree indizes, FILLFACTOR, vacuum_freeze_min_age and CLUSTER

2009-05-13 Thread Alvaro Herrera
ed a terminal somewhere and left it open for days? Have a look at pg_stat_activity. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Could not open file "pg_clog/...."

2009-05-12 Thread Alvaro Herrera
Alvaro Herrera wrote: > Markus Wollny wrote: > > magazine=# vacuum analyze pcaction.article; > > PANIC: corrupted item pointer: 5 > > server closed the connection unexpectedly > > This probably means the server terminated abnormally > > befor

Re: [GENERAL] Could not open file "pg_clog/...."

2009-05-12 Thread Alvaro Herrera
on this kind of errors; and in fact I had started on a patch to add errcontext() to vacuum and analyze calls, but never finished it. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-general mailing list

Re: [GENERAL] Btree indizes, FILLFACTOR, vacuum_freeze_min_age and CLUSTER

2009-05-11 Thread Alvaro Herrera
xt idea we changed the cluster/reindex script to set > "vacuum_freeze_min_age=0" before the CLUSTER call, hoping that this would > solve our transaction ID wraparound problem. REINDEX? What are you doing REINDEX for? -- Alvaro Herrerahttp://www.CommandPrompt.com/ The P

Re: [GENERAL] limit-offset different result sets with same query

2009-05-08 Thread Alvaro Herrera
have a > particular ordering when you include an ORDER BY clause that actually > specifies the order well enough :) Yeah, we went over this on the spanish list, turned out that I couldn't remember about syncscan :-) -- Alvaro Herrerahttp://www.Com

Re: [GENERAL] PgUS 501c3 Public Charity

2009-05-07 Thread Alvaro Herrera
se we bunch all F/OSS stuff together. A single project like Pg is unlikely to fly very far.) I'll ask PgUS later to fund my possible flight to Cuba for a Pg summer school. Oh wait a minute ... Hey, but I forgot -- congratulations on the 501(c)3 status! -- Alvaro Herrera

Re: [GENERAL] PgUS 501c3 Public Charity

2009-05-07 Thread Alvaro Herrera
Dave Page wrote: > On Thu, May 7, 2009 at 3:04 AM, Alvaro Herrera > wrote: > > Joshua D. Drake wrote: > >> Hello, > >> > >> Yeah its not general technical discussion but this little bit of news > >> warrants more widely read attention. PgUS (ht

Re: [GENERAL] Power outage and funny chars in the logs

2009-05-07 Thread Alvaro Herrera
tmaster.pid should be fsync'ed. -- 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 subscription: http://w

Re: [GENERAL] PgUS 501c3 Public Charity

2009-05-06 Thread Alvaro Herrera
r here: > > https://www.postgresql.us/determination_letter Just curious: is PostgreSQL as a project withdrawing from SPI? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mai

Re: [GENERAL] how to select temp table

2009-05-06 Thread Alvaro Herrera
ttable; Also, you can make the non-temp table first in the search path by putting pg_temp later than the public schema (or wherever you have created the function): select * from testtable;-- refers to temp set search_path to 'public', 'pg_temp'; select * from testtable

Re: [GENERAL] recover corrupt DB?

2009-05-05 Thread Alvaro Herrera
ed some space" include the pg_xlog directory or something in the vicinity? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgr

Re: [GENERAL] Tracking down a deadlock

2009-05-04 Thread Alvaro Herrera
u should be able to do a SELECT FOR UPDATE with the same WHERE as the UPDATE as the first thing in your transaction. That way it is much less likely to deadlock with itself. (This assumes that the set of tuples to update doesn't change, which holds true everytime if your transaction has iso

Re: [GENERAL] triggers and execute...

2009-04-30 Thread Alvaro Herrera
execute q; > > But if any of the fields referenced are null, the whole query string > is now null. So the next step is to use coalesce to build a query > string? That get insane very quickly. There's got to be some quoting > trick or something to le

Re: [GENERAL] Restore Crashes Postgres

2009-04-28 Thread Alvaro Herrera
ending up in a file somewhere). -- 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] SPI_ERROR_TRANSACTION [PostgreSQL 8.3]

2009-04-28 Thread Alvaro Herrera
LSE in your function would never be reached. -- 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.pos

Re: [GENERAL] PostgreSQL Object-Oriented Database?

2009-04-27 Thread Alvaro Herrera
one client-side, I'd hazard that you're probably right in placing blame in the contractor. -- 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] status of pl/php

2009-04-27 Thread Alvaro Herrera
list. Copying Alexey because he would > know better. It is still considered "beta", but I think it's reasonably stable. Some things need to be reworked, such as handling of arrays. Otherwise it should work. Most of the problems with it seem to come from having to comp

Re: [GENERAL] find column OID types with information schema?

2009-04-27 Thread Alvaro Herrera
Type OIDs for attributes can be found in pg_attribute.atttypid. -- 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] delete duplicates takes too long

2009-04-24 Thread Alvaro Herrera
abonado_b, fecha_llamada, duracion) where processed = 2; -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

Re: [GENERAL] Can't use "any" with SQL functions

2009-04-24 Thread Alvaro Herrera
BTW is there a reason the error messages say "plpgsql functions cannot ..." instead of "PL/pgSQL functions cannot ..."? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Se

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-24 Thread Alvaro Herrera
tes, reporting it when an exception was raised. It was a very effective way to detect corrupted toast entries, which is the most visible way in which data is corrupted. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-24 Thread Alvaro Herrera
Chen, Dongdong (GE Healthcare) escribió: > > When the OS starts up, it wants to detect whether there is data loss > in PostgreSQL from last shutdown, is there a method provided? Why would the OS want to do that? -- Alvaro Herrerahttp://www.CommandP

Re: [GENERAL] need help for PostgreSQL consistency check mechanism

2009-04-23 Thread Alvaro Herrera
7;ll be done automatically. -- 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 subscription: http://w

Re: [GENERAL] pg_lsclusters error after pg_dropcluster

2009-04-23 Thread Alvaro Herrera
fo{"owneruid"} in getpwuid at /usr/bin/pg_lsclusters > line 28" Please report to Debian -- they are the ones that write these programs. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Alvaro Herrera
Mikko escribió: > On Wed, Apr 22, 2009 at 2:13 AM, Alvaro Herrera > wrote: > > Ouch ... I thought that was the way that Windows designated UTF8 > > locales, but maybe I am wrong. > > Ok, now I found out that Windows doesn't support locales with encoding > using m

Re: [GENERAL] From 8.1 to 8.3

2009-04-22 Thread Alvaro Herrera
lazy to read them, we're too lazy to summarise them for you ... (Luckily for everybody, Bruce and Tom were NOT lazy enough to write them in the first place.) The meat of what you need to know is in the 8.2.0 and 8.3.0 notes, the "incompatibilities" sec

Re: [GENERAL] Can Autovaccuum also reindex

2009-04-21 Thread Alvaro Herrera
ed within a custom cron job? Autovacuum never attempts anything that might require exclusive locks. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing l

Re: [GENERAL] trouble with to_char('L')

2009-04-21 Thread Alvaro Herrera
Mikko escribió: > On Tue, Apr 21, 2009 at 8:13 PM, Alvaro Herrera > wrote: > > Maybe the problem here is that the chosen locales are not UTF8.  Does it > > work if you set lc_numeric and lc_monetary to "Finnish_Finland.65001" > > instead?  Those should mat

<    2   3   4   5   6   7   8   9   10   11   >