Re: [GENERAL] recovery do not finish

2008-07-11 Thread Greg Smith
On Fri, 11 Jul 2008, Benedek Laszlo wrote: We have waited for more than 2 hours, but psql still says that the system is starting up. In addition to the suggestions you've gotten to try a later version instead, I'd add that you should consider running vmstat in another window while the recov

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Simon Riggs
On Fri, 2008-07-11 at 15:25 -0600, Scott Marlowe wrote: > On Fri, Jul 11, 2008 at 3:24 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: > > > > On Fri, 2008-07-11 at 14:51 -0600, Scott Marlowe wrote: > > > >> I would kindly disagree. I'm looking at a project where HOT updates > >> are going to be a rea

Re: [GENERAL] Complicated GROUP BY

2008-07-11 Thread Hoover, Jeffrey
This will also work as long as the table isn't large or product is indexed. actually,its more likely product is indexed that criteria_1 or _2... Note: in this case when there is a tie one provider is arbitrarily selected select mx.product, mx.max_criteria_1, (select provider fro

Re: [GENERAL] Complicated GROUP BY

2008-07-11 Thread Hoover, Jeffrey
if criteria_1 and _2 are indexed: select mx.product, p1.provider as best_provider_1, mx.max_criteria_1, p2.provider as best_provider_2 mx.max_criteria_2 from (select product, max(criteria_1) as max_criteria_1, max(criteria_2) as max_criteria_2 from products_provi

Recall: [GENERAL] Complicated GROUP BY

2008-07-11 Thread Hoover, Jeffrey
Hoover, Jeffrey would like to recall the message, "[GENERAL] Complicated GROUP BY".

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Scott Marlowe
On Fri, Jul 11, 2008 at 3:24 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-07-11 at 14:51 -0600, Scott Marlowe wrote: > >> I would kindly disagree. I'm looking at a project where HOT updates >> are going to be a real performance enhancement, but I'll have to >> create a hundred or so

Re: [GENERAL] How do I tell if a vacuum is currently running?

2008-07-11 Thread Alvaro Herrera
William Garrison wrote: > If the autovacuum is running, will that show somewhere? I know there is > a command to see currently running queries (not in front of me right > now) but will that show vacuums or any other maintenance operations that > might be running? Yes, autovacuum appears in

Re: [GENERAL] recovery do not finish

2008-07-11 Thread Simon Riggs
On Fri, 2008-07-11 at 16:53 -0400, Alvaro Herrera wrote: > Benedek Laszlo wrote: > > Hello, > > > > I have a serious problem with a production database. > > We had a no disk space left on device problem, and postgres did not stop, > > so it was killed ( kill -9 ) > > we made free space and reboo

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Simon Riggs
On Fri, 2008-07-11 at 14:51 -0600, Scott Marlowe wrote: > I would kindly disagree. I'm looking at a project where HOT updates > are going to be a real performance enhancement, but I'll have to > create a hundred or so tables ALL with fillfactor tacked on the end. You clearly think that adjustin

[GENERAL] How do I tell if a vacuum is currently running?

2008-07-11 Thread William Garrison
If the autovacuum is running, will that show somewhere? I know there is a command to see currently running queries (not in front of me right now) but will that show vacuums or any other maintenance operations that might be running? -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Roberts, Jon
> Roberts, Jon escribió: > > > Why would you set the fillfactor to anything other than 100 for a > > PostgreSQL table? > > To favor HOT updates. > > -- I can find very little information on hot updates but I found this: http://archives.postgresql.org/pgsql-patches/2006-11/msg00059.php It stat

Re: [GENERAL] recovery do not finish

2008-07-11 Thread Alvaro Herrera
Benedek Laszlo wrote: > Hello, > > I have a serious problem with a production database. > We had a no disk space left on device problem, and postgres did not stop, so > it was killed ( kill -9 ) > we made free space and reboot, but postgres not start properly. > We have waited for more than 2 hou

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Scott Marlowe
On Fri, Jul 11, 2008 at 2:10 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-07-11 at 12:52 -0600, Scott Marlowe wrote: >> On Fri, Jul 11, 2008 at 12:12 PM, Richard Broersma >> <[EMAIL PROTECTED]> wrote: >> > On Fri, Jul 11, 2008 at 10:27 AM, Scott Marlowe <[EMAIL PROTECTED]> wrote: >>

[GENERAL] recovery do not finish

2008-07-11 Thread Benedek Laszlo
Hello, I have a serious problem with a production database. We had a no disk space left on device problem, and postgres did not stop, so it was killed ( kill -9 ) we made free space and reboot, but postgres not start properly. We have waited for more than 2 hours, but psql still says that the sys

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Alvaro Herrera
Roberts, Jon escribió: > Why would you set the fillfactor to anything other than 100 for a > PostgreSQL table? To favor HOT updates. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent vi

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Roberts, Jon
> > > >> Is there any way to set a different default fill factor? > > > > ALTER TABLE Yourtable > >SET ( FILLFACTOR = 50 ); > > Hehe. I know how to do that. I mean the default fill factor for a > database / user for tables / indexes.. Like setting search_path for a > user. > > alter dat

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Simon Riggs
On Fri, 2008-07-11 at 12:52 -0600, Scott Marlowe wrote: > On Fri, Jul 11, 2008 at 12:12 PM, Richard Broersma > <[EMAIL PROTECTED]> wrote: > > On Fri, Jul 11, 2008 at 10:27 AM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > > > >> Is there any way to set a different default fill factor? > > > > ALTER T

Re: [GENERAL] pgmemcache status

2008-07-11 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > I have a backtrace which follows below. Is this the best forum for this > or would you prefer private email, a bugzilla entry, etc? Probably private email for now. I'll make sure general and/or announce gets an announcement when we get a new

Re: [GENERAL] Complicated GROUP BY

2008-07-11 Thread Adam Rich
> > Dear All, > > I have the following problem with grouping: I want to know the maximum > in a group as well as the maximal element. Example: > > I have a table products_providers: > product | provider | criteria_1 | criteria_2 > > I have a number of products, each of them from a several

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Scott Marlowe
On Fri, Jul 11, 2008 at 12:12 PM, Richard Broersma <[EMAIL PROTECTED]> wrote: > On Fri, Jul 11, 2008 at 10:27 AM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > >> Is there any way to set a different default fill factor? > > ALTER TABLE Yourtable >SET ( FILLFACTOR = 50 ); Hehe. I know how to

Re: [GENERAL] PG_MODULE_MAGIC lost if strip the object file

2008-07-11 Thread Michael Enke
Alvaro Herrera wrote: Michael Enke wrote: Hi list, I create a dynamic library with the PG_MODULE_MAGIC under Linux. No problem in normal situation, but if I strip the .o file, that information seems to get lost and I get: ERROR: incompatible library "...so": missing magic block TIP: Extension

Re: [GENERAL] Hi there, new here and have question

2008-07-11 Thread Charles Simard
|> |> -Original Message- |> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Hendra |> Sent: 8 juillet 2008 02:59 |> To: pgsql-general@postgresql.org |> Subject: [GENERAL] Hi there, new here and have question |> |> Hi Everyone. |> I'm just subscribe to the mailing list |> I'm n

[GENERAL] Feature: FOR UPDATE SKIP LOCKED

2008-07-11 Thread Goldeneye Solutions Information
I'm been reading up on FOR UPDATE NOWAIT and it looks like It was added in 8.1. How difficult is it to add FOR UPDATE SKIP LOCKED or something similar? (basically skip locked rows / oracle syntax) More background here: http://forge.mysql.com/worklog/task.php?id=3597 It would be quite u

[GENERAL] Complicated GROUP BY

2008-07-11 Thread dgront
Dear All, I have the following problem with grouping: I want to know the maximum in a group as well as the maximal element. Example: I have a table products_providers: product | provider | criteria_1 | criteria_2 I have a number of products, each of them from a several providers. Each prod

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Richard Broersma
On Fri, Jul 11, 2008 at 10:27 AM, Scott Marlowe <[EMAIL PROTECTED]> wrote: > Is there any way to set a different default fill factor? ALTER TABLE Yourtable SET ( FILLFACTOR = 50 ); It take a bit of back tracking on the storage_parameter section: http://www.postgresql.org/docs/8.3/interac

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Scott Marlowe
On Fri, Jul 11, 2008 at 9:41 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Francisco Reyes" <[EMAIL PROTECTED]> writes: >> While reading >> http://www.postgresql.org/docs/8.3/interactive/sql-cluster.html I discovered >> that tables can have a fill factor. However, the create table page doesn't >> m

Re: [GENERAL] Update / Lock (and ShareLock) question

2008-07-11 Thread Augustin Amann
Tom Lane a écrit : Augustin Amann <[EMAIL PROTECTED]> writes: Tom Lane a écrit : What that really means is that the first process is waiting for a row lock that's held by the second one --- that is, it's trying to update a row that the second transaction has updated and not yet committe

Re: [GENERAL] Default fill factor for tables?

2008-07-11 Thread Tom Lane
"Francisco Reyes" <[EMAIL PROTECTED]> writes: > While reading http://www.postgresql.org/docs/8.3/interactive/sql-cluster.html > I discovered that tables can have a fill factor. However, the create table > page doesn't mention what the default is. 100% regards, tom lane

Re: [GENERAL] view row-level locks

2008-07-11 Thread Tom Lane
Vivek Khera <[EMAIL PROTECTED]> writes: > On Jul 11, 2008, at 4:24 AM, Richard Huxton wrote: >> If you just want to see if a lock has been taken (e.g. SELECT FOR >> UPDATE) then that shows in pg_locks. If you want details on the >> actual rows involved, then you probably want "pgrowlocks" menti

[GENERAL] Default fill factor for tables?

2008-07-11 Thread Francisco Reyes
While reading http://www.postgresql.org/docs/8.3/interactive/sql-cluster.html I discovered that tables can have a fill factor. However, the create table page doesn't mention what the default is. In the create index page it mentions the default for indexes is 90%. Is tables simmilar/same? -- S

Re: [GENERAL] Update / Lock (and ShareLock) question

2008-07-11 Thread Tom Lane
Augustin Amann <[EMAIL PROTECTED]> writes: > Tom Lane a écrit : >> What that really means is that the first process is waiting for a row >> lock that's held by the second one --- that is, it's trying to update a >> row that the second transaction has updated and not yet committed. > I understand.

Re: [GENERAL] view row-level locks

2008-07-11 Thread Vivek Khera
On Jul 11, 2008, at 4:24 AM, Richard Huxton wrote: If you just want to see if a lock has been taken (e.g. SELECT FOR UPDATE) then that shows in pg_locks. If you want details on the actual rows involved, then you probably want "pgrowlocks" mentioned in Appendix F. Additional Supplied Module

Re: [GENERAL] Update / Lock (and ShareLock) question

2008-07-11 Thread Augustin Amann
Tom Lane a écrit : Augustin Amann <[EMAIL PROTECTED]> writes: During lock, we could see things like this in log file: Process 5556 waits for ShareLock on transaction 14910066; blocked by process 4940. What that really means is that the first process is waiting for a row lock that's he

Re: [GENERAL] Update / Lock (and ShareLock) question

2008-07-11 Thread Tom Lane
Augustin Amann <[EMAIL PROTECTED]> writes: > During lock, we could see things like this in log file: > Process 5556 waits for ShareLock on transaction 14910066; blocked by > process 4940. What that really means is that the first process is waiting for a row lock that's held by the second one ---

Re: [GENERAL] Need help with constraint to prevent overlaps

2008-07-11 Thread Adam Rich
> > I'm building a shift-scheduling app. I want to make a constraint in my > database that prevents one human from being assigned to work two > different jobs at the same time. > > In other words, if I schedule John Doe to mop bathrooms from 10 AM > until > 4 PM, some other manager will not be a

[GENERAL] Update / Lock (and ShareLock) question

2008-07-11 Thread Augustin Amann
Hello, Is a important number of update (no transaction, just one statement after another) could result in ShareLock ? I read the doc, but it's not clear to me. There is a website (written with php, and using pg_connect), on two loadbalanced Webserver, and one PostgreSQL database, on another s

[GENERAL] Need help with constraint to prevent overlaps

2008-07-11 Thread Matthew Wilson
I'm building a shift-scheduling app. I want to make a constraint in my database that prevents one human from being assigned to work two different jobs at the same time. In other words, if I schedule John Doe to mop bathrooms from 10 AM until 4 PM, some other manager will not be able to schedule J

Re: [GENERAL] lc_ctype and lower()

2008-07-11 Thread Peter Eisentraut
Am Freitag, 11. Juli 2008 schrieb Gábor Farkas: > is the only solution to create a new database-instance? (initdb, new > port, etc.) ? You analysis is entirely correct. You have to re-initdb with a correct locale. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

[GENERAL] lc_ctype and lower()

2008-07-11 Thread Gábor Farkas
hi, i have a postgresql-8.2 database instance, which contained in the past a latin9 database. this database was later converted to utf8 (by dumping and reloading it). everything works fine, except that SELECT lower("Gábor") returns "gbor" (the 'á' is dropped). the problem seems to be that "S

Re: [GENERAL] view row-level locks

2008-07-11 Thread Richard Huxton
Michael Shulman wrote: Hi, This seems like it must be a common question, but Google can't find the answer for me. How do I view the currently open row-level locks? The manual says that the table pg_locks doesn't contain row-level locks, since they are stored on disk rather than in memory, but i

Re: [GENERAL] storing latitude and longitude

2008-07-11 Thread Ivan Zolotukhin
Hello, Probably the simplest way is to use built-in point type and GiST index over box(point, point). You will be able to make flat geometrical calculations (e.g. distance with <-> operator) and retrieve data in the box given with index support. Regards, Ivan On Thu, Jul 10, 2008 at 9:25 PM, ma

Re: [GENERAL] Top N within groups?

2008-07-11 Thread Martijn van Oosterhout
On Fri, Jul 11, 2008 at 01:24:28PM +1000, Klint Gore wrote: > [thinking out loud] > Can someone familiar with the source for DISTINCT ON comment on how hard > it would be to add another parameter to return more than one row? From a programming point of view, it wouldn't be too hard. However, dec

[GENERAL] view row-level locks

2008-07-11 Thread Michael Shulman
Hi, This seems like it must be a common question, but Google can't find the answer for me. How do I view the currently open row-level locks? The manual says that the table pg_locks doesn't contain row-level locks, since they are stored on disk rather than in memory, but it doesn't say how one can