Re: [GENERAL] Source RPMs for PostgreSQL 7.4.27 on RHEL4

2010-02-16 Thread Devrim GÜNDÜZ
On Tue, 2010-02-16 at 17:13 -0600, Justin Pasher wrote: > I'm having trouble finding the latest Postgres 7.4.27 source RPMs. I just started uploading SRPMs to ftp.postgresql.org. It will take a few hours to sync. Regards, -- Devrim GÜNDÜZ, RHCE PostgreSQL Danışmanı/Consultant, Red Hat Certifie

Re: [GENERAL] Why am I getting this error in DB

2010-02-16 Thread Ben Chobot
On Feb 16, 2010, at 9:39 PM, AI Rumman wrote: > How should I calculate the value of max_fsm_pages? Adding pages is cheap, so I would take the value it says you need (858976) and bring it up to the next power of 10. Especially because changing it requires a restart. Of course, if you've been doi

Re: [GENERAL] Why am I getting this error in DB

2010-02-16 Thread AI Rumman
How should I calculate the value of max_fsm_pages? Thanks On Wed, Feb 17, 2010 at 11:25 AM, Ben Chobot wrote: > On Feb 16, 2010, at 9:17 PM, AI Rumman wrote: > > > Why am I getting this error in DB? > > > > - number of page slots needed (858976) exceeds max_fsm_pages (356656) > > > Because you

Re: [GENERAL] Why am I getting this error in DB

2010-02-16 Thread Ben Chobot
On Feb 16, 2010, at 9:17 PM, AI Rumman wrote: > Why am I getting this error in DB? > > - number of page slots needed (858976) exceeds max_fsm_pages (356656) Because you have more pages that need to be cleaned during the vacuum than you have room for in your configured free space map (max_fsm

[GENERAL] Why am I getting this error in DB

2010-02-16 Thread AI Rumman
Why am I getting this error in DB? - number of page slots needed (858976) exceeds max_fsm_pages (356656)

Re: [GENERAL] pgpool error, pid not found!

2010-02-16 Thread Tatsuo Ishii
How did you start pgpool exactly(command line)? Also, the number "" dpends on pgpool.conf. Can you show me pgpool.conf? -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp > >From the README file , I found that " psql -p -c

Re: [GENERAL] pgpool error, pid not found!

2010-02-16 Thread Tatsuo Ishii
pgpool.pid file contains pgpool's parent process id. That message indicates that the file exists but the pgpool process id does not exist. Probably pgpool was stopped in unclean way. You may ignore the message as long as pgpool starts ok. -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sra

[GENERAL] pgpool error, pid not found!

2010-02-16 Thread Megha
Hi I have installed pgpool in /home/megha/pgpool dir. I found pgpool.pid file in /tmp folder. when I try to start pgpool I get this error. *pid file found but it seems bogus. Trying to start pgpool anyway..* Please help me! Thanks, -- Megha

[GENERAL] Need to know how rules work?

2010-02-16 Thread Andre Lopes
Hi, I have created this table: [quote] CREATE OR REPLACE VIEW "am_newsletter_distritos" AS select * from atm_newsletter_distritos; CREATE OR REPLACE RULE "ins_am_newsletter_distritos" AS ON INSERT TO "am_newsletter_distritos" DO INSTEAD (insert into atm_newsletter_distritos (email, id_distr

Re: [GENERAL] No tables in postgres and template db

2010-02-16 Thread Daniel Verite
Marco Battelapesca wrote: > A little strange thing. as you can read, the console desn't give me again > "postgres=#" but "END". Only typing "q" i have again "postgres=#" wirh > cursor but the selected table with rows and columns disappears It's a pager issue. A simple way to avoid it is t

[GENERAL] No tables in postgres and template db

2010-02-16 Thread Marco Battelapesca
Hi all, i'm a newby in postgresql. Now i'm learning ddl and sql. In the future i'dd like to learn db management. Yesterday i installed Windows 7 64 bit into one partition and ubuntu 6.10 64 bit into the other (i've decided to learn linux as well). I installed the last version of potgresql and the

Re: [GENERAL] Source RPMs for PostgreSQL 7.4.27 on RHEL4

2010-02-16 Thread Tom Lane
Justin Pasher writes: > Any idea where I can grab the 7.4.27 source RPMs? Thanks. If you've got an SRPM for 7.4.n-1, it shouldn't be that hard to make your own for 7.4.n. The patches generally don't change much, if at all, across minor releases. regards, tom lane -- Se

Re: [GENERAL] Source RPMs for PostgreSQL 7.4.27 on RHEL4

2010-02-16 Thread Joshua D. Drake
On Tue, 2010-02-16 at 17:13 -0600, Justin Pasher wrote: > It seems like I run into this problem with every new version release. > > I'm having trouble finding the latest Postgres 7.4.27 source RPMs. I was > able to find the latest 8.1.19 source RPMS here > (http://yum.pgsqlrpms.org/srpms/8.1/red

[GENERAL] Source RPMs for PostgreSQL 7.4.27 on RHEL4

2010-02-16 Thread Justin Pasher
It seems like I run into this problem with every new version release. I'm having trouble finding the latest Postgres 7.4.27 source RPMs. I was able to find the latest 8.1.19 source RPMS here (http://yum.pgsqlrpms.org/srpms/8.1/redhat/rhel-4-i386/), which I also need, but the 7.4 source RPMs do

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Peter Geoghegan
>> Aren't my requirements sufficiently common to justify developing a >> mechanism to report progress back to client applications during batch >> operations and the like? > > Have you experimented with RAISE NOTICE?  Using it this way is a bit of > a hack maybe, but I think you are entirely unaware

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Tom Lane
Peter Geoghegan writes: > Aren't my requirements sufficiently common to justify developing a > mechanism to report progress back to client applications during batch > operations and the like? Have you experimented with RAISE NOTICE? Using it this way is a bit of a hack maybe, but I think you are

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Peter Geoghegan
> Don't suppose you're volunteering? :-) I've already looked at the SRF documentation. It doesn't look all that intimidating, and I might be willing to have a go if we can first build some consensus on what this ought to look like. Can we? Regards, Peter Geoghegan -- Sent via pgsql-general mail

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Richard Huxton
On 16/02/10 20:40, Peter Geoghegan wrote: Can't someone think of a way of doing this as a neat adjunct to Postgres? Lots of people can think of ways of doing this. Not so many are prepared to devote the time and effort to making it happen. In fact, by definition, so far there have been zero

[GENERAL] ERROR: permission denied to finish prepared transaction

2010-02-16 Thread David Kerr
I'm seeing a bunch of these error messages: Feb 16 12:04:51 QA-HC01-DB01 postgres-hc01[26420]: [2-1] user=xy,db=x,pid=26420 ERROR: permission denied to finish prepared transaction Feb 16 12:04:51 QA-HC01-DB01 postgres-hc01[26420]: [2-2] user=xy,db=x,pid=26420 HINT: Must be superuser or the user

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Peter Geoghegan
> We've had several requests for progress reporting thingies of all kinds. > The amount of effort is not insignificant, which is probably why nothing > has gotten done yet ... What do you mean by "reporting thingies of all kinds"? It isn't as if I'm asking for some esoteric feature, some regional

Re: [GENERAL] Postgres physical directory structure meaning

2010-02-16 Thread Andreas Kretschmer
Bruce Momjian wrote: > A. Kretschmer wrote: > > In response to S Arvind : > > > I want to know about the meaning of various directory present in data > > > folder. > > > Mostly what will the 'base' folder contains? The reason of this is > > > recently in > > > the datafolder 'global' was delete

Re: [GENERAL] Postgres physical directory structure meaning

2010-02-16 Thread Bruce Momjian
A. Kretschmer wrote: > In response to S Arvind : > > I want to know about the meaning of various directory present in data > > folder. > > Mostly what will the 'base' folder contains? The reason of this is recently > > in > > the datafolder 'global' was deleted unknowingly which leads to entire D

Re: [GENERAL] COPY FROM wish list

2010-02-16 Thread Scott Bailey
Marc Mamin wrote: Hello, Looking at the TODO List, I feel that only some aspects of the COPY FROM command are adressed. Could a discussion trigger some activity on this topic :o) ? Best regards, Marc Mamin Here my wish list: COPY tablename [ ( column [, ...] ) ] FROM { 'filename' |

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Alvaro Herrera
Peter Geoghegan escribió: > > It is possible to code set-returning functions in a suspend-and-resume > > style, but none of the available PLs do that; you have to get down to > > the C level. > > Aren't my requirements sufficiently common to justify developing a > mechanism to report progress back

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Peter Geoghegan
> It is possible to code set-returning functions in a suspend-and-resume > style, but none of the available PLs do that; you have to get down to > the C level. Aren't my requirements sufficiently common to justify developing a mechanism to report progress back to client applications during batch o

Re: [GENERAL] Check what a transaction did in the past

2010-02-16 Thread Tom Lane
Alvaro Herrera writes: > manugarciac wrote: >> I have an Idle in transaction that's really long. I suspect there is a >> problem in my application, but I can't figure out where. If I new which >> queries that transaction did in the past, it would really help me find the >> problem. I know the tran

Re: [GENERAL] Check what a transaction did in the past

2010-02-16 Thread Alvaro Herrera
manugarciac wrote: > > I have an Idle in transaction that's really long. I suspect there is a > problem in my application, but I can't figure out where. If I new which > queries that transaction did in the past, it would really help me find the > problem. I know the transaction id, the process id,

Re: [GENERAL] relacl parsing method?

2010-02-16 Thread Alvaro Herrera
Josip Rodin wrote: > Hi, > > I want to find out whether a user has a select privilege on a particular > database. You're probably better off using the has_foo_privilege family of functions, e.g., has_table_privilege(). -- Alvaro Herrerahttp://www.CommandPrompt.c

Re: [GENERAL] relacl parsing method?

2010-02-16 Thread Tom Lane
Josip Rodin writes: > I want to find out whether a user has a select privilege on a particular > database. This is what I see when it does: Consider using has_table_privilege() instead of reading the ACL for yourself. regards, tom lane -- Sent via pgsql-general mailing

Re: [GENERAL] relacl parsing method?

2010-02-16 Thread Josip Rodin
On Tue, Feb 16, 2010 at 12:22:29PM +0100, joy wrote: > I want to find out whether a user has a select privilege on a particular > database. This is what I see when it does: > > # select relacl from pg_class where relname = 'mydbtable'; > relacl > -

[GENERAL] relacl parsing method?

2010-02-16 Thread Josip Rodin
Hi, I want to find out whether a user has a select privilege on a particular database. This is what I see when it does: # select relacl from pg_class where relname = 'mydbtable'; relacl -- {

[GENERAL] Check what a transaction did in the past

2010-02-16 Thread manugarciac
I have an Idle in transaction that's really long. I suspect there is a problem in my application, but I can't figure out where. If I new which queries that transaction did in the past, it would really help me find the problem. I know the transaction id, the process id, everything there is to know,

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Tom Lane
Peter Geoghegan writes: > Cursors simply address the problem of "impedance mismatch" (the use of > that term in this way probably pre-dates ORM, so please don't tell me > that that term refers exclusively to an ORM problem within an RDBMS > context). You don't have to fetch the result set all at o

Re: [GENERAL] possible bug with inheritance?

2010-02-16 Thread Bruce Momjian
Wow, you are right that this is really weird. I think the fundamental issue is that PRIMARY KEY does not pass down to the child (and hence NOT NULL doesn't either), while NOT NULL does pass to the child. A larger question is why PRIMARY KEY doesn't pass to the child. If there is a good reason f

Re: [GENERAL] Postgres physical directory structure meaning

2010-02-16 Thread Alvaro Herrera
S Arvind escribió: > I want to know about the meaning of various directory present in data > folder. Mostly what will the 'base' folder contains? The reason of this is > recently in the datafolder 'global' was deleted unknowingly which leads to > entire DB crash in a second. "global" contains some

Re: [GENERAL] Week numbers and calculating weekly statistics/diagrams

2010-02-16 Thread Thom Brown
On 16 February 2010 12:14, Alexander Farber wrote: > Hello, > > I have multiplayer card game in Flash/Perl/C and would > like to add weekly tournaments/player ratings to it. > > This means I have to add a table which holds: > player id, weekly score (which I update after each round) > and the week

Re: [GENERAL] Week numbers and calculating weekly statistics/diagrams

2010-02-16 Thread Greg Smith
Alexander Farber wrote: Does anybody has an advice how to save the week number? If I save it as a timestamp then calculating realtime statistics (on a player profile click) will probably be CPU-intensive, because I have to calculate the week numbers each time. If I save it as string "2010/52" t

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Peter Geoghegan
> It seems you're right, I built a simple test-case (see attachment) using > timeofday(). The numbers from fetching from a cursor over the set-returning > function run away from the selects that directly call timeofday() in between. > In my case I pause the _client_ between calls, but the results

Re: [GENERAL] Week numbers and calculating weekly statistics/diagrams

2010-02-16 Thread Martijn van Oosterhout
On Tue, Feb 16, 2010 at 01:14:26PM +0100, Alexander Farber wrote: > Does anybody has an advice how to save the week number? > > If I save it as a timestamp then calculating realtime statistics > (on a player profile click) will probably be CPU-intensive, > because I have to calculate the week numb

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Alban Hertroys
On 16 Feb 2010, at 12:35, Peter Geoghegan wrote: > As I've already said, the problem with this approach is that I see all > 3 messages at once, when the CONNECTION_EXCEPTION is thrown and we > finally RETURN, after about 7 seconds (which is undoubtedly how > RETURNS TABLE is documented to behave).

[GENERAL] Week numbers and calculating weekly statistics/diagrams

2010-02-16 Thread Alexander Farber
Hello, I have multiplayer card game in Flash/Perl/C and would like to add weekly tournaments/player ratings to it. This means I have to add a table which holds: player id, weekly score (which I update after each round) and the week number. Does anybody has an advice how to save the week number?

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Peter Geoghegan
> I assumed you were generating the progress indicator from query results in a > remote DB. It turns out that's entirely not what you're doing, but how were > we supposed to know that? > Well, it made sense to leave dblink mostly out of things (it's a useful way to get a function to block though

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Alban Hertroys
On 16 Feb 2010, at 10:34, Peter Geoghegan wrote: >> I'd think RETURN NEXT would behave the way you want it to. There's probably >> something in your function causing your function to behave like it does now. >> I suspect the problem lies in the way you determine how far you've >> progressed, bu

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Peter Geoghegan
> I'd think RETURN NEXT would behave the way you want it to. There's probably > something in your function causing your function to behave like it does now. > I suspect the problem lies in the way you determine how far you've > progressed, but you didn't tell us anything about your function, so

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Pavel Stehule
2010/2/16 Alban Hertroys : > On 16 Feb 2010, at 1:04, Peter Geoghegan wrote: > >> Hello, >> >> At the moment my pg client application (running 8.4) transfers data >> from several remote DBs (that run 8.3) via dblink, using cursors where >> appropriate, and reporting back progress to users using a p

Re: [GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-16 Thread Alban Hertroys
On 16 Feb 2010, at 1:04, Peter Geoghegan wrote: > Hello, > > At the moment my pg client application (running 8.4) transfers data > from several remote DBs (that run 8.3) via dblink, using cursors where > appropriate, and reporting back progress to users using a progress bar > and brief messages.

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-16 Thread Tommy Gildseth
Andre Lopes wrote: I have contacted again the support center on a2hosting.com and the answer was that is no manual creation of triggers on PostgreSQL, bu the guy have send to me a link with MySQL information about the subject, https://support.a2hosting.com/index.php?_m=k