Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-10 Thread 乔志强
> Yes, increase wal_keep_segments. Even if you set wal_keep_segments to 64, the > amount of disk space for WAL files is only 1GB, so there is no need to worry > so much, I think. No? But when a transaction larger than 1GB... If synchronous_standby_names = '*', when commit the master wait the

Re: [GENERAL] 9.1.3 Standby catchup mode

2012-04-10 Thread Fujii Masao
On Fri, Apr 6, 2012 at 1:35 AM, hans wulf wrote: > I am wondering how the catchup mode of a hot synchron slave server works on > 9.1.3 if there is no WAL archive. > > Can the slave only request WALs that are still in the xlog directory of the > master server? Or does the master regenerate some k

[GENERAL] pltcl and modules

2012-04-10 Thread hamann . w
Hi, I recently found out about critcl, which does a fairly decent job of converting a C fragment inside a tcl procedure into a loadable module. Now, if I wanted to use the same code inside pltcl, would that be possible? If yes, any special precautions other than getting the file paths right? R

Fwd: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-10 Thread Michael Nolan
-- Forwarded message -- From: Michael Nolan Date: Tue, Apr 10, 2012 at 9:47 PM Subject: Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ? To: Fujii Masao On Tue, Apr 10, 2012 at 9:09 PM, Fujii Masao wrote: > On Wed, Apr 11, 2012 at 10:06 AM, 乔志强 > > > >

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-10 Thread Fujii Masao
On Wed, Apr 11, 2012 at 10:06 AM, 乔志强 wrote: > synchronous_commit is not set, default is "on" ? > #synchronous_commit = on                # synchronization level; on, off, or > local Yes. >>Otherwise the master might be filled up with lots of unsent WAL files and >>which might cause PANIC erro

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-10 Thread 乔志强
Thank you for this good feature and your reply. synchronous_commit is not set, default is "on" ? #synchronous_commit = on# synchronization level; on, off, or local >Otherwise the master might be filled up with lots of unsent WAL files and >which might cause PANIC error in the m

Re: [GENERAL] Resize numeric column without changing data?

2012-04-10 Thread Lukas Eklund
On Mon, Apr 9, 2012 at 6:16 PM, Jeff Davis wrote: > On Mon, 2012-04-09 at 16:06 -0400, Lukas Eklund wrote: >> Ah. I must have not noticed that the typmod for views is not inherited >> automatically. I'm okay with developing a script to recreate the 15 or >> so views the depend on that table. What

Re: [GENERAL] trigger when clause

2012-04-10 Thread Jeff Davis
On Tue, 2012-04-10 at 16:15 -0400, Andy Chambers wrote: > Does anyone know the time complexity of the algorithm used to handle > triggers with a when clause? It's done with a linear scan of all triggers, testing the WHEN clause for each. > To make this a little more concrete, what is likely to

Re: [GENERAL] Pg 9.1.3 pg_crypto question

2012-04-10 Thread Aaron Burnett
Thanks, Tom. That was exactly it. Best Regards On 4/10/12 2:50 PM, "Tom Lane" wrote: >Aaron Burnett writes: >> 9.1.3 is just not decrypting nor throwing errors. > >> 9.1.3# select decrypt_iv(decode('rkMRWpnnbjaFoHyLmCD/bg==', 'base64'), >> decode('bcRJvbqeWMPDXMtIP8pPOQ==', 'base64'), '0

Re: [GENERAL] efficient trigger function selection?

2012-04-10 Thread Jeff Davis
On Tue, 2012-04-10 at 16:07 -0400, Kenneth Tilton wrote: > Suppose I have an RDF-style table (with columns for subject, > predicate, various object types, and graph) and want to have dozens or > even hundreds of trigger functions defined conditionally on the > predicate, ie "when predicate = ''". >

Re: [GENERAL] Pg 9.1.3 pg_crypto question

2012-04-10 Thread Tom Lane
Aaron Burnett writes: > 9.1.3 is just not decrypting nor throwing errors. > 9.1.3# select decrypt_iv(decode('rkMRWpnnbjaFoHyLmCD/bg==', 'base64'), > decode('bcRJvbqeWMPDXMtIP8pPOQ==', 'base64'), '', > 'aes-cbc'); > decrypt_iv > -- > \x48656c6c6f2054

[GENERAL] trigger when clause

2012-04-10 Thread Andy Chambers
Hi, Does anyone know the time complexity of the algorithm used to handle triggers with a when clause? To make this a little more concrete, what is likely to perform better a) A single trigger with "n" if/else clauses b) A set of "n" triggers each using a different when clause. What if n is 10?

[GENERAL] efficient trigger function selection?

2012-04-10 Thread Kenneth Tilton
Suppose I have an RDF-style table (with columns for subject, predicate, various object types, and graph) and want to have dozens or even hundreds of trigger functions defined conditionally on the predicate, ie "when predicate = ''". My guess is Postgres is quite efficient at determining which if a

[GENERAL] Pg 9.1.3 pg_crypto question

2012-04-10 Thread Aaron Burnett
Hi, Finally upgrading from 8.2.5 to 9.1.3 (got the latest release as of 3/12/2012) OS: Ubuntu 11.10 The only issue I am encountering is in the pg_crypto/decrypt_iv/decode No errors in the log, but here's what I am seeing on both 8.2.5 and 9.1.3, I am hoping someone can help me out here: 8.2.5#

Re: [GENERAL] measure time intervals

2012-04-10 Thread John R Pierce
On 04/10/12 6:48 AM, Raymond O'Donnell wrote: Windows can adjust the time using NTP also, though I don't know how abruptly or otherwise it does it. Under your date & time settings there should be an "Internet time" tab. the built in Windows Internet Time does a time step every 24 hours(or so

Re: [GENERAL] question about alternate ordering of results

2012-04-10 Thread Tom Lane
haman...@t-online.de writes: > declaring another operator class helped. At first, however, > results were sorted deifferent than expected. A little gdb session revealed > that > if fact only the FUNCTION 1 entry in the operator class is used Well, yeah, the function had better match the operators

[GENERAL] PgNext CFP still open

2012-04-10 Thread Joshua D. Drake
Hey, Just a small reminder that the CFP for PgNext in Denver is still open. Let's get those talks in! https://www.postgresqlconference.org/ JD -- Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Support, Training, Professional Services and Development The PostgreSQL Conference

Re: [GENERAL] question about alternate ordering of results

2012-04-10 Thread hamann . w
Hi Tom, declaring another operator class helped. At first, however, results were sorted deifferent than expected. A little gdb session revealed that if fact only the FUNCTION 1 entry in the operator class is used Regards Wolfgang Hamann >> >> haman...@t-online.de writes: >> > Now, in versions

Re: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-10 Thread Fujii Masao
On Mon, Apr 9, 2012 at 7:33 PM, 乔志强 wrote: > Question: > Why the master deletes the WAL segment before send to standby in synchronous > mode? Otherwise the master might be filled up with lots of unsent WAL files and which might cause PANIC error in the master, when there is no standby. IOW, the

Re: [GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread Andrew Sullivan
On Tue, Apr 10, 2012 at 09:43:52AM -0500, Merlin Moncure wrote: > Mostly no. A hardwired restriction is that a view has a rigidly > defined list of columns with defined types. You can skirt that > restriction a couple of ways -- for example your view could be a > single column text (or xml, or

Re: [GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 9:31 AM, Mika M Lehtonen wrote: > Merlin, > thanks for your reply. Semidoable? Let's break this into parts: > 1) Is it possible to create a view which have dynamic number of colums based > on the select response? Mostly no. A hardwired restriction is that a view has a rig

Re: [GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread Mika M Lehtonen
Merlin, thanks for your reply. Semidoable? Let's break this into parts: 1) Is it possible to create a view which have dynamic number of colums based on the select response? 2) Is it possible to name view colums based on some data retrieved with select statement? My pseudo definition, which was

Re: [GENERAL] measure time intervals

2012-04-10 Thread Vincent Dautremont
Thank you. I was searching if there was such feature included in postgresql. I'll find another way around to achieve what I want with this. As I have to use windows NTP colient and not a 3rd party client I'll go check windows NTP client configuration, see if I can make it act as the Unix one does.

Re: [GENERAL] measure time intervals

2012-04-10 Thread Raymond O'Donnell
On 10/04/2012 14:39, Vincent Dautremont wrote: > Thank you but my problem is precisely because I'm using Postrgresql on a > windows computer and I cannot change that :-/ Windows can adjust the time using NTP also, though I don't know how abruptly or otherwise it does it. Under your date & time set

Re: [GENERAL] measure time intervals

2012-04-10 Thread Merlin Moncure
On Thu, Apr 5, 2012 at 9:00 AM, Vincent Dautremont wrote: > Hi, > I'm wondering ig it is possible to measure elapsed time between 2 particular > queries in PostgreSQL. > > what I need is the equivalent of @@TIMETICKS in Transac-SQL > or CLOCK_MONOTONIC  in Unix > or GetTickCount in Windows > > The

Re: [GENERAL] measure time intervals

2012-04-10 Thread Vincent Dautremont
Thank you but my problem is precisely because I'm using Postrgresql on a windows computer and I cannot change that :-/ Vincent. On Fri, Apr 6, 2012 at 1:40 PM, John R Pierce wrote: > On 04/05/12 7:00 AM, Vincent Dautremont wrote: > >> These are not affected by system time changes, so time inter

Re: [GENERAL] Instangram is powered by PostgreSQL

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 12:50 AM, unclesam wrote: > just wanna to share that Instagram use PostgreSQL. excellent ! this company > worth for 1 billion is powered by PostgreSQL > > Click link below > > http://highscalability.com/blog/2012/4/9/the-instagram-architecture-facebook-bought-for-a-cool-bil

Re: [GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 4:27 AM, wrote: > > Let's say I have tens or hundreds or thousands of feature (instance) types. > Each of them would need its own table. > Let's say I give for the application administrator, a possibility to create > new feature types? He/she merely knows what's the databa

Re: [GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread mika
This schema is in use in one quite big system, which utilizes different DB than Postgresql. It is fully functional. - mika - On Tue, 10 Apr 2012 02:19:14 -0700, David Johnston wrote: On Apr 10, 2012, at 1:52, wrote: Quite challanging, right? Aside from the possibly extremely rare c

Re: [GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread mika
Let's say I have tens or hundreds or thousands of feature (instance) types. Each of them would need its own table. Let's say I give for the application administrator, a possibility to create new feature types? He/she merely knows what's the database is. So I need a model which is capable for of

Re: [GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread David Johnston
On Apr 10, 2012, at 1:52, wrote: > > Quite challanging, right? > Aside from the possibly extremely rare case where this is actually functional the only challenging task is to tell off whomever gave you the idea/requirement that your schema is desirable - even if that person is yourself. Tha

Re: [GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread John R Pierce
On 04/10/12 1:52 AM, m...@digikartta.net wrote: Quite challanging, right? yes. and quite contrary to the relational data model. whats the point of going to all this abstraction? -- john r pierceN 37, W 122 santa cruz ca mid-left coast -

[GENERAL] Is this doable using Postgresql crosstab or some other function?

2012-04-10 Thread mika
Hi folkes, this is my first message on this list. I have quite a challenging problem and my own skills seem not to be adequate for resolving it. I have a relational model where the basic idea is to store data vertically instead using traditional horizontal approach. So instead of having a row

[GENERAL] 答复: [GENERAL] [streaming replication] 9.1.3 streaming replication bug ?

2012-04-10 Thread 乔志强
>I see if no standby connect to master when synchronous_standby_names = > '*', all commit will delay to standby connect to master. It is good. So I think the commit is sync between master and standby, But why the master delete the WAL segment before the standby commit when the standby connec

Re: [GENERAL] PostgreSQL pgstat wait timeout question

2012-04-10 Thread raghu ram
On Tue, Apr 10, 2012 at 12:39 PM, tuanhoanganh wrote: > I am running windows 2003 R2 (64 bit) - PostgreSQL 9.0.6 - 64bit. > Today PostgreSQL has alot pgstat wait timeout in log. > How to fix the PostgreSQL WARNING?? > > Tuan Hoang ANh > > This warning message shows in database server log file, if

Re: [GENERAL] Download not found for SEPostgreSQL

2012-04-10 Thread Yeb Havinga
On 2012-04-10 09:40, John R Pierce wrote: On 04/09/12 11:39 PM, Eye Gee wrote: We would like to implement the security-enhanced postgresql (SEPostgreSQL ) on SUSE SP1. However we are unable to find the rpm packages. Is SEPostgreSQL still available? We are using postgreSQL 9.1 and would like to

Re: [GENERAL] Download not found for SEPostgreSQL

2012-04-10 Thread John R Pierce
On 04/09/12 11:39 PM, Eye Gee wrote: We would like to implement the security-enhanced postgresql (SEPostgreSQL ) on SUSE SP1. However we are unable to find the rpm packages. Is SEPostgreSQL still available? We are using postgreSQL 9.1 and would like to use 9.1 version of SEPostgreSQL but the rp

[GENERAL] Download not found for SEPostgreSQL

2012-04-10 Thread Eye Gee
Hi, We would like to implement the security-enhanced postgresql (SEPostgreSQL ) on SUSE SP1. However we are unable to find the rpm packages. Is SEPostgreSQL still available? We are using postgreSQL 9.1 and would like to use 9.1 version of SEPostgreSQL but the rpm download is not available. Ple

[GENERAL] PostgreSQL pgstat wait timeout question

2012-04-10 Thread tuanhoanganh
I am running windows 2003 R2 (64 bit) - PostgreSQL 9.0.6 - 64bit. Today PostgreSQL has alot pgstat wait timeout in log. How to fix the PostgreSQL WARNING?? Tuan Hoang ANh

Re: [GENERAL] Instangram is powered by PostgreSQL

2012-04-10 Thread Darren Duncan
unclesam wrote: just wanna to share that Instagram use PostgreSQL. excellent ! this company worth for 1 billion is powered by PostgreSQL Click link below http://highscalability.com/blog/2012/4/9/the-instagram-architecture-facebook-bought-for-a-cool-billio.html http://instagram-engineering.tum