Re: [GENERAL] Success stories of PostgreSQL implementations in different companies

2013-05-24 Thread Alvaro Herrera
Oscar Calderon wrote: I think that in my country is more common to hear success stories like that about other databases like Oracle because is more expanded here, but i would like if there's a place or if you can share with me some real experiences or success stories that you ever heard of

Re: [GENERAL] New role, no database

2013-05-23 Thread Alvaro Herrera
Melvin Call escribió: Hello, I have a question for which I am unable to find an answer in the documentation, if y'all don't mind, I will ask here and hope for an answer. After installing PostgreSQL and logging in as the admin user of postgres, I have created a new user with the CREATEDB

Re: [GENERAL] VACUUM FULL freezes

2013-05-22 Thread Alvaro Herrera
RDNikeAir wrote: Interestingly enough all the pgsql.log.* files are blank (0 KB) and the last message i have in messages.* is from a few days ago. So there are no recent entries that i can look at. Well, it is clear then that the first thing you need to do is fix your logging. -- Álvaro

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Alvaro Herrera
Jashaswee escribió: i want to convert numbers into words in postgresql.is there any query for it? if yes please reply soon Try cash_words() -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via pgsql-general

Re: [GENERAL] How to convert numbers into words in postgresql

2013-05-14 Thread Alvaro Herrera
John R Pierce wrote: not sure I'd call that documentation. I was asking, where is that described in the postgresql manual? I looked in every category I thought was appropriate here, http://www.postgresql.org/docs/current/static/functions.html and didn't find it. A quick grep in

Re: [GENERAL] refactoring a database owner without reassign owned

2013-05-13 Thread Alvaro Herrera
Jeff Janes escribió: I think reassign owned should detect that it is being invoked on the internal user (as it does now) but then instead of refusing to run, it should DWIM. I suppose that was not implemented because it is difficult to do so (but of course that is all the more reason not to

Re: [GENERAL] authentication/privileges

2013-05-10 Thread Alvaro Herrera
Tom Lane escribió: It's fairly common for distro-supplied packages to create a postgres OS user but not assign it any password. In that state, the only way to become postgres is to su to it from root, or perhaps from a sudoer account with root-equivalent privileges. While that might be okay

Re: [GENERAL] Deploying PostgreSQL on CentOS with SSD and Hardware RAID

2013-05-10 Thread Alvaro Herrera
Steve Clark escribió: Well we have dual redundant power supplies on separate UPS so could something go wrong yes, but a tornado could come along and destroy the building also. .. hence your standby server across the country? -- Álvaro Herrerahttp://www.2ndQuadrant.com/

Re: [GENERAL] Storing small image files

2013-05-09 Thread Alvaro Herrera
Karl Denninger escribió: To encode: write_conn = Postgresql communication channel in your software that is open to write to the table char*out; size_tout_length, badge_length; badge_length = function-to-get-length-of(badge_binary_data); /* You have to know how long

Re: [GENERAL] configure --enable-dtrace (systemtap) on centos6.4 x86_32,/usr/bin/stap: invalid option -- 'C'

2013-04-16 Thread Alvaro Herrera
wk wrote: hi:Linux centos6.4 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux stap -v A script must be specified. Systemtap translator/driver (version 1.8/0.152 non-git sources) Copyright (C) 2005-2012 Red Hat, Inc. and others my configure:

Re: [GENERAL] Segmentation fault with core dump

2013-04-10 Thread Alvaro Herrera
Joshua Berry escribió: gdb /usr/pgsql-9.1/bin/postmaster -c core.17356 [...loading/reading symbols...] Core was generated by `postgres: [username] [databasename] [client_ipaddress](1500) SELECT '. Program terminated with signal 11, Segmentation fault. #0

Re: [GENERAL] Disallow SET command in a postgresql server

2013-04-09 Thread Alvaro Herrera
Fabio Rueda Carrascosa escribió: My grant/revoke architecture is fine, you mean about costly cpu/ram queries? Sure. The SQL dialect supported by Postgres is Turing-complete, so people can write statements that consume arbitrary amounts of RAM and diskspace, and run for arbitrary amounts of time

Re: [GENERAL] Money casting too liberal?

2013-03-30 Thread Alvaro Herrera
Martijn van Oosterhout developed tagged types back in 2005, looks like it went nowhere. You can search for it, it was pretty interesting. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via pgsql-general mailing

Re: [GENERAL] State of the art re: group default privileges

2013-03-20 Thread Alvaro Herrera
Michael Orlitzky wrote: I'm running into this exact situation: http://www.postgresql.org/message-id/CAG1_KcBFM0e2buUG=o7ojq_ktadrzdgd45ju7gke3duz0sz...@mail.gmail.com We really need to be able to have a group of developers who can create things and modify each others' stuff[1]. Is it still

Re: [GENERAL] Change owner for all tables in a database in one batch

2013-03-06 Thread Alvaro Herrera
Alexander Farber escribió: Is there maybe a one-liner for changing the ownership in 1 batch or should I execute alter table set owner to bukvy one by one? The command REASSIGN OWNED changes ownership of all objects owned by a certain role. There's no way to restrict it to just tables,

Re: [GENERAL] Re: permission denied to create extension ltree Must be superuser to create this extension.

2013-02-13 Thread Alvaro Herrera
krz...@gmail.com escribió: Year has passed and still no answer here or in documentation. I wonder if I get to live that long so I can find out answer. The question was: Ok, but can someone comment, document something on security of installing extensions for normal users? Does allowing

Re: [GENERAL] Runtime variations during day

2013-02-13 Thread Alvaro Herrera
Carlos Henrique Reimer wrote: Another example that could help is this seqscan: explain analyze select sittrib8 from iparq.arript where sittrib8=33; In the evening: Fri Feb 8 14:00:01 BRST 2013 QUERY PLAN

Re: [GENERAL] fascinating article on postgresql mailing lists

2013-02-11 Thread Alvaro Herrera
Merlin Moncure escribió: http://citusdata.com/blog/57-postgresql-full-text-search http://www.postgresql.org/message-id/511164ef.8010...@dalibo.info -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via pgsql-general

Re: [GENERAL] DB alias ?

2013-01-23 Thread Alvaro Herrera
Gauthier, Dave wrote: Problem: Some users (scripts actually) try to connect to a DB who's name is derived from environmental variables. The DB doesn't exist (yet), and I want them to connect to a different DB for the time being. Is there a way to define an alias for the existing DB that

Re: [GENERAL] Running update in chunks?

2013-01-22 Thread Alvaro Herrera
Steve Crawford escribió: On 01/21/2013 05:02 PM, Tim Uckun wrote: I already posted the schema earlier. It's a handful of integer fields with one hstore field. Oh well. I can't find it but maybe it got lost in shipping or eaten by a spam filter. This is what we have the archives are for:

Re: [GENERAL] pg_dirtyread doesnt work

2012-12-28 Thread Alvaro Herrera
Phil Sorber escribió: Most likely it's because of TOAST'd records. The module is pretty naive and needs to be updated to handle such cases. It doesn't look like a column with this definition would be toasted, though: On Fri, Dec 28, 2012 at 10:53 AM, Alejandro Carrillo faster...@yahoo.es

Re: [GENERAL] Read recover rows

2012-12-14 Thread Alvaro Herrera
Alejandro Carrillo escribió: But pg_dirty_read only runs in Linux. It doesnt run in windows. So port it. There's no fundamental reason for it not to work. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via

Re: [GENERAL] Read recover rows

2012-12-13 Thread Alvaro Herrera
Alejandro Carrillo escribió: Hi, 1) Anybody knows how to create a table using a table file? It isn't a fdw, is a file that compose the table in postgresql and get with the pg_relation_filepath function. Ex:    select pg_relation_filepath('pg_proc'); Make sure the server is down and

Re: [GENERAL] Backend process is still runs even postmaster got killed

2012-12-07 Thread Alvaro Herrera
Hari Babu wrote: Backend processes are still running even if the postmaster got killed and all other server processes are exited by checking the Postmaster status. What server version? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support,

Re: [GENERAL] High SYS CPU - need advise

2012-12-03 Thread Alvaro Herrera
Merlin Moncure escribió: Didn't we just discuss this exact problem on the identically named thread? http://postgresql.1045698.n5.nabble.com/High-SYS-CPU-need-advise-td5732045.html Ignore this guy. It's a bot reinjecting old messages, or something like that, probably because of some bug in

Re: [GENERAL] Postgres PHP error

2012-12-03 Thread Alvaro Herrera
Richard Huxton escribió: On 03/12/12 05:18, rahul143 wrote: Hi All Im receiving the following error, on a php page, conneting to postgres 7.4, installed on Mandrake 10.0 Others have answered your question. However... As I noted elsewhere, please ignore this guy. He's a bot

MODERATOR WARNING Re: [GENERAL] Exception Handling in C-Language Functions?

2012-12-02 Thread Alvaro Herrera
MODERATOR WARNING I noticed that this guy Rahul seems to be reinjecting old list emails somehow. Please don't approve anything coming from him. Observe this example: http://postgresql.1045698.n5.nabble.com/Re-GENERAL-MS-Access-and-Stored-procedures-td1843848.html

Re: [GENERAL] High SYS CPU - need advise

2012-11-15 Thread Alvaro Herrera
Merlin Moncure escribió: ok, excellent. reviewing the log, this immediately caught my eye: recvfrom(8, \27\3\1\0@, 5, 0, NULL, NULL) = 5 recvfrom(8, \327\327\nl\231LD\211\346\243@WW\254\244\363C\326\247\341\177\255\263~\327HDv-\3466\353..., 64, 0, NULL, NULL) = 64 select(0, NULL, NULL,

Re: [GENERAL] Does PostgreSQL have complete functional test cases?

2012-11-09 Thread Alvaro Herrera
Bruce Momjian wrote: On Fri, Nov 9, 2012 at 10:50:42AM +0800, Craig Ringer wrote: Not sure that's enough of an improvement. Really, these tests should pass whatever the optimizer parameters are set to; instead of checking the exact order of the result set, they should check that the

Re: [GENERAL] Does PostgreSQL have complete functional test cases?

2012-11-08 Thread Alvaro Herrera
Craig Ringer wrote: It'd be nice to split the tests up into clearer groups - will fail if planner settings are changed; WARNING, will fail only if incorrect result is returned; FATAL etc. Right now, AFAIK that hasn't been done. Not sure that's enough of an improvement. Really, these tests

Re: [GENERAL] Does PostgreSQL have complete functional test cases?

2012-11-08 Thread Alvaro Herrera
Tianyin Xu wrote: Ok, I agree that 2147483647 is not a reasonable setting. But what's the definition of reasonable? I just want to study the impact of the setting so I test the big number first. Please don't top-post. Those values are not wrong. They just don't match what our current testing

Re: [GENERAL] Comparing txid_current() to xmin

2012-11-06 Thread Alvaro Herrera
Mike Lewis escribió: I am trying to make a trigger that updates a row once and only once per transaction (even if this trigger gets fired multiple times). The general idea is that for a user we have a version number. When we modify the user's data, the version number is incremented then set

Re: [GENERAL] Autovacuum Launcher Process Exception

2012-10-30 Thread Alvaro Herrera
elli...@cpi.com wrote: Hello, I have been running PostgreSQL for many months and just recently started getting this exception upon start up. Does anyone know what the issue might be? LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG:

Re: [GENERAL] [pgsql-es-ayuda] como exportar separado por comas una tabla grande

2012-10-24 Thread Alvaro Herrera
data=# \o /tmp/datos_para_proceso.csv data=# select * from datos_para_proceso; /opt/PostgreSQL/9.2/bin/psql: lí­nea 30: 9608 Terminado (killed) LD_PRELOAD=$PLL LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PG_BIN_PATH/../lib $PG_BIN_PATH/psql.bin $@ Moshe Jacobson escribió: More important than

Re: [GENERAL] Disable autovacuum on specific tables

2012-10-24 Thread Alvaro Herrera
Eliot Gable escribió: In general, autovacuum seems to work well on most of the tables I deal with. However, in a couple of specific cases, it seems to fail miserably. I would like to switch to manual vacuuming on those tables and disable auto-vacuuming for those tables alone. Is this possible?

Re: [GENERAL] Disable autovacuum on specific tables

2012-10-24 Thread Alvaro Herrera
Shaun Thomas escribió: On 10/24/2012 02:57 PM, Eliot Gable wrote: In general, autovacuum seems to work well on most of the tables I deal with. However, in a couple of specific cases, it seems to fail miserably. I would like to switch to manual vacuuming on those tables and disable

Re: [GENERAL] Improve MMO Game Performance

2012-10-19 Thread Alvaro Herrera
Arvind Singh wrote: ok, thanks i will look into walbuffers asynchronous_commit=off is a doubt for responsive environment (pg manual). for ex. would it help if, a game player , has to perform next move on basis of his/her previous move plus other players move. all is sent to

Re: [GENERAL] Improve MMO Game Performance

2012-10-18 Thread Alvaro Herrera
Albe Laurenz wrote: Arvind Singh wrote: Are there any particular settings or methods available to improve Just insert_table operations The obvious ones: - Wrap several of them in a transaction. - Increase checkpoint_segments. - Set fsync=off and hope you don't crash. I think it would

Re: [GENERAL] Expensive log_line_prefix ?

2012-10-11 Thread Alvaro Herrera
Tom Lane escribió: Sergey Konoplev gray...@gmail.com writes: On Thu, Oct 11, 2012 at 12:19 PM, Sahagian, David david.sahag...@emc.com wrote: Are there any extra costs to logging all this cool stuff ? log_line_prefix = '%m %a %u %p %c %m %v %x' The formatting cost only but it is so

Re: [GENERAL] [HACKERS] Mailsystem maintenance/migration announcement

2012-08-10 Thread Alvaro Herrera
Excerpts from Stefan Kaltenbrunner's message of lun ago 06 13:21:49 -0400 2012: We are currently planning to finalize the ongoing work on the mailsystem migration we started earlier this year by migrating the two remaining components of the postgresql.org mailsystem infrastructure to new

Re: [GENERAL] psql latex and newlines

2012-03-15 Thread Alvaro Herrera
Excerpts from Wim Bertels's message of jue feb 23 12:46:29 -0300 2012: the problem arises when u have a field value that contains a newline character, when this field is not the first column, then all the data after this newline comes in the first column.. u can try this

Re: [BUGS] [GENERAL] Altering a table with a rowtype column

2012-03-07 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mié mar 07 17:31:32 -0300 2012: This probably could be done for rowtype columns as well, but nobody has collected the necessary round tuits. I think there was some fear of locking/deadlock issues, too. It's probably easy to do if you require it to be

Re: [GENERAL] Foreign Keys and Deadlocks

2011-11-09 Thread Alvaro Herrera
Excerpts from David Kerr's message of vie nov 04 13:01:29 -0300 2011: I did more digging and found some good discussions on the subject in general, but most of the examples out there contain explicit updates (which is why i was confused) but it looks like it's being addressed.

Re: [GENERAL] Foreign Keys and Deadlocks

2011-11-09 Thread Alvaro Herrera
Excerpts from David Kerr's message of mié nov 09 14:52:01 -0300 2011: On Wed, Nov 09, 2011 at 11:11:23AM -0300, Alvaro Herrera wrote: - This case is not helped by the patch I'm working on. As far as I can - see, if you got rid of the PK in table a in your example script, things - should

Re: [GENERAL] Looking for auto starting procedures

2010-12-02 Thread Alvaro Herrera
Excerpts from mabra's message of jue dic 02 20:04:36 -0300 2010: I've just not understood, when I have to write a function to test sql code and when I can do it interactively. In Postgres, PL/pgSQL and SQL are two different languages. There are things in PL/pgSQL that you cannot do in pure

Re: [GENERAL] Removing pgsql_tmp files

2010-11-08 Thread Alvaro Herrera
Excerpts from Tom Lane's message of lun nov 08 22:29:28 -0300 2010: Hmm. If you look at FileClose() in fd.c, you'll discover that that temporary file log message is emitted immediately before unlink'ing the file. It looks pretty safe ... but, scratching around, I notice that there's a

Re: [GENERAL] PG website testing

2010-10-06 Thread Alvaro Herrera
Excerpts from Thom Brown's message of lun oct 04 14:40:23 -0400 2010: Hi all, We're currently testing a new javascript change on the PostgreSQL docs. This is to make sure monospaced fonts still appear at a reasonable size between browsers. I'd appreciate it if some of you could do some

Re: [GENERAL] stuck spinlock detected at dynahash.c

2010-10-06 Thread Alvaro Herrera
Excerpts from Timon's message of mié oct 06 07:35:44 -0400 2010: today I found in logs: WARNING: pgstat wait timeout WARNING: pgstat wait timeout PANIC: stuck spinlock (0x7fd877761af8) detected at dynahash.c:981 PANIC: stuck spinlock (0x7fd877761af8) detected at dynahash.c:981 What

Re: [GENERAL] Regular expression that splits CSV string into table

2010-09-10 Thread Alvaro Herrera
Excerpts from Nick's message of vie sep 10 20:36:24 -0400 2010: Yes, that gets down to the root of my question... what is the expression that would properly split the values? -Nick The only idea that comes to mind right now is to remove them before processing the rest of the string, and put

Re: [GENERAL] error while autovacuuming

2010-09-09 Thread Alvaro Herrera
Excerpts from tamanna madaan's message of jue sep 09 09:55:01 -0400 2010: Hi All Can I upgrade directly to postgres-8.4 . I think it would also be having the fix for autovacuum error which is there in postgres-8.1.6 . But please confirm . An upgrade to 8.4 is going to be much more complex

Re: [GENERAL] Empty SELECT result at simultaneous calls

2010-09-08 Thread Alvaro Herrera
Excerpts from Stefan Wild's message of mié sep 08 11:40:25 -0400 2010: Hello, as already stated: When I'm working with delays in the servlets, everything works fine. the same selects on the same id work fine if delayd. So the data should not be the problem. So why are you blaming

Re: [GENERAL] error while autovacuuming

2010-09-08 Thread Alvaro Herrera
Excerpts from tamanna madaan's message of mié sep 08 17:10:23 -0400 2010: Actually, I have a cluster setup with two nodes in it. I am having postgres-8.1.2 and am using slony-1.1.5 for replication between two nodes in that cluster. Now, If I plan to upgrade both the servers to

Re: [GENERAL] On-disk size of db increased after restore

2010-09-02 Thread Alvaro Herrera
Excerpts from Devrim GÜNDÜZ's message of mié sep 01 17:39:55 -0400 2010: On Wed, 2010-09-01 at 17:32 -0400, Tom Lane wrote: But are you sure there aren't some fillfactor tweaks in there too? I'm sure. fillfactor related changes are on the radar, but I did not commit them yet... Maybe

Re: [GENERAL] On-disk size of db increased after restore

2010-09-01 Thread Alvaro Herrera
Excerpts from Richard Huxton's message of mié sep 01 16:39:55 -0400 2010: OK - so not fillfactor and not some unicode-related padding. I can't see how a 32 vs 64-bit architecture change could produce anything like a doubling of database size. Depending on table schemas, why not? e.g.

Re: [GENERAL] postgreSQL problem

2010-09-01 Thread Alvaro Herrera
Excerpts from Luka Novak's message of mié sep 01 06:35:13 -0400 2010: hello! I just recently installed PostgreSQL for my HoldemManager application, and after a restart, there was actually a new windows user account named postgre on the startup along with my admin account for windows (if i

Re: [GENERAL] pg_dump --compress error

2010-08-31 Thread Alvaro Herrera
Excerpts from yasin malli's message of mar ago 31 00:44:36 -0400 2010: Hi everyone. I try this command ' pg_dump --compress=5 DBNAME ***.sql ' and ' psql -f ***.sql -d DBNAME ' but I take some error because of compression. how can restore compressed dump file without taking any error ?

Re: [GENERAL] Database corruption

2010-08-30 Thread Alvaro Herrera
Excerpts from George Woodring's message of lun ago 30 08:17:56 -0400 2010: I am running 8.3.3 currently on this box. Last week we had a database corruption issue that started as: Aug 24 07:15:19 iprobe028 postgres[20034]: [3-1] ERROR: could not read block 0 of relation 1663/16554/7463400:

Re: [GENERAL] Feature proposal

2010-08-30 Thread Alvaro Herrera
Excerpts from wstrzalka's message of jue ago 26 03:18:36 -0400 2010: So after turning off fsync synchronous_commit (which I can afford as I'm populating database from scratch) I've stucked at 43 minutes for the mentioned table. There is no PK, constrains, indexes, ... - nothing except for

Re: [GENERAL] error while autovacuuming

2010-08-27 Thread Alvaro Herrera
Excerpts from tamanna madaan's message of vie ago 27 05:51:16 -0400 2010: I am using a cluster setup with two nodes in it . postgres version is 8.1.2 and slony 1.1.5 is being used for replication. I have autovacuum enabled. But it was giving the following error while vacuuming template0

Re: [GENERAL] WAL Archive Log

2010-08-26 Thread Alvaro Herrera
Excerpts from Sam Nelson's message of jue ago 26 19:24:00 -0400 2010: Is there a way to get postgres to write a line to the log file when it creates a WAL file? We wrote a script that tries to grab the times between WAL file creation and ingestion without stopping to make absolutely sure that

Re: [GENERAL] Win32 Backend Cash - pre-existing shared memory block is still in use

2010-08-18 Thread Alvaro Herrera
Excerpts from Jeremy Palmer's message of mar ago 17 22:59:08 -0400 2010: I'm getting infrequent backend crashes on a windows instance of PostgreSQL. The error I get is in the log below. It seems to relate to the share memory each time. Does anyone have any ideas what the problem is here, or

Re: [GENERAL] How to refer to computed columns from other computed columns?

2010-08-16 Thread Alvaro Herrera
Excerpts from Boszormenyi Zoltan's message of lun ago 16 14:45:07 -0400 2010: Matthew Wilson írta: I don't care if the code is rearranged so that c is replaced with an inline definition during compilation. I'm not concerned about efficiency here. I just don't want to have to redefine it

Re: [GENERAL] InitDB: Bad system call

2010-08-11 Thread Alvaro Herrera
Excerpts from Torsten Zühlsdorff's message of mié ago 11 02:52:34 -0400 2010: Hi Tom, Bad system call (core dumped) Have you tried running the initdb with strace or truss? That might give you a clue as to exactly what system call is failing. Your jail isn't allowing something

Re: [GENERAL] 8 trigger record(s) not found for relation managements

2010-08-11 Thread Alvaro Herrera
Excerpts from rh's message of mié ago 11 15:24:33 -0400 2010: Hi, I'm getting this error when trying to select from a table: 8 trigger record(s) not found for relation managements Looking into this a little, I found this page http://www.postgresql.org/docs/8.0/static/catalog-pg-trigger.html

Re: [GENERAL] need help with plphp installation

2010-08-10 Thread Alvaro Herrera
Also CC'ing the PL/php list. Excerpts from Pete Kay's message of mar ago 10 10:21:58 -0400 2010: Hi, I am getting the following errors while trying to get plphp installed on postgres 8.5: ERROR: could not load library /usr/local/pgsql/lib/plphp.so: /usr/local/pgsql/lib/plphp.so:

Re: [GENERAL] fork() and dynamically loaded c functions....

2010-08-10 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mar ago 10 19:49:18 -0400 2010: Offhand the only clean way I can see to launch a child process is to fork *and exec something*. You probably should close any open file descriptors too, just to be safe. (Or do we set FD_CLOEXEC on them?) -- Álvaro Herrera

Re: [GENERAL] Need help understanding vacuum verbose output

2010-08-06 Thread Alvaro Herrera
Excerpts from Brad Nicholson's message of vie ago 06 12:01:27 -0400 2010: On 10-08-06 11:45 AM, Gordon Shannon wrote: OK, so if it knew that all vacuumable tuples could be found in 492 pages, and it scanned only those pages, then how could it be that it reports 16558 removable tuples

Re: [GENERAL] Finding last checkpoint time

2010-07-23 Thread Alvaro Herrera
Excerpts from Greg Sabino Mullane's message of jue jul 22 13:34:25 UTC 2010: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Or you can use pg_controldata /path/to/pgdata and look at Time of latest checkpoint. Assuming your system is using English. Otherwise, you'll have to

Re: [GENERAL] Finding last checkpoint time

2010-07-23 Thread Alvaro Herrera
Excerpts from Greg Sabino Mullane's message of vie jul 23 19:08:27 UTC 2010: Hash: RIPEMD160 Hmm, wouldn't have it been easier to set LC_MESSAGES to C before calling pg_controldata? To be honest, I can't remember why that wasn't working for me when I tried it some time ago. I just

Re: [GENERAL] Can WAL files be shipped to multiple servers?

2010-07-23 Thread Alvaro Herrera
Excerpts from Steeles's message of vie jul 23 12:36:41 -0400 2010: Thanks for the quick reply. so if I switch target database from recovery mode to normal mode and do pg_dump to backup, then switch it back to recovery mode. The only way to switch back is to have a prior filesystem-level

Re: [GENERAL] Are identical subqueries in unioned statements nonrepeatable?

2010-07-22 Thread Alvaro Herrera
Excerpts from Derrick Rice's message of jue jul 22 12:27:31 -0400 2010: Is it possible for the contents of reference_table to differ from the first select to the select on the right hand side of the union? (e.g. because some other transaction committed additional rows). No. If it is not

Re: [GENERAL] printing vector column seems to print the rest of the row too

2010-07-20 Thread Alvaro Herrera
Excerpts from Jeff Hamann's message of mar jul 20 17:59:01 -0400 2010: select universedate,tradetimestamp,tradeprices from tradeprices where date(tradetimestamp) = CURRENT_DATE order by tradetimestamp desc; You're selecting the whole row as a column, which is why you get a row back in the

Re: [GENERAL] attempted to lock invisible tuple error while update

2010-07-14 Thread Alvaro Herrera
Excerpts from Greg Smith's message of mié jul 14 09:52:46 -0400 2010: tamanna madaan wrote: The same fix is not included in fix list for postgres-8.1.19 which came at the same time when postgres-8.4.2 was released i.e 14th Dec.,2009. Its not there in any of the 8.1 releases after that i.e

Re: [GENERAL] No PL/PHP ? Any reason?

2010-07-12 Thread Alvaro Herrera
Excerpts from Joshua D. Drake's message of mar jul 13 00:00:07 -0400 2010: On Tue, 2010-07-13 at 03:42 +, Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Joshua D. Drake wrote: * No trusted/untrusted versions This is false. There are both.

Re: [GENERAL] TupleDesc and HeapTuple

2010-07-06 Thread Alvaro Herrera
Excerpts from Luca Ferrari's message of mar jul 06 02:53:03 -0400 2010: Hi, I don't see any direct link between the TupleDesc structure and the HeapTuple one, and it seems strange to me since to manipulate a tuple you often need the descriptor. What is the trick here? You're supposed to

Re: [GENERAL] Autovacuum and pg_largeobject

2010-07-02 Thread Alvaro Herrera
Excerpts from Norberto Delle's message of vie jul 02 08:10:44 -0400 2010: Hi all I would like to know if the large object table pg_largeobject is routinely checked by the autovacuum daemon. I ask about this because I have a database in wich the pg_largeobject table is being forcibly

Re: [GENERAL] Autovacuum and pg_largeobject

2010-07-02 Thread Alvaro Herrera
Excerpts from Norberto Delle's message of vie jul 02 13:43:37 -0400 2010: As far as I know, It's not being locked. We use it to store digitalized documents and it's getting very big. I think the server is being turned off before it can complete an vacuum pass. The server is not kept on

Re: [GENERAL] Waarschuwing na pg_dumpall en restore

2010-06-25 Thread Alvaro Herrera
Excerpts from Dick Kniep's message of vie jun 25 04:54:15 -0400 2010: PROBLEM 2   Furthermore the following errors are shown:   psql:db03.ak1.sql:251166: ERROR:  column a.transaction does not exist LINE 2: SELECT (a.relation)::regclass AS table, a.transaction...

Re: [GENERAL] what is the meaning of Datum?

2010-06-23 Thread Alvaro Herrera
Excerpts from Luca Ferrari's message of mié jun 23 06:09:28 -0400 2010: Hi all, ok this is a silly question, but I've got a doubt: what is the exact meaning of Datum? I see having a look at the macroes (e.g., PG_RETURN_XXX) that a Datum can be used as a pointer or as a single data, that is

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-23 Thread Alvaro Herrera
Excerpts from Devrim GUNDUZ's message of lun jun 21 23:55:41 -0400 2010: IIRC, it does not compile against newer PostgreSQL releases and it is not under development right now. It compiles with 9.0 just fine (and earlier releases too, though I didn't bother to test anything earlier than 8.2).

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-22 Thread Alvaro Herrera
Excerpts from Greg Sabino Mullane's message of mar jun 22 13:51:35 UTC 2010: I mean, I love my Tcl support, and I know this is part of PG's legacy... but Tcl and no PHP? I figure there's a tech reason for this - the demand must be there! No? No, I'd say the demand is most definitely

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-22 Thread Alvaro Herrera
Excerpts from Joshua D. Drake's message of mar jun 22 12:16:11 -0400 2010: On Tue, 2010-06-22 at 13:51 +, Greg Sabino Mullane wrote: * Hard to find: ** First google hit on pl/php is projects.commandprompt.com/public/plphp ** Which simply says: Go here instead:

Re: [GENERAL] Misunderstanding transactions and locks

2010-06-16 Thread Alvaro Herrera
Excerpts from Michael P. Soulier's message of mié jun 16 12:21:16 -0400 2010: Hi, I'm using Django with Postgres 8.3.9 on CentOS Linux. I'm trying to figure out why locking isn't working as I'm expecting. I have a an operation wrapped in a transaction where I explicitely grab an exclusive

Re: [GENERAL] Cognitive dissonance

2010-06-10 Thread Alvaro Herrera
Excerpts from Peter Eisentraut's message of jue jun 10 02:50:14 -0400 2010: On tis, 2010-06-08 at 11:04 +0200, John Gage wrote: Yet, the only one file edition of the Postgres documentation is in...pdf format. Huh? I know. I know. I have already brought this up. And various ways

Re: [GENERAL] Cognitive dissonance

2010-06-09 Thread Alvaro Herrera
Excerpts from John Gage's message of mié jun 09 01:28:54 -0400 2010: I recently was re-looking at my files and saw tsvector::text. I had forgotten that the double colon is one way to cast a type. Double colon is not in the html index of the documentation. I just added an index entry

Re: [GENERAL] server crash = libpq poll() hangs forever (Linux)

2010-06-09 Thread Alvaro Herrera
Excerpts from björn lundin's message of mié jun 09 16:17:57 -0400 2010: On 9 Juni, 16:37, t...@sss.pgh.pa.us (Tom Lane) wrote: Marinos Yannikos m...@geizhals.at writes: It seems that poll() never receives a connection closed notification under Linux

Re: [GENERAL] 3rd time is a charm.....right sibling is not next child crash.

2010-06-08 Thread Alvaro Herrera
Excerpts from Jeff Amiel's message of mar jun 08 14:19:02 -0400 2010: It seems preferable to configure autovacuum to avoid vacuum Slony-I-managed configuration tables. HmmmI don't do this. Surely this is not relative to my corrupt indexes2 attempted vacuums on same indexes?

Re: [GENERAL] 3rd time is a charm.....right sibling is not next child crash.

2010-06-08 Thread Alvaro Herrera
Excerpts from Jeff Amiel's message of mar jun 08 09:26:25 -0400 2010: Not looking for help...just putting some data out there. 2 previous crashes caused by corrupt slony indexes http://archives.postgresql.org/pgsql-general/2010-02/msg00022.php

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-07 Thread Alvaro Herrera
Excerpts from Greg Smith's message of lun jun 07 12:23:44 -0400 2010: It is a periodic preventative maintenance operation you can expect to need occasionally, but certainly not often. Indexes maintain themselves just fine most of the time. They can get out of whack if you delete a lot of

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Alvaro Herrera
Excerpts from Eliot Gable's message of vie jun 04 16:13:28 -0400 2010: This is the code I posted: create type complex1 as ( ... ); -- one integer member and about 16 text members create type complex2 as ( ... ); -- few integer members, about 10 text members, and about 6 different enum

Re: [GENERAL] Removing CONTEXT from RAISE EXCEPTION messages from triggers

2010-06-03 Thread Alvaro Herrera
Excerpts from Peter Geoghegan's message of jue jun 03 16:23:07 -0400 2010: \set VERBOSITY terse Well, I actually didn't mean through psql, but I see I can set verbosity though a call to PQsetErrorVerbosity(). Maybe this would work better as a GUC that can be set per session? That

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-02 Thread Alvaro Herrera
Excerpts from Gareth.Williams's message of mar jun 01 02:44:35 -0400 2010: Hi, We want to reindex the database behind a production service without interrupting the service. I had an idea for creating the index with a new name then dropping the existing index and renaming the new one -

Re: [GENERAL] How to lose transaction history (xmin values, WAL, etc.)?

2010-05-20 Thread Alvaro Herrera
Excerpts from Richard Walker's message of jue may 20 02:19:17 -0400 2010: (a) (ii) It seems a breach is possible via the xmin values. In that case, what about doing updates inside a transaction that does a trivial update of all rows, e.g.: begin transaction; update mytable ; --

Re: [GENERAL] Postgres stats collector showing high disk I/O

2010-05-20 Thread Alvaro Herrera
Excerpts from Justin Pasher's message of jue may 20 16:10:53 -0400 2010: Whenever I clear out the stats for all of the databases, the file shrinks down to 1MB. However, it only takes about a day for it to get back up to ~18MB and then the stats collector process start the heavy disk

Re: [GENERAL] Help writing a query to predict auto analyze

2010-05-19 Thread Alvaro Herrera
Excerpts from Gordon Shannon's message of mié may 19 11:49:45 -0400 2010: at: last analysis tuples = pg_class.reltuples I'm the least confident about the last one -- tuples as of last analyze. Can anyone confirm or correct these? In 8.4 it's number of dead + lives tuples that there

Re: [GENERAL] Help writing a query to predict auto analyze

2010-05-19 Thread Alvaro Herrera
Excerpts from Gordon Shannon's message of mié may 19 18:02:51 -0400 2010: I'm sorry, I'm not following you. Are you saying that last analysis tuples is number of dead + live tuples from the previous anlyze? If so, that would really confuse me because X would always be 0: X = lt + dt - at

Re: [GENERAL] Help writing a query to predict auto analyze

2010-05-19 Thread Alvaro Herrera
Excerpts from Gordon Shannon's message of mié may 19 23:32:07 -0400 2010: alvherre wrote: n_live_tup and n_dead_tup corresponds to the current numbers, whereas last analysis tuples are the values from back when the previous analyze ran. These counters keep moving per updates, deletes,

Re: [GENERAL] PANIC: corrupted item pointer: 32766

2010-05-14 Thread Alvaro Herrera
Excerpts from Catalin BOIE's message of vie may 14 02:32:01 -0400 2010: Hello! I have a serious problem with one of my tables. Version: postgresql-server-8.4.3-1.fc12.x86_64 Kernel: kernel-2.6.32.11-99.fc12.x86_64 Hmm, it's pretty unfortunate that those buffer checks are inside

Re: [GENERAL] hi,is it dangerous to only use tuple pointer through heap_getnext()?

2010-05-14 Thread Alvaro Herrera
Excerpts from sunpeng's message of vie may 14 19:15:47 -0400 2010: hi,i use these codes to store only pointer of tuple : HeapTuple *tuple; tuple = heap_getnext(pHeapScanDesc,ForwardScanDirection); while(tuple){ //[1#]here i only store the pointer of tuple in an array for later

Re: [GENERAL] Documentation availability as a single page of text

2010-05-13 Thread Alvaro Herrera
Excerpts from Peter Eisentraut's message of jue may 13 12:10:21 -0400 2010: On ons, 2010-05-12 at 15:24 +0200, John Gage wrote: Yes it would. In fact, I have often wondered why this doesn't exist. How can I do it? cd doc/src/sgml make html JADEFLAGS='-V nochunks -V rootchunk' That

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