Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread FarjadFarid(ChkNet)

 Hi All,

I just saw this thread. 

I tend to agree with the general idea of having a code of conduct. If you are 
on a long distance journey then it will help to have road signs every now and 
then. Following your nose won't hurt but doesn't necessarily help either! LOL 

More seriously, on the point about making Postgresql a success. I think it is 
already a success and can become bigger and better by having not just higher 
standards but also by having a business structure that allows larger number of 
companies making money out of it. This will draw more business towards the 
product.

When the Sun Microsystem went bust and was taken over by Oracle. It was a clear 
evidence that open source doesn't work commercially not even for an innovative 
company like Sun. 

Sun's experience demonstrates that commercial success is not just about better 
products. The business structure, development, marketing and pricing are all 
very important.

I am not in favour of massive price structures but that there should be 
$100-$200 costs for smallest version. Times several million products. This may 
allow postgresql to reduce its prices on its the top of the range products. 


Hope this helps. 

Well done guys you are doing a great job. 

Wish you all the best in 2016



Farjad Farid




-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread Pavel Stehule
2016-01-06 9:20 GMT+01:00 David Rowley :

> On 6 January 2016 at 20:36, Pavel Stehule  wrote:
>
>>  Almost all developers write code for job not for hobby.
>>
>
> As much as I'm trying not to get involved in this thread mainly due to my
> lack of ability to foresee that a block of text will solve a bunch of
> problems, I do just want to point out that before I joined 2ndQuadrant that
> PostgreSQL for me was a hobby, and I did submit several patches which were
> accepted and committed. I had no sort of financial interest at all in doing
> this, I did it for free, with the only form of reward that I received was
> that it made me happy when when my code was accepted. The only thing I
> wanted out of this was to improve my skills, and I thought working with
> PostgreSQL, due to it having very high coding standards was a good choice
> for a way to do this.  If there was something being proposed here which
> would encourage more people to do as I did, then I think that would be a
> bonus. Perhaps someone may mumble something in disagreement about that
> though.
>

you are like me and all here - 1/1

Regards

Pavel


>
> It's hard for me to imagine that I've been the only person to do this.
>
> --
>  David Rowley   http://www.2ndQuadrant.com/
> 
>  PostgreSQL Development, 24x7 Support, Training & Services
>


Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread Karsten Hilbert
On Wed, Jan 06, 2016 at 11:22:17AM -, FarjadFarid(ChkNet) wrote:

> I am not in favour of massive price structures but that
> there should be $100-$200 costs for smallest version. Times
> several million products. This may allow postgresql to reduce
> its prices on its the top of the range products. 

You may be mistaking the community version for any of the
commercially supported offerings ?

Regards,
Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread Karsten Hilbert
> I agree with Jim, something is wrong, I see our developers community isn't 
> growing and getting older.
> There is no formal problem to start contribute, but steep learning curve and
> lack of mentoring practice scare people.

The "Debian Med" Debian Blend has quite successfully used a
semi-structured mentoring effort to attract new package maintainers:

   https://wiki.debian.org/DebianMed/MoM

For what it is worth...

Karsten Hilbert


-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread FarjadFarid(ChkNet)
Hi Everyone ,

 

My only aim is further progress of postgresql. Emails are not the best medium 
for consulting about complex issues. 

 

One last point I would like to make is this.  

 

As per Sun Microsystem’s case charging zero dollars (for Java and mysql)  means 
there is zero income.

I have said all I wish to say. 

 

Whatever is the decision of the team I will happily support them. 

 

Good luck.

 

 

Farjad Farid

 

 

 

From: James Keener [mailto:j...@jimkeener.com] 
Sent: 06 January 2016 14:29
To: FarjadFarid(ChkNet); 'Karsten Hilbert'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Code of Conduct: Is it time?

 

What are you talking about? What business structure? Commercial offerings can 
and will continue to exist in terms of custom features or consulting.

Firstly, it ceases to be a community version when there is a charge. Secondly, 
it would damage our community by shrinking the size to effectively none while a 
hard fork (or more) spring up and people migrate to them. Moreover, unless you 
change the license people will redistribute newer versions for free.

So, while I have no say so in any of this, I believe it would be a very short 
sighted move. There are many other ways that money for the oss/foundation can 
be raised if money or supplies are needed.

Jim

On January 6, 2016 9:14:21 AM EST, "FarjadFarid(ChkNet)" 
 wrote:

Hi Karsten,
 You may be mistaking the community version for any of the commercially
supported offerings ?

It is possible. Please fill in the figures. 

What I am suggesting is that even for community version there should be a
charge. 

But as I mentioned it is not just prices. 

May be I wasn't very clear the most important factor is the business
structure then quality of products and marketing together with pricing.   

As a further example consider how a very small company like ARM beat giants
like Intel and Samsung in the mobile phone industry.  

It is their business model that is not profitable for Intel and Samsung to
emulate. 

*Of course they have a great products. Equally importantly their business
model makes it
realistic and profitable for other 
companies to use their services.  *

I am only providing some food for thought. For me we can all learn from
other people's successes and failures. 

I for one think everyone on the team have done a great job bringing
postgresql to this stage. 

Good luck



Farjad Farid




-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Karsten Hilbert
Sent: 06 January 2016 11:32
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Code of Conduct: Is it time?

On Wed, Jan 06, 2016 at 11:22:17AM -, FarjadFarid(ChkNet) wrote:
 I am not in favour of massive price structures but that there should 
 be $100-$200 costs for
smallest version. Times several million 
 products. This may allow postgresql to reduce its prices on its the 
 top of the range products.

You may be mistaking the community version for any of the commercially
supported offerings ?

Regards,
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread FarjadFarid(ChkNet)
Hi Karsten,

> You may be mistaking the community version for any of the commercially
supported offerings ?

It is possible. Please fill in the figures. 

What I am suggesting is that even for community version there should be a
charge. 

But as I mentioned it is not just prices. 

May be I wasn't very clear the most important factor is the business
structure then quality of products and marketing together with pricing.   

As a further example consider how a very small company like ARM beat giants
like Intel and Samsung in the mobile phone industry.  

It is their business model that is not profitable for Intel and Samsung to
emulate. 

I am only providing some food for thought. For me we can all learn from
other people's successes and failures. 

I for one think everyone on the team have done a great job bringing
postgresql to this stage. 

Good luck



Farjad Fari




-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Karsten Hilbert
Sent: 06 January 2016 11:32
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Code of Conduct: Is it time?

On Wed, Jan 06, 2016 at 11:22:17AM -, FarjadFarid(ChkNet) wrote:

> I am not in favour of massive price structures but that there should 
> be $100-$200 costs for smallest version. Times several million 
> products. This may allow postgresql to reduce its prices on its the 
> top of the range products.

You may be mistaking the community version for any of the commercially
supported offerings ?

Regards,
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread FarjadFarid(ChkNet)
Hi Karsten,

> You may be mistaking the community version for any of the commercially
supported offerings ?

It is possible. Please fill in the figures. 

What I am suggesting is that even for community version there should be a
charge. 

But as I mentioned it is not just prices. 

May be I wasn't very clear the most important factor is the business
structure then quality of products and marketing together with pricing.   

As a further example consider how a very small company like ARM beat giants
like Intel and Samsung in the mobile phone industry.  

It is their business model that is not profitable for Intel and Samsung to
emulate. 

*Of course they have a great products. Equally importantly their business
model makes it realistic and profitable for other 
companies to use their services.  *

I am only providing some food for thought. For me we can all learn from
other people's successes and failures. 

I for one think everyone on the team have done a great job bringing
postgresql to this stage. 

Good luck



Farjad Farid




-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Karsten Hilbert
Sent: 06 January 2016 11:32
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Code of Conduct: Is it time?

On Wed, Jan 06, 2016 at 11:22:17AM -, FarjadFarid(ChkNet) wrote:

> I am not in favour of massive price structures but that there should 
> be $100-$200 costs for smallest version. Times several million 
> products. This may allow postgresql to reduce its prices on its the 
> top of the range products.

You may be mistaking the community version for any of the commercially
supported offerings ?

Regards,
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread James Keener
What are you talking about? What business structure? Commercial offerings can 
and will continue to exist in terms of custom features or consulting.

Firstly, it ceases to be a community version when there is a charge. Secondly, 
it would damage our community by shrinking the size to effectively none while a 
hard fork (or more) spring up and people migrate to them. Moreover, unless you 
change the license people will redistribute newer versions for free.

So, while I have no say so in any of this, I believe it would be a very short 
sighted move. There are many other ways that money for the oss/foundation can 
be raised if money or supplies are needed.

Jim

On January 6, 2016 9:14:21 AM EST, "FarjadFarid(ChkNet)" 
 wrote:
>Hi Karsten,
>
>> You may be mistaking the community version for any of the
>commercially
>supported offerings ?
>
>It is possible. Please fill in the figures. 
>
>What I am suggesting is that even for community version there should be
>a
>charge. 
>
>But as I mentioned it is not just prices. 
>
>May be I wasn't very clear the most important factor is the business
>structure then quality of products and marketing together with pricing.
>  
>
>As a further example consider how a very small company like ARM beat
>giants
>like Intel and Samsung in the mobile phone industry.  
>
>It is their business model that is not profitable for Intel and Samsung
>to
>emulate. 
>
>*Of course they have a great products. Equally importantly their
>business
>model makes it realistic and profitable for other 
>companies to use their services.  *
>
>I am only providing some food for thought. For me we can all learn from
>other people's successes and failures. 
>
>I for one think everyone on the team have done a great job bringing
>postgresql to this stage. 
>
>Good luck
>
>
>
>Farjad Farid
>
>
>
>
>-Original Message-
>From: pgsql-general-ow...@postgresql.org
>[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Karsten
>Hilbert
>Sent: 06 January 2016 11:32
>To: pgsql-general@postgresql.org
>Subject: Re: [GENERAL] Code of Conduct: Is it time?
>
>On Wed, Jan 06, 2016 at 11:22:17AM -, FarjadFarid(ChkNet) wrote:
>
>> I am not in favour of massive price structures but that there should 
>> be $100-$200 costs for smallest version. Times several million 
>> products. This may allow postgresql to reduce its prices on its the 
>> top of the range products.
>
>You may be mistaking the community version for any of the commercially
>supported offerings ?
>
>Regards,
>Karsten
>--
>GPG key ID E4071346 @ eu.pool.sks-keyservers.net
>E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
>
>
>-- 
>Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-general
>
>
>
>-- 
>Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-general

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[GENERAL] Charging for PostgreSQL

2016-01-06 Thread James Keener
As Melvin mentioned, this belongs in a new thread.

> Just one last example. Consider the music industry. For years Apple amongst 
> others promoted low cost per unit downloads and then streaming. We all know 
> the history. 
> 
> Once a thriving industry music industry has been decimated. Neither the 
> musicians nor song writers receive proper income any more.  
> All the major players recognise its current state is unsustainable. 
So? In an odd twist of things, the developers here are either being paid
to work on PostgreSQL or are _volunteering_ their time. It would be
extremely rude to take their _volunteered_ time and profit from it.
Ditto for support, such as this forum and the IRC channel.

We can debate the music industry all day. My view is that it's
inefficient, corrupt, and poorly managed. A more streamlined system
would result in more money to the artists themselves. They are not a
good comparison to a F/OSS project.

> *I am sure neither of us want to see postgresql to falter.*
And I have no idea how you think charging for PostgreSQL won't make it
falter. People will move to other free databases or move to paid
offerings along the thought process of "no one was ever fired for buying
ibm"

> Of course the right balance needs to be struck but for me at least the idea 
> of free lunch has had its day. 
How does PostgreSQL being free affect you in a _negative_ way? This
"free lunch" is the reason we have the technology and world that we do.
I'm honestly curious why you have an issue with this. Not charging for
code has not prevented a plethora of other projects from having a
growing community. Those issues become moot when you force the community
to disappear. We need to understand what keeps new devs away and fix it
-- not simply force everyone away.

> There can be a low enough charge that people don't feel too much of a pinch 
> but enough to sustain the progress of postgresql.
No. There can't. Going from free to anything will decrease your user
base, especially when there are free alternatives and very large, and
(unfortunately) trusted names you can pay for a database. I've dealt
with this at many companies.

> I genuinely don't like arguments over emails. These are complex issues.
I personally find it easier than arguing in person. But to each his own.
If you don't like arguing then there is nothing that says you must argue.

> Again I for one will continue to support postgresql team whatever their 
> decision may be. 
That decision has already been made. Unless you can overcome the
_idealogical_
reason that PostgreSQL is F/OSS in the first place, then I'm not sure
this is an argument worth continuing.

Jim

> 
> 
> 
> -Original Message-
> From: pgsql-general-ow...@postgresql.org 
> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of James Keener
> Sent: 06 January 2016 15:04
> To: FarjadFarid(ChkNet); 'Karsten Hilbert'; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Code of Conduct: Is it time?
> 
>> My only aim is further progress of postgresql.
> Charging for it would do exactly that. Most people would simply switch to 
> MySQL (or Maria) or stop upgrading/upgrade to a fork.
> 
>> As per Sun Microsystem’s case charging zero dollars (for Java and 
>> mysql)  means there is zero income.
> Why do you think this is a company? There _are_ companies that offer support 
> and coding. While I'm sure everyone would agree that developers should be 
> able to eat (and more/better than Raman), the point of the "The PostgreSQL 
> Global Development Group" and being "The world's most advanced open source 
> database" is not to become Ellison. The commercial support and consulting 
> offerings are there to make the money. The rest of us plebs just have to help 
> each other out.
> 
> Had PostgreSQL started out/never became open source, we would be having a 
> very different discussion (about a very different product, if it still 
> existed). As it stands, fundamentally shifting the goals, objectives, MO of a 
> libre and beer free software project to something other than that is going to 
> be met with a lot of resistance because it shifts how we as users interact 
> with something we've interacted with in a certain way and with certain 
> expectations for years.
> 
>> Emails are not the best medium for consulting about complex issues.
> Emails are actually a decent medium because they allow one to express 
> themselves in a well thought out and clear way. It just has to be used 
> correctly (and I'm not insinuating I'm great at that).
> 
> I'm not sure who Farjad is; is this a serious proposal or "just something 
> someone said"? I feel religious about PostgreSQL as it really has changed how 
> I view databases in general (and you know what they say about converts). Not 
> that I matter, but I would feel a huge blow if I could no longer tell people 
> to use it.
> 
> Jim
> 
> 
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make 
> changes to your 

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread Melvin Davidson
All,
The subject of the discussion/track is to whether or not there should be a
code of condect (Coc).

Whether or not there should be a charge for PostgreSQL does not belong in
this track, and is, in fact, a moot point as PostgreSQL IS a _free_
database, as is this community board.

If you feel it is necessary to discuss fees, then kindly respect Josua
Drake's intent of a CoC and open a separate discussion.

On Wed, Jan 6, 2016 at 10:03 AM, James Keener  wrote:

> > My only aim is further progress of postgresql.
> Charging for it would do exactly that. Most people would simply switch
> to MySQL (or Maria) or stop upgrading/upgrade to a fork.
>
> > As per Sun Microsystem’s case charging zero dollars (for Java and mysql)
> >  means there is zero income.
> Why do you think this is a company? There _are_ companies that offer
> support and coding. While I'm sure everyone would agree that developers
> should be able to eat (and more/better than Raman), the point of the
> "The PostgreSQL Global Development Group" and being "The world's most
> advanced open source database" is not to become Ellison. The commercial
> support and consulting offerings are there to make the money. The rest
> of us plebs just have to help each other out.
>
> Had PostgreSQL started out/never became open source, we would be having
> a very different discussion (about a very different product, if it still
> existed). As it stands, fundamentally shifting the goals, objectives, MO
> of a libre and beer free software project to something other than that
> is going to be met with a lot of resistance because it shifts how we as
> users interact with something we've interacted with in a certain way and
> with certain expectations for years.
>
> > Emails are not the best medium for consulting about complex issues.
> Emails are actually a decent medium because they allow one to express
> themselves in a well thought out and clear way. It just has to be used
> correctly (and I'm not insinuating I'm great at that).
>
> I'm not sure who Farjad is; is this a serious proposal or "just
> something someone said"? I feel religious about PostgreSQL as it really
> has changed how I view databases in general (and you know what they say
> about converts). Not that I matter, but I would feel a huge blow if I
> could no longer tell people to use it.
>
> Jim
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread Jim Nasby

On 1/6/16 2:17 AM, Victor Yegorov wrote:

Another very wanted change in the community is mentorship. Personally, I
don't feel confident to ask endless questions I have when looking into
the code, as I understand, that this might be a very basic (for
PostgreSQL hackers) stuff. For me it'd be a great helper, if I could
talk this over (via e-mail or any messenger) with experienced developer.
Reminds me of what we do for the GSoC, where developers volunteer for
mentoring students.
Something similar would be handy in general, perhaps with a web
interface similar to the CommitFest's one.


Please, ask your questions! The Postgres community really is one of the 
most patient and helpful OSS communities out there, and there's plenty 
of people that would be happy to explain things. Questions are also a 
good way to show where things could possibly be better commented/documented.

--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
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] Code of Conduct: Is it time?

2016-01-06 Thread Melvin Davidson
While at first glance, it would seem a code of conduct is a good idea,
having once would be pointless if there is no way to enforce it.
As others have already shown by totally ignoring the subject of this track
and hijacking it into a discussion of fees (which, IMHO, is totally
ridiculous),
there is no way it can be enforced. So while I applaud Joshua Drake for his
good intent, I there must therefore take the position of saying no to a CoC
and offer
my apologies to Mr. Drake for those that have so blatantly ignored the
point of this discussion, as they are the ones are in need of the CoC but
would most
probably ignore it anyway.

On Wed, Jan 6, 2016 at 10:32 AM, FarjadFarid(ChkNet) <
farjad.fa...@checknetworks.com> wrote:

> Hi James,
>
> I value your passion and commitment to postgresql. I am equally passionate
> about postgresql and am just like you another user but pointing these on
> simple commercial practical bases.
> These are simple feedbacks.
>
> Just one last example. Consider the music industry. For years Apple
> amongst others promoted low cost per unit downloads and then streaming. We
> all know the history.
>
> Once a thriving industry music industry has been decimated. Neither the
> musicians nor song writers receive proper income any more.
> All the major players recognise its current state is unsustainable.
>
> *I am sure neither of us want to see postgresql to falter.*
>
> Of course the right balance needs to be struck but for me at least the
> idea of free lunch has had its day.
>
> There can be a low enough charge that people don't feel too much of a
> pinch but enough to sustain the progress of postgresql.
>
> I genuinely don't like arguments over emails. These are complex issues.
>
> Again I for one will continue to support postgresql team whatever their
> decision may be.
>
>
>
>
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:
> pgsql-general-ow...@postgresql.org] On Behalf Of James Keener
> Sent: 06 January 2016 15:04
> To: FarjadFarid(ChkNet); 'Karsten Hilbert'; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Code of Conduct: Is it time?
>
> > My only aim is further progress of postgresql.
> Charging for it would do exactly that. Most people would simply switch to
> MySQL (or Maria) or stop upgrading/upgrade to a fork.
>
> > As per Sun Microsystem’s case charging zero dollars (for Java and
> > mysql)  means there is zero income.
> Why do you think this is a company? There _are_ companies that offer
> support and coding. While I'm sure everyone would agree that developers
> should be able to eat (and more/better than Raman), the point of the "The
> PostgreSQL Global Development Group" and being "The world's most advanced
> open source database" is not to become Ellison. The commercial support and
> consulting offerings are there to make the money. The rest of us plebs just
> have to help each other out.
>
> Had PostgreSQL started out/never became open source, we would be having a
> very different discussion (about a very different product, if it still
> existed). As it stands, fundamentally shifting the goals, objectives, MO of
> a libre and beer free software project to something other than that is
> going to be met with a lot of resistance because it shifts how we as users
> interact with something we've interacted with in a certain way and with
> certain expectations for years.
>
> > Emails are not the best medium for consulting about complex issues.
> Emails are actually a decent medium because they allow one to express
> themselves in a well thought out and clear way. It just has to be used
> correctly (and I'm not insinuating I'm great at that).
>
> I'm not sure who Farjad is; is this a serious proposal or "just something
> someone said"? I feel religious about PostgreSQL as it really has changed
> how I view databases in general (and you know what they say about
> converts). Not that I matter, but I would feel a huge blow if I could no
> longer tell people to use it.
>
> Jim
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To
> make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread FarjadFarid(ChkNet)
Hi James, 

I value your passion and commitment to postgresql. I am equally passionate 
about postgresql and am just like you another user but not pointing these on 
simple commercial practical bases. 
These are simple feedbacks. 

Just one last example. Consider the music industry. For years Apple amongst 
others promoted low cost per unit downloads and then streaming. We all know the 
history. 

Once a thriving industry music industry has been decimated. Neither the 
musicians nor song writers receive proper income any more.  
All the major players recognise its current state is unsustainable. 

*I am sure neither of us want to see postgresql to falter.*

Of course the right balance needs to be struck but for me at least the idea of 
free lunch has had its day. 

There can be a low enough charge that people don't feel too much of a pinch but 
enough to sustain the progress of postgresql.

I genuinely don't like arguments over emails. These are complex issues. 

Again I for one will continue to support postgresql team whatever their 
decision may be. 




-Original Message-
From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of James Keener
Sent: 06 January 2016 15:04
To: FarjadFarid(ChkNet); 'Karsten Hilbert'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Code of Conduct: Is it time?

> My only aim is further progress of postgresql.
Charging for it would do exactly that. Most people would simply switch to MySQL 
(or Maria) or stop upgrading/upgrade to a fork.

> As per Sun Microsystem’s case charging zero dollars (for Java and 
> mysql)  means there is zero income.
Why do you think this is a company? There _are_ companies that offer support 
and coding. While I'm sure everyone would agree that developers should be able 
to eat (and more/better than Raman), the point of the "The PostgreSQL Global 
Development Group" and being "The world's most advanced open source database" 
is not to become Ellison. The commercial support and consulting offerings are 
there to make the money. The rest of us plebs just have to help each other out.

Had PostgreSQL started out/never became open source, we would be having a very 
different discussion (about a very different product, if it still existed). As 
it stands, fundamentally shifting the goals, objectives, MO of a libre and beer 
free software project to something other than that is going to be met with a 
lot of resistance because it shifts how we as users interact with something 
we've interacted with in a certain way and with certain expectations for years.

> Emails are not the best medium for consulting about complex issues.
Emails are actually a decent medium because they allow one to express 
themselves in a well thought out and clear way. It just has to be used 
correctly (and I'm not insinuating I'm great at that).

I'm not sure who Farjad is; is this a serious proposal or "just something 
someone said"? I feel religious about PostgreSQL as it really has changed how I 
view databases in general (and you know what they say about converts). Not that 
I matter, but I would feel a huge blow if I could no longer tell people to use 
it.

Jim


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make 
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread Jim Nasby

On 1/6/16 9:48 AM, Melvin Davidson wrote:

there is no way it can be enforced. So while I applaud Joshua Drake for
his good intent, I there must therefore take the position of saying no
to a CoC


A good CoC is not just a code, it is also a means of enforcement. To 
wit, from the CouchDB CoC[1]:


"If you believe someone is violating this code of conduct, you may reply 
to them and point out this code of conduct. Such messages may be in 
public or in private, whatever is most appropriate. Assume good faith; 
it is more likely that participants are unaware of their bad behaviour 
than that they intentionally try to degrade the quality of the 
discussion. Should there be difficulties in dealing with the situation, 
you may report your compliance issues in confidence to 
priv...@couchdb.apache.org.


"If the violation is in documentation or code, for example inappropriate 
pronoun usage or word choice within official documentation, we ask that 
people report these privately to the project at 
priv...@couchdb.apache.org, and, if they have sufficient ability within 
the project, to resolve or remove the concerning material, being mindful 
of the perspective of the person originally reporting the issue."


Importantly, the code clearly states what is and isn't acceptable, in a 
calm and rational manner, so that when an incident does occur -core or 
whoever else can deal with it much more easily. Vague statements like 
"don't be an ass" are useless for dealing with an actual situation.


(BTW, if your concern on enforcement is about control, not only can 
people be removed from mailing lists and the like, but there actually is 
a Postgres legal entity that could start legal proceedings if it ever 
came to it.)


[1] http://couchdb.apache.org/conduct.html
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
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] Code of Conduct: Is it time?

2016-01-06 Thread James Keener
> My only aim is further progress of postgresql.
Charging for it would do exactly that. Most people would simply switch
to MySQL (or Maria) or stop upgrading/upgrade to a fork.

> As per Sun Microsystem’s case charging zero dollars (for Java and mysql)
>  means there is zero income.
Why do you think this is a company? There _are_ companies that offer
support and coding. While I'm sure everyone would agree that developers
should be able to eat (and more/better than Raman), the point of the
"The PostgreSQL Global Development Group" and being "The world's most
advanced open source database" is not to become Ellison. The commercial
support and consulting offerings are there to make the money. The rest
of us plebs just have to help each other out.

Had PostgreSQL started out/never became open source, we would be having
a very different discussion (about a very different product, if it still
existed). As it stands, fundamentally shifting the goals, objectives, MO
of a libre and beer free software project to something other than that
is going to be met with a lot of resistance because it shifts how we as
users interact with something we've interacted with in a certain way and
with certain expectations for years.

> Emails are not the best medium for consulting about complex issues.
Emails are actually a decent medium because they allow one to express
themselves in a well thought out and clear way. It just has to be used
correctly (and I'm not insinuating I'm great at that).

I'm not sure who Farjad is; is this a serious proposal or "just
something someone said"? I feel religious about PostgreSQL as it really
has changed how I view databases in general (and you know what they say
about converts). Not that I matter, but I would feel a huge blow if I
could no longer tell people to use it.

Jim


-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread FarjadFarid(ChkNet)
Hi James, 

I value your passion and commitment to postgresql. I am equally passionate 
about postgresql and am just like you another user but pointing these on simple 
commercial practical bases. 
These are simple feedbacks. 

Just one last example. Consider the music industry. For years Apple amongst 
others promoted low cost per unit downloads and then streaming. We all know the 
history. 

Once a thriving industry music industry has been decimated. Neither the 
musicians nor song writers receive proper income any more.  
All the major players recognise its current state is unsustainable. 

*I am sure neither of us want to see postgresql to falter.*

Of course the right balance needs to be struck but for me at least the idea of 
free lunch has had its day. 

There can be a low enough charge that people don't feel too much of a pinch but 
enough to sustain the progress of postgresql.

I genuinely don't like arguments over emails. These are complex issues. 

Again I for one will continue to support postgresql team whatever their 
decision may be. 




-Original Message-
From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of James Keener
Sent: 06 January 2016 15:04
To: FarjadFarid(ChkNet); 'Karsten Hilbert'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Code of Conduct: Is it time?

> My only aim is further progress of postgresql.
Charging for it would do exactly that. Most people would simply switch to MySQL 
(or Maria) or stop upgrading/upgrade to a fork.

> As per Sun Microsystem’s case charging zero dollars (for Java and 
> mysql)  means there is zero income.
Why do you think this is a company? There _are_ companies that offer support 
and coding. While I'm sure everyone would agree that developers should be able 
to eat (and more/better than Raman), the point of the "The PostgreSQL Global 
Development Group" and being "The world's most advanced open source database" 
is not to become Ellison. The commercial support and consulting offerings are 
there to make the money. The rest of us plebs just have to help each other out.

Had PostgreSQL started out/never became open source, we would be having a very 
different discussion (about a very different product, if it still existed). As 
it stands, fundamentally shifting the goals, objectives, MO of a libre and beer 
free software project to something other than that is going to be met with a 
lot of resistance because it shifts how we as users interact with something 
we've interacted with in a certain way and with certain expectations for years.

> Emails are not the best medium for consulting about complex issues.
Emails are actually a decent medium because they allow one to express 
themselves in a well thought out and clear way. It just has to be used 
correctly (and I'm not insinuating I'm great at that).

I'm not sure who Farjad is; is this a serious proposal or "just something 
someone said"? I feel religious about PostgreSQL as it really has changed how I 
view databases in general (and you know what they say about converts). Not that 
I matter, but I would feel a huge blow if I could no longer tell people to use 
it.

Jim


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make 
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread Jim Nasby

On 1/6/16 1:36 AM, Pavel Stehule wrote:

The CoC doesn't solve it. We do on mature, stable, pretty complex
code - use C (not JavaScript or Java).  This isn't hobby project or
student project.


No, CoC by itself doesn't grow the community. That doesn't mean we
shouldn't have one.

Another weakness we have is the mentality that the only way to
contribute to the community is as a developer. There's tons of other
ways people could help, if we made an effort to engage them.
Infrastructure, website design, documentation, project management (ie:
CF manager), issue tracker wrangler (if we had one), advocacy. There's
probably some others. It wouldn't even take effort from the existing 
community to attract those people; all we'd need to do is decide we 
wanted non-developers to work on that stuff and find some volunteers to 
go find them. But the big thing is, the existing community would have to 
welcome that help. Part of that would mean some changes to how the 
community currently operates, and the community can be very resistant to 
that. (I suspect partly because it pays to be very conservative when 
writting database software... :) )



Taking new developers needs the hard individual work with any
potential developer/student. I see as interesting one point -
PostgreSQL extensibility - the less experienced developer can write
extension, there can be interesting experimental extensions that can
be supported without risk of unstability of core code. Can be nice to
allow to write not only C language extensions. Then the Postgres can
be used on universities and in some startup companies - and it can
increase the number of active developers. My very talented colleague
doesn't write to Postgres due C language. He like to write planner in
lisp or erlang. Or like to play in these languages. C is barrier for
younger people.


Agreed. I recently said something to that effect to a few others, using
Python as an example. If you look at the Python source, there are 380 .c
files and 2000 .py files. Postgres has 1200 .c, 2000 .h and only 652
.sql. Since there's 640 .out files most of the .sql is presumably tests.
I'm not suggesting we switch to Python; the point is we could do a
better job of "eating our own dog food". I think it would also be very
interesting if there were add-on frameworks that allowed things like a
planner written in another language (which with the planner hooks might
actually be possible).
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
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] Code of Conduct: Is it time?

2016-01-06 Thread James Keener
> The coc sounds like a Washington politics play, but as long as the best
> still engage
> in this forum, I could care less. The list serves its purpose without
> overhead...a rare
> resource in today's flood of incoherent technical chatter.

Beyond "Hey! Look at us! We're telling people to play nice" What would a
Code of Conduct actually get the community? Is not having a formal "play
nice" document actually keeping developers away?

However, what happens if I break the CoC? Email addresses and IRC
handles are cheap. I can still continue to use PostgreSQL. If I say an
incredibly racist, sexist, or just plain rude thing, then what do I
loose? What do we do when someone harasses someone else in private?

That said, I would capitulate that a document stating the behavior we
expect of each other as a useful way in helping us tell people to stand
down. However, we have to accept that in-and-off itself it's a
meaningless document. Like the US Constitution, it only matters if
people execute and make it matter. (I guess the same idea applies
elsewhere, but hey, I'm a Pennsylvania.) However, unlike a government,
there is no force that we can use against each other.

_We_ as a community need to take the responsibility of telling each
other off when someone steps out of line. If a (short) document
explaining the goals, values, and precepts of the community will help us
do that, then by all means, let's do that!

We just have to figure out if it will. (As a cis-hetero white middle
class male) I'm not a "targeted" group and as such my views may not be
of the most use here.

Jim


-- 
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] Charging for PostgreSQL

2016-01-06 Thread James Keener
How does one "start a new thread"? I wasn't aware that changing the subject 
wouldn't be enough. I tried :/

Jim

On January 6, 2016 12:17:54 PM EST, "Stéphane Schildknecht" 
 wrote:
>On 06/01/2016 16:54, James Keener wrote:
>> As Melvin mentioned, this belongs in a new thread.
>
>And as such, it would have been really kind to actually start a new
>one.
>
>(...)
>-- 
>Stéphane Schildknecht
>Contact régional PostgreSQL pour l'Europe francophone
>Loxodata - Conseil, expertise et formations
>06.17.11.37.42
>
>
>-- 
>Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-general

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[GENERAL] Postgresql 9.3 not coming up after restart in centos

2016-01-06 Thread balajishanmu...@live.in
Hi 

I have installed postgresql-9.3 in my centos application. When the
application starts for first-time Postgres starts without any issue most of
the time. But when I reboot the centOs, Postgres is not getting started on
subsequent boot and I am getting the error,

LOG:  invalid magic number  in log segment 00010002,
offset 0
LOG:  invalid primary checkpoint record
LOG:  invalid magic number  in log segment 00010002,
offset 0
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 2529) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure

in the location "/var/lib/pgsql/9.3/data/pg_xlog", I see 3 files
00010002, 00010003 and an empty directoy
archive_status.

When I tried to restart the Postgres, I am getting the same error. How to
start the Postgres now? How to avoid this problem without happening in
future? Thanks. Let me know incase if more information is needed.



--
View this message in context: 
http://postgresql.nabble.com/Postgresql-9-3-not-coming-up-after-restart-in-centos-tp5880435.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Off topic - How to start a new thread

2016-01-06 Thread D'Arcy J.M. Cain
On Wed, 06 Jan 2016 12:46:08 -0500
James Keener  wrote:
> How does one "start a new thread"? I wasn't aware that changing the
> subject wouldn't be enough. I tried :/

If you want to start a new thread don't reply to an existing one.  Even
if you change the subject it is still part of the old thread.  Most
email clients still recognize the connection to previous messages.

Instead, start a new message.  Hit the compose or write link (we can't
be more specific without knowing what email client you are using) and
start fresh.  Often you can click on the email address in the headers
of an existing message.  This is different than a reply.  For example,
here are some of the headers in your message.

Subject: Re: [GENERAL] Charging for PostgreSQL
From: James Keener 
Date: Wed, 06 Jan 2016 12:46:08 -0500
To: Stéphane Schildknecht
,pgsql-general@postgresql.org
Message-ID: <85a50792-faf0-49ac-a541-b5444a783...@jimkeener.com>

Note the To: line (wrapped in this message but actually on one line)
that has two addresses separated by a comma.  You can click on either
one to start a new message.  Obviously the pgsql-general@postgresql.org
one is the one you would use to start a new thread on this list.

Some mailing list make it even easier by including a mail link at the
bottom of each message but this one doesn't.

Note that this is what I did with this message.  It is not part of any
previous thread.  It is the start of a new (hopefully short) thread.

-- 
D'Arcy J.M. Cain  |  Democracy is three wolves
http://www.druid.net/darcy/|  and a sheep voting on
+1 416 788 2246 (DoD#0082)(eNTP)   |  what's for dinner.
IM: da...@vex.net, VoIP: sip:da...@druid.net


-- 
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] Charging for PostgreSQL

2016-01-06 Thread Jan de Visser

[offtopic alert]

On 2016-01-06 12:46 PM, James Keener wrote:
How does one "start a new thread"? 
'New Message' in your favourite email client. 
'pgsql-general@postgresql.org' in the 'To' box.



I wasn't aware that changing the subject wouldn't be enough. I tried :/


Check the raw source of the message I replied to. There's 'In-Reply-To' 
and 'References' headers email clients use to thread messages.


GMail attempts to be smart by threading messages by subject. This is not 
only contrary to the spec, but potentially just as inconvenient, if you 
have messages with the same subject. I've had gmail thread messages from 
years apart because the subject was something like 'Hello'.



Jim


jan



On January 6, 2016 12:17:54 PM EST, "Stéphane Schildknecht" 
 wrote:


On 06/01/2016 16:54, James Keener wrote:

As Melvin mentioned, this belongs in a new thread. 



And as such, it would have been really kind to actually start a new one.

(...)


--
Sent from my Android device with K-9 Mail. Please excuse my brevity. 




What another group does (was Re: [GENERAL] Code of Conduct: Is it time?)

2016-01-06 Thread Andrew Sullivan
Hi,

I'm not much of a contributor to the project any more, but I thought
perhaps some information about what some other communities do might be
helpful.  (For those of you who don't know me, I used to be somewhat
active in this community until I got heavily involved in the Intenet
Engineering Task Force or IETF.  Alas, these days I seem to be
spending all my time on Internet politics.  I clearly made a bad
trade.)  Anyway, here's some stuff on how the IETF does this, in case
it is helpful.  This is a little long.  As the saying goes, I didn't
have time to write a short letter.

On Wed, Jan 06, 2016 at 08:50:40AM -0800, Joshua D. Drake wrote:

> It provides a sense of confidence to those who are not confident that they
> can come play in our playground and not be bullied. That is what every
> single code of conduct is about. There are a lot of very talented people in
> the FLOSS community that just don't like to work in areas that don't have a
> code of conduct.

I think there are a few different things that are coming together
under the rubric of "code of conduct", and it might be helpful to
separate them.

First, it's important to remember that many of the codes of conduct
actually arose from a problem that Postgres doesn't have.  Many
projects (Ubuntu is a good example) are actually communities that come
together around what is really a commercial enterprise (in Ubuntu's
case, Canonical).  So, some of the traditions of CoC happened because
companys' lawyers told them, "You need this in order to avoid getting
sued."  Because Postgres didn't grow up that way, it didn't have that
need traditionally.  But now that it is established practice, many
corporations won't allow their staff to participate in activities
without such a CoC, precisely because of the legal environment (this
is especially true in the US, of course).  Nevertheless, any project
with more than a handful of contributors pretty quickly develops norms
and generally enforces those, if only informally.

One kind of conduct is "acting in the community", which in virtual
communities like this one (and the IETF) mostly means mailing lists
and other such electronic exchanges.  Because of the way it's
organized (in working groups with chairs), the IETF has a way to deal
with misbehaviour of that sort: the chairs have the ability to
restrict someone's posting privileges on a WG's mailing list.  The
criteria are somewhat vague but it basically amounts to "stick to the
topic, don't be mean, and don't attack anyone personally."  In the
normal course off affairs, WG chairs enforce these things
(infrequently), and that's all there is to it.  Much of this is
codified in RFC 2418 and updates to it
(http://tools.ietf.org/html/rfc2418).  It's worth noting that, because
the IETF is made up of engineers, we have a lot of process documents.
Discussions around process tend to take a lot of engergy and sometimes
distract the IETF from its main work.  Some of us find this a little
vexing.

The overall acceptable conduct of participants is outlined in RFC 7154
(http://tools.ietf.org/html/rfc7154), from 2014, but the IETF adopted
its first such guidelines in 2001 (RFC 3184).  

Sometimes we get people in the IETF who can't play nicely.  If it's a
problem across the IETF, we have a mechanism called "PR-Action" (for
posting rights).  It is outlined in RFC 3683
(http://tools.ietf.org/html/rfc3683).  We haven't had to use it very
often, but we have done and will probably have to do so again.  Also,
the main i...@ietf.org mailing list has a sergeant-at-arms to try to
head off behaviour issues before they get out of hand.

Despite all those process documents, there have sometimes been worries
about harassment.  As a result, the IESG (basically, the managers of
the IETF) created an anti-harassment policy.  It's at
http://www.ietf.org/iesg/statement/ietf-anti-harassment-policy.html.
Part of the need for that policy came from issues outside the
community: while there were concerns about some of the behaviour
around the IETF (which has a real problem with gender and cultural
diversity, but had a bigger problem in the past), there was an
especially bad example of misbehaviour at a conference of another (but
related) community one year.  It motivated people to write down some
rules before things got really out of hand.  (Note: some argue that
the reason things didn't get as bad at the IETF as those reports
suggested was just that we had so few women participating in the IETF
that the population didn't support the scale of misbehaviour.  I'm not
trying to minimise the social problems that the IETF had.)  The IETF
has also created an "ombudsteam" (what an awkward word!) to try to
deal with any misbehaviour that comes up.  (You contact them at
.)

This brings up another issue that Postgres doesn't really have: some
communities (including the IETF) have official community meetings of
this or that sort, and there is a different kind of conduct for which
one might 

[GENERAL] Conflict detection in ON CONFLICT

2016-01-06 Thread Nicolas ALBEZA
Hello,

Is there any way for a client to know if a conflict happened in an ON
CONFLICT DO UPDATE query ?

Thanks !

-- 
Nicolas "Pause" ALBEZA


Re: [GENERAL] Submitting to this list

2016-01-06 Thread David G. Johnston
Responded to the separately cross-posted version on -www...in short this is
not a big reporting list and doesn't need the same rules or expectations.
Assume agnostic o/s and current release then deal with variations as they
are needed.

David J.

On Wednesday, January 6, 2016, Melvin Davidson  wrote:

>
> I would like to see the following added to the introduction to this list.
>
> "When submitting to this list, please include the full version of
> PostgreSQL and the O/S you are using.
> Also, if you are reportaing a problem, it is essential that a minimal
> amount of schema & data be
> provided in order to duplicate problem being reported, as well as exact
> error verbage encountered and
> any relevant extracts from the postgresql log file(s)."
>
> While some may think there are cases where this is irrelavant, there are
> now in existence seveeral
> versions of PostgreSQL across multiple operating systems. It it not
> inconcievable that a bug (or problem)
> being reported in a previous version & O/S has already been corrected in a
> newer one. Likewise, something
> that may occur in one version & O/S may not occur in another.
>
> If it is just a general query, keep in mind that new features are
> constantly being added with each new
> release, so something previously impossible (or done another way) in a
> previous version, may now be
> simplified with the implementation of a new function/feature.
>
> I encourage additional suggestions as to what should be included when
> submitting queries to this list.
> --
> *Melvin Davidson*
> I reserve the right to fantasize.  Whether or not you
> wish to share my fantasy is entirely up to you.
>
> Folk Alley - All Folk - 24 Hours a day
> www.folkalley.com
>


Re: [GENERAL] Postgresql 9.3 not coming up after restart in centos

2016-01-06 Thread balajishanmu...@live.in
By application I mean centOS.

We are starting and stopping Postgres using systemd service. We have a
service file called postgresql9.3.service which is used to start or stop
Postgres.

Excerpts of postgresql9.3.service

ExecStartPre=/usr/pgsql-9.3/bin/postgresql93-check-db-dir ${PGDATA}
ExecStart=/usr/pgsql-9.3/bin/pg_ctl start -D ${PGDATA} -s -w -t 300
ExecStop=/usr/pgsql-9.3/bin/pg_ctl stop -D ${PGDATA} -s -m fast
ExecReload=/usr/pgsql-9.3/bin/pg_ctl reload -D ${PGDATA} -s








--
View this message in context: 
http://postgresql.nabble.com/Postgresql-9-3-not-coming-up-after-restart-in-centos-tp5880435p5880677.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread FarjadFarid(ChkNet)

Hi Joshua, 

Thanks for the posting. That was a good list of areas to cover. Specially about 
speakers/events/third party plugins etc.
 
How would  you sum it up? Would it be right to summed up as anything that could 
affect the Postgresql as a brand should be protected?

This is of course also an opportunity to include many more people within the 
community. 

The only problem is that the list is getting to large to implement for *the 
first drop*. It could end up just as point of discussion. 

To kick start it. I hope someone will look at the primary issues that concerns 
the team the most. Including those you and others 
have mentioned and just get it out of the door. No doubt these will be reviewed 
and edited or added in due course. 

How does that sound? 

Good luck. 


Farjad Farid





-Original Message-
From: Joshua D. Drake [mailto:j...@commandprompt.com] 
Sent: 06 January 2016 17:01
To: Jim Nasby; Melvin Davidson; FarjadFarid(ChkNet)
Cc: James Keener; Karsten Hilbert; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Code of Conduct: Is it time?

On 01/06/2016 08:13 AM, Jim Nasby wrote:

> (BTW, if your concern on enforcement is about control, not only can 
> people be removed from mailing lists and the like, but there actually 
> is a Postgres legal entity that could start legal proceedings if it 
> ever came to it.)

As a Director for 2 of the "legal" entities this idea is a rough road. 
As a volunteer organization we would have a very hard time bringing legal 
proceedings for a violation of a CoC. Realistically we are talking about a 
person bringing legal proceedings against another person of whom are 
contributors to the "PostgreSQL Project".

That said, there is no reason this can't be enforced.

A hacker who has code committed to the tree has a vested ID interest in that 
code. It took time, heart, commitment, and tough skin. They may not have been 
compensated for that time, if they had been compensated they also have skin in 
the game with whoever compensated them.

Now change the first sentence to:

A community organizer who spends months organizing a postgresql event has a 
vested ID interest in that event.

A pug leader who spends time every month organizing a postgresql meeting has a 
vested ID interest in that meeting.

An extension writer 

A speaker 

A DBA who fought hard to get PostgreSQL into their DC.

If the big yellow guillotine comes down on their ability to contribute and 
stains the shirt red. It will matter.

Enforcement isn't that hard. It is just a committee who ultimately answers to 
-core.

Sincerely,

JD






--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564 PostgreSQL 
Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't control your 
own emotions, so everyone else should do it for you.



-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread Alvaro Herrera
Victor Yegorov wrote:

> Perhaps, this is a good project for a newby to do. Perhaps, it is
> worthwhile to create Developer's documentation, either as a section in
> the official docs or as a separate resource with structure and design
> similar to the official docs?

Here's an idea.  We have a wiki page titled "Developer FAQ", which
hasn't evolved very much and personally I didn't find it of much value
last time I looked at it.  Perhaps some freshman hacker would be
interested in revamping it --- they could ask questions here, and then
edit the responses in a way suitable to appear in that wiki page.

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
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] Getting the function definition from oid in before firing the function

2016-01-06 Thread Mohammed Ajil
Hi,

Thanks for your answer!
I know that this is not the only language for triggers, but the
algorithm I have to implement only supports these triggers.
I have looked at the audit trigger, but that is not quite what I am
trying to achieve. I have implemented the stack push and pop for the
initial commands at another location, what I am trying to do now is keep
track of what triggers are fired, since they recursively can fire more
triggers.

What is an executor hook?

Regards,

Mohammed

On 01/06/2016 03:20 AM, Jim Nasby wrote:
> On 1/5/16 8:13 AM, Mohammed Ajil wrote:
>> Now my problem consists of two steps:
>> - First I need to decide if the algorithm supports the trigger type
>> (only of LANGUAGE PLPGSQL).
> 
> plpgsql is NOT the only language that supports triggers.
> 
>> - Second I need to get the SQL command that the function will execute.
>>
>> What I tried was the following:
>> In the file trigger.c I have found the location where the function is
>> called.
> 
> I think triggers is the wrong way to approach this; it's full of holes
> (not the least of which is triggers don't fire on SELECT). You'd be much
> better off with an executor hook.
> 
> Have you looked at https://github.com/2ndQuadrant/pgaudit?

-- 

Mohammed Ajil
Bsc CS D-INFK
aj...@student.ethz.ch


-- 
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] Postgresql 9.3 not coming up after restart in centos

2016-01-06 Thread Adrian Klaver

On 01/05/2016 11:18 AM, balajishanmu...@live.in wrote:

Hi

I have installed postgresql-9.3 in my centos application. When the
application starts for first-time Postgres starts without any issue most of


Not sure what you are talking about when you say CentOS application.

Are you saying when CentOS starts, or an application that you wrote starts?

How did you install Postgres?

Can you show the init script that is starting/stopping Postgres?

If such a thing does not exist, how do you start/stop Postgres?


the time. But when I reboot the centOs, Postgres is not getting started on
subsequent boot and I am getting the error,

LOG:  invalid magic number  in log segment 00010002,
offset 0
LOG:  invalid primary checkpoint record
LOG:  invalid magic number  in log segment 00010002,
offset 0
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 2529) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure

in the location "/var/lib/pgsql/9.3/data/pg_xlog", I see 3 files
00010002, 00010003 and an empty directoy
archive_status.

When I tried to restart the Postgres, I am getting the same error. How to
start the Postgres now? How to avoid this problem without happening in
future? Thanks. Let me know incase if more information is needed.



--
View this message in context: 
http://postgresql.nabble.com/Postgresql-9-3-not-coming-up-after-restart-in-centos-tp5880435.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.





--
Adrian Klaver
adrian.kla...@aklaver.com


--
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] Code of Conduct: Is it time?

2016-01-06 Thread Pavel Stehule
2016-01-06 17:46 GMT+01:00 Jeff Anton :

> On 01/06/16 08:04, Jim Nasby wrote:
> ...
>
>> increase the number of active developers. My very talented colleague
>>> doesn't write to Postgres due C language. He like to write planner in
>>> lisp or erlang. Or like to play in these languages. C is barrier for
>>> younger people.
>>>
>>
>> ...
>
>> better job of "eating our own dog food". I think it would also be very
>> interesting if there were add-on frameworks that allowed things like a
>> planner written in another language (which with the planner hooks might
>> actually be possible).
>>
>
> Amazing how stuff comes back.
>
> A bit of history...  The very first Postgres planner was written in Lisp.
> Mostly this was to get the first usable system going quickly. The problems
> with performance, garbage collection and memory use made a rewrite a high
> priority.
>

I am sorry for offtopic. I didn't propose to rewrite Postgres to Lisp. C is
the most perfect language for long term production usage. But it isn't good
language for scientific work, playing, testing hypothesis.


>
> IMO, most of this discussion is off track.  Sadly, a significant
> percentage of highly capable programmers are not very good at personal
> interaction.  At some point, poor people skills negate the value of
> programming skills.  I do think that needs recognition and a willingness to
> say goodbye to persons who bring disrepute to the effort of keeping the
> Postgresql world moving forward.  The problem is codifying such rules and
> that these same people who have the problem will likely argue such rules to
> the death.  Maybe the present discussion is an example.


> Jeff Anton
>
>
> --
> 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] Submitting to this list

2016-01-06 Thread bricklen
On Wed, Jan 6, 2016 at 9:15 AM, Melvin Davidson 
wrote:

>
> I would like to see the following added to the introduction to this list.
>
> "When submitting to this list, please include the full version of
> PostgreSQL and the O/S you are using.
> Also, if you are reportaing a problem, it is essential that a minimal
> amount of schema & data be
> provided in order to duplicate problem being reported, as well as exact
> error verbage encountered and
> any relevant extracts from the postgresql log file(s)."
>

There are already wiki entries for the "proper" way to submit reports or
ask for help. A link to those might be sufficient.
https://wiki.postgresql.org/wiki/Guide_to_reporting_problems
https://wiki.postgresql.org/wiki/SlowQueryQuestions


Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread Adrian Klaver

On 01/06/2016 08:50 AM, Joshua D. Drake wrote:

On 01/06/2016 08:11 AM, James Keener wrote:

The coc sounds like a Washington politics play, but as long as the best
still engage
in this forum, I could care less. The list serves its purpose without
overhead...a rare
resource in today's flood of incoherent technical chatter.


Beyond "Hey! Look at us! We're telling people to play nice" What would a
Code of Conduct actually get the community?


It provides a sense of confidence to those who are not confident that
they can come play in our playground and not be bullied. That is what
every single code of conduct is about. There are a lot of very talented
people in the FLOSS community that just don't like to work in areas that
don't have a code of conduct.


Is not having a formal "play
nice" document actually keeping developers away?

However, what happens if I break the CoC? Email addresses and IRC
handles are cheap. I can still continue to use PostgreSQL. If I say an
incredibly racist, sexist, or just plain rude thing, then what do I
loose? What do we do when someone harasses someone else in private?


It isn't about your ability to use PostgreSQL. It is about your ability
to contribute and be part of the community.



That said, I would capitulate that a document stating the behavior we
expect of each other as a useful way in helping us tell people to stand
down.


This is a very good point. It serves as a throttle on heated
discussions. It shows we are serious about everyone respecting each
other even when they aren't getting along.


However, we have to accept that in-and-off itself it's a
meaningless document. Like the US Constitution, it only matters if
people execute and make it matter.


Exactly and there are ways to do that.



_We_ as a community need to take the responsibility of telling each
other off when someone steps out of line. If a (short) document
explaining the goals, values, and precepts of the community will help us
do that, then by all means, let's do that!


Right. The creation of a CoC doesn't hurt anyone. There is no downside.



We just have to figure out if it will. (As a cis-hetero white middle
class male) I'm not a "targeted" group and as such my views may not be
of the most use here.


Which is another very good point.


Except it is not true. Re: my previous post about Brendan Eich. He was 
run out of office for crossing one of the 'targeted' groups who then 
launched a cyberbully and harassment campaign that made his position 
untenable. Mozilla admitted as much:


https://blog.mozilla.org/blog/2014/04/03/brendan-eich-steps-down-as-mozilla-ceo/

Yet other then the politicians answer of we will look into it, nothing 
was done.




JD




--
Adrian Klaver
adrian.kla...@aklaver.com


--
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] Code of Conduct: Is it time?

2016-01-06 Thread Pavel Stehule
2016-01-06 17:04 GMT+01:00 Jim Nasby :

> On 1/6/16 1:36 AM, Pavel Stehule wrote:
>
>> The CoC doesn't solve it. We do on mature, stable, pretty complex
>> code - use C (not JavaScript or Java).  This isn't hobby project or
>> student project.
>>
>
> No, CoC by itself doesn't grow the community. That doesn't mean we
> shouldn't have one.
>
> Another weakness we have is the mentality that the only way to
> contribute to the community is as a developer. There's tons of other
> ways people could help, if we made an effort to engage them.
> Infrastructure, website design, documentation, project management (ie:
> CF manager), issue tracker wrangler (if we had one), advocacy. There's
> probably some others. It wouldn't even take effort from the existing
> community to attract those people; all we'd need to do is decide we wanted
> non-developers to work on that stuff and find some volunteers to go find
> them. But the big thing is, the existing community would have to welcome
> that help. Part of that would mean some changes to how the community
> currently operates, and the community can be very resistant to that. (I
> suspect partly because it pays to be very conservative when writting
> database software... :) )
>

it's true


>
> Taking new developers needs the hard individual work with any
>> potential developer/student. I see as interesting one point -
>> PostgreSQL extensibility - the less experienced developer can write
>> extension, there can be interesting experimental extensions that can
>> be supported without risk of unstability of core code. Can be nice to
>> allow to write not only C language extensions. Then the Postgres can
>> be used on universities and in some startup companies - and it can
>> increase the number of active developers. My very talented colleague
>> doesn't write to Postgres due C language. He like to write planner in
>> lisp or erlang. Or like to play in these languages. C is barrier for
>> younger people.
>>
>
> Agreed. I recently said something to that effect to a few others, using
> Python as an example. If you look at the Python source, there are 380 .c
> files and 2000 .py files. Postgres has 1200 .c, 2000 .h and only 652
> .sql. Since there's 640 .out files most of the .sql is presumably tests.
> I'm not suggesting we switch to Python; the point is we could do a
> better job of "eating our own dog food". I think it would also be very
> interesting if there were add-on frameworks that allowed things like a
> planner written in another language (which with the planner hooks might
> actually be possible).
>
> --
> Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
> Experts in Analytics, Data Architecture and PostgreSQL
> Data in Trouble? Get it in Treble! http://BlueTreble.com
>


Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread Jeff Anton

On 01/06/16 08:04, Jim Nasby wrote:
...

increase the number of active developers. My very talented colleague
doesn't write to Postgres due C language. He like to write planner in
lisp or erlang. Or like to play in these languages. C is barrier for
younger people.



...

better job of "eating our own dog food". I think it would also be very
interesting if there were add-on frameworks that allowed things like a
planner written in another language (which with the planner hooks might
actually be possible).


Amazing how stuff comes back.

A bit of history...  The very first Postgres planner was written in 
Lisp.  Mostly this was to get the first usable system going quickly. 
The problems with performance, garbage collection and memory use made a 
rewrite a high priority.


IMO, most of this discussion is off track.  Sadly, a significant 
percentage of highly capable programmers are not very good at personal 
interaction.  At some point, poor people skills negate the value of 
programming skills.  I do think that needs recognition and a willingness 
to say goodbye to persons who bring disrepute to the effort of keeping 
the Postgresql world moving forward.  The problem is codifying such 
rules and that these same people who have the problem will likely argue 
such rules to the death.  Maybe the present discussion is an example.


Jeff Anton


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Submitting to this list

2016-01-06 Thread Melvin Davidson
I would like to see the following added to the introduction to this list.

"When submitting to this list, please include the full version of
PostgreSQL and the O/S you are using.
Also, if you are reportaing a problem, it is essential that a minimal
amount of schema & data be
provided in order to duplicate problem being reported, as well as exact
error verbage encountered and
any relevant extracts from the postgresql log file(s)."

While some may think there are cases where this is irrelavant, there are
now in existence seveeral
versions of PostgreSQL across multiple operating systems. It it not
inconcievable that a bug (or problem)
being reported in a previous version & O/S has already been corrected in a
newer one. Likewise, something
that may occur in one version & O/S may not occur in another.

If it is just a general query, keep in mind that new features are
constantly being added with each new
release, so something previously impossible (or done another way) in a
previous version, may now be
simplified with the implementation of a new function/feature.

I encourage additional suggestions as to what should be included when
submitting queries to this list.
-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Folk Alley - All Folk - 24 Hours a day
www.folkalley.com


Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread Joshua D. Drake

On 01/06/2016 09:20 AM, Adrian Klaver wrote:


We just have to figure out if it will. (As a cis-hetero white middle
class male) I'm not a "targeted" group and as such my views may not be
of the most use here.


Which is another very good point.


Except it is not true. Re: my previous post about Brendan Eich. He was
run out of office for crossing one of the 'targeted' groups who then
launched a cyberbully and harassment campaign that made his position
untenable. Mozilla admitted as much:

https://blog.mozilla.org/blog/2014/04/03/brendan-eich-steps-down-as-mozilla-ceo/


Yet other then the politicians answer of we will look into it, nothing
was done.


Not our problem.

Our problem would be if those actions were happening "within" the 
PostgreSQL community. What jerks (on either side) do outside the 
community is not our concern. We are not Social Justice Warriors for the 
world.


JD




--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


--
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] Charging for PostgreSQL

2016-01-06 Thread FarjadFarid(ChkNet)
Hi Jim/Melvin and all,

Music industry is a good example where too low charges has damaged it. People 
in the industry will tell you that not enough young talent are coming through 
the system. I do agree that there is some corruption but there is no escaping 
the fact that the industry's turn over has seen a massive decline.  

Sun Microsystem is even a closer example and why Oracle has taken Google to 
court over java licenses. Basically they need to make money to support product 
developments. 

Even the community version has costs associated with it. 

Incidentally the original posting was hoping to replicate the success of Ubuntu 
and their use of code of conduct. 

Hence my comments about issues that will help the success of PostgreSQL more 
directly. 

I for one would not ignore code of conduct if there was one. Hopefully others 
would have the courtesy to do the same. 

Hope this clarifies all the points. 








-Original Message-
From: James Keener [mailto:j...@jimkeener.com] 
Sent: 06 January 2016 15:54
To: FarjadFarid(ChkNet); 'Karsten Hilbert'; pgsql-general@postgresql.org
Subject: Charging for PostgreSQL

As Melvin mentioned, this belongs in a new thread.

> Just one last example. Consider the music industry. For years Apple amongst 
> others promoted low cost per unit downloads and then streaming. We all know 
> the history. 
> 
> Once a thriving industry music industry has been decimated. Neither the 
> musicians nor song writers receive proper income any more.  
> All the major players recognise its current state is unsustainable. 
So? In an odd twist of things, the developers here are either being paid to 
work on PostgreSQL or are _volunteering_ their time. It would be extremely rude 
to take their _volunteered_ time and profit from it.
Ditto for support, such as this forum and the IRC channel.

We can debate the music industry all day. My view is that it's inefficient, 
corrupt, and poorly managed. A more streamlined system would result in more 
money to the artists themselves. They are not a good comparison to a F/OSS 
project.

> *I am sure neither of us want to see postgresql to falter.*
And I have no idea how you think charging for PostgreSQL won't make it falter. 
People will move to other free databases or move to paid offerings along the 
thought process of "no one was ever fired for buying ibm"

> Of course the right balance needs to be struck but for me at least the idea 
> of free lunch has had its day. 
How does PostgreSQL being free affect you in a _negative_ way? This "free 
lunch" is the reason we have the technology and world that we do.
I'm honestly curious why you have an issue with this. Not charging for code has 
not prevented a plethora of other projects from having a growing community. 
Those issues become moot when you force the community to disappear. We need to 
understand what keeps new devs away and fix it
-- not simply force everyone away.

> There can be a low enough charge that people don't feel too much of a pinch 
> but enough to sustain the progress of postgresql.
No. There can't. Going from free to anything will decrease your user base, 
especially when there are free alternatives and very large, and
(unfortunately) trusted names you can pay for a database. I've dealt with this 
at many companies.

> I genuinely don't like arguments over emails. These are complex issues.
I personally find it easier than arguing in person. But to each his own.
If you don't like arguing then there is nothing that says you must argue.

> Again I for one will continue to support postgresql team whatever their 
> decision may be. 
That decision has already been made. Unless you can overcome the _idealogical_ 
reason that PostgreSQL is F/OSS in the first place, then I'm not sure this is 
an argument worth continuing.

Jim

> 
> 
> 
> -Original Message-
> From: pgsql-general-ow...@postgresql.org 
> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of James Keener
> Sent: 06 January 2016 15:04
> To: FarjadFarid(ChkNet); 'Karsten Hilbert'; 
> pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Code of Conduct: Is it time?
> 
>> My only aim is further progress of postgresql.
> Charging for it would do exactly that. Most people would simply switch to 
> MySQL (or Maria) or stop upgrading/upgrade to a fork.
> 
>> As per Sun Microsystem’s case charging zero dollars (for Java and
>> mysql)  means there is zero income.
> Why do you think this is a company? There _are_ companies that offer support 
> and coding. While I'm sure everyone would agree that developers should be 
> able to eat (and more/better than Raman), the point of the "The PostgreSQL 
> Global Development Group" and being "The world's most advanced open source 
> database" is not to become Ellison. The commercial support and consulting 
> offerings are there to make the money. The rest of us plebs just have to help 
> each other out.
> 
> Had PostgreSQL started out/never became open source, we 

Re: [GENERAL] Charging for PostgreSQL

2016-01-06 Thread Stéphane Schildknecht
On 06/01/2016 16:54, James Keener wrote:
> As Melvin mentioned, this belongs in a new thread.

And as such, it would have been really kind to actually start a new one.

(...)
-- 
Stéphane Schildknecht
Contact régional PostgreSQL pour l'Europe francophone
Loxodata - Conseil, expertise et formations
06.17.11.37.42


-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread James Keener
> No, CoC by itself doesn't grow the community. That doesn't mean we
> shouldn't have one.
I'd agree with that. Thinking back over my previous points, it does make
sense to have one, if only to deal with people who represent the
community in some way, i.e. have some kind of commit or marketing access.

> Another weakness we have is the mentality that the only way to
> contribute to the community is as a developer.
Perhaps this is a separate issue from having a CoC.

Things like not having a bug tracker [1] prevent people from finding
issues to even be involved with, including the website, marketing, code,
tests,  That was 10 years ago and it's still the first result for
"Postgres bug tracker" on Google.


-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread Joshua D. Drake

On 01/06/2016 08:11 AM, James Keener wrote:

The coc sounds like a Washington politics play, but as long as the best
still engage
in this forum, I could care less. The list serves its purpose without
overhead...a rare
resource in today's flood of incoherent technical chatter.


Beyond "Hey! Look at us! We're telling people to play nice" What would a
Code of Conduct actually get the community?


It provides a sense of confidence to those who are not confident that 
they can come play in our playground and not be bullied. That is what 
every single code of conduct is about. There are a lot of very talented 
people in the FLOSS community that just don't like to work in areas that 
don't have a code of conduct.



Is not having a formal "play
nice" document actually keeping developers away?

However, what happens if I break the CoC? Email addresses and IRC
handles are cheap. I can still continue to use PostgreSQL. If I say an
incredibly racist, sexist, or just plain rude thing, then what do I
loose? What do we do when someone harasses someone else in private?


It isn't about your ability to use PostgreSQL. It is about your ability 
to contribute and be part of the community.




That said, I would capitulate that a document stating the behavior we
expect of each other as a useful way in helping us tell people to stand
down.


This is a very good point. It serves as a throttle on heated 
discussions. It shows we are serious about everyone respecting each 
other even when they aren't getting along.



However, we have to accept that in-and-off itself it's a
meaningless document. Like the US Constitution, it only matters if
people execute and make it matter.


Exactly and there are ways to do that.



_We_ as a community need to take the responsibility of telling each
other off when someone steps out of line. If a (short) document
explaining the goals, values, and precepts of the community will help us
do that, then by all means, let's do that!


Right. The creation of a CoC doesn't hurt anyone. There is no downside.



We just have to figure out if it will. (As a cis-hetero white middle
class male) I'm not a "targeted" group and as such my views may not be
of the most use here.


Which is another very good point.

JD

--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


--
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] Code of Conduct: Is it time?

2016-01-06 Thread Joshua D. Drake

On 01/06/2016 08:13 AM, Jim Nasby wrote:


(BTW, if your concern on enforcement is about control, not only can
people be removed from mailing lists and the like, but there actually is
a Postgres legal entity that could start legal proceedings if it ever
came to it.)


As a Director for 2 of the "legal" entities this idea is a rough road. 
As a volunteer organization we would have a very hard time bringing 
legal proceedings for a violation of a CoC. Realistically we are talking 
about a person bringing legal proceedings against another person of whom 
are contributors to the "PostgreSQL Project".


That said, there is no reason this can't be enforced.

A hacker who has code committed to the tree has a vested ID interest in 
that code. It took time, heart, commitment, and tough skin. They may not 
have been compensated for that time, if they had been compensated they 
also have skin in the game with whoever compensated them.


Now change the first sentence to:

A community organizer who spends months organizing a postgresql event 
has a vested ID interest in that event.


A pug leader who spends time every month organizing a postgresql meeting 
has a vested ID interest in that meeting.


An extension writer 

A speaker 

A DBA who fought hard to get PostgreSQL into their DC.

If the big yellow guillotine comes down on their ability to contribute 
and stains the shirt red. It will matter.


Enforcement isn't that hard. It is just a committee who ultimately 
answers to -core.


Sincerely,

JD






--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


--
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] Code of Conduct: Is it time?

2016-01-06 Thread Victor Yegorov
2016-01-06 9:08 GMT+02:00 Oleg Bartunov :

> I agree with Jim, something is wrong, I see our developers community isn't
> growing and getting older. There is no formal problem to start contribute,
> but steep learning curve and lack of mentoring practice scare people.


I agree, that learning curve is very steep.

Back in 1999 there was Programmer's Guide (edited by Thomas Lockhart). Sad,
that this part of the documentation is not evolving anymore — it'd be just
great to get a high-level overview of, say, query parsing and planning, or
details of libpq protocol. Perhaps, this is a good project for a newby to
do. Perhaps, it is worthwhile to create Developer's documentation, either
as a section in the official docs or as a separate resource with structure
and design similar to the official docs?

Another very wanted change in the community is mentorship. Personally, I
don't feel confident to ask endless questions I have when looking into the
code, as I understand, that this might be a very basic (for PostgreSQL
hackers) stuff. For me it'd be a great helper, if I could talk this over
(via e-mail or any messenger) with experienced developer. Reminds me of
what we do for the GSoC, where developers volunteer for mentoring students.
Something similar would be handy in general, perhaps with a web interface
similar to the CommitFest's one.


-- 
Victor Y. Yegorov


Re: [GENERAL] Code of Conduct: Is it time?

2016-01-06 Thread David Rowley
On 6 January 2016 at 20:36, Pavel Stehule  wrote:

>  Almost all developers write code for job not for hobby.
>

As much as I'm trying not to get involved in this thread mainly due to my
lack of ability to foresee that a block of text will solve a bunch of
problems, I do just want to point out that before I joined 2ndQuadrant that
PostgreSQL for me was a hobby, and I did submit several patches which were
accepted and committed. I had no sort of financial interest at all in doing
this, I did it for free, with the only form of reward that I received was
that it made me happy when when my code was accepted. The only thing I
wanted out of this was to improve my skills, and I thought working with
PostgreSQL, due to it having very high coding standards was a good choice
for a way to do this.  If there was something being proposed here which
would encourage more people to do as I did, then I think that would be a
bonus. Perhaps someone may mumble something in disagreement about that
though.

It's hard for me to imagine that I've been the only person to do this.

-- 
 David Rowley   http://www.2ndQuadrant.com/

 PostgreSQL Development, 24x7 Support, Training & Services


Re: [GENERAL] Submitting to this list

2016-01-06 Thread John R Pierce

On 1/6/2016 9:15 AM, Melvin Davidson wrote:


I would like to see the following added to the introduction to this list.

"When submitting to this list, please include the full version of 
PostgreSQL and the O/S you are using.
Also, if you are reportaing a problem, it is essential that a minimal 
amount of schema & data be
provided in order to duplicate problem being reported, as well as 
exact error verbage encountered and

any relevant extracts from the postgresql log file(s)."


for this specific list submission, what versioning would you have supplied ?



--
john r pierce, recycling bits in santa cruz



--
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] Definitive answer: can functions use indexes?

2016-01-06 Thread Seamus Abshere
On Wed, Jan 6, 2016, at 08:41 PM, Tom Lane wrote:
> Seamus Abshere  writes:
> > -> Can a function like `LEFT()` use an index?
> Since the question makes little sense as stated, I'm going to assume
> you mean "can a query like SELECT ... WHERE left(foo, 3) = 'bar'
> use an index on column foo?"
> 
> The answer to that is no, there is no such optimization built into
> Postgres.  (In principle there could be, but I've not heard enough
> requests to make me think we'd ever pursue it.)
> 
> The equivalent optimization that *is* built in, and has been for
> a long time, is for LIKE: "SELECT ... WHERE foo LIKE 'bar%'" can
> use an index on foo, at least if it's an index sorted according to
> C collation.

hi Tom,

I should have been more general. In layman's/narrative terms, what's the
deal with functions vs. operators for postgres indexes?

For example, `exist(hstore,text)` vs. `hstore ? text` ?

Thank you!
Seamus

PS. If I have understood correctly over the years, in order for the
query planner to use indexes, it needs to see operators - functions are
opaque to it. I'm looking for a bit more narrative on this to round out
my understanding.

-- 
Seamus Abshere, SCEA
+598 99 54 99 54
https://github.com/seamusabshere


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Re: [BUGS] BUG #13847: WARNING: skipping "pg_toast_" --- cannot vacuum indexes, views, or special system tables VACUUM

2016-01-06 Thread Navaneethakrishnan Gopal
Hi Kevin,
Thanks a lot for getting back on this.
1) Customer is facing issue in our application running 8.2 version PG
linux# su postgres -s /bin/sh -c "postgres --version"
postgres (PostgreSQL) 8.2.3
unicorn=# select version();
    version

 PostgreSQL 8.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.3
(1 row)

2) This is the current error customer is facing; which I think same as this 
https://wiki.postgresql.org/wiki/20110408pg_upgrade_fix#What_is_the_underlying_cause_of_this_bug.3F
72 org.postgresql.util.PSQLException: ERROR: could not access status of 
transaction 192282624   Detail: Could not open file "pg_clog/00B7": No such 
file or directory.  org.postgresql.util.PSQLException: ERROR: could not access 
status of transaction 192282624   Detail: Could not open file "pg_clog/00B7": 
No such file or directory. at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
 ~[postgresql-8.2-504.jdbc3.jar:na] at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
 ~[postgresql-8.2-504.jdbc3.jar:na] at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191) 
~[postgresql-8.2-504.jdbc3.jar:na]   at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
 ~[postgresql-8.2-504.jdbc3.jar:na] at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337)
 ~[postgresql-8.2-504.jdbc3.jar:na]
3) We tried applying the fix in two ways 
https://wiki.postgresql.org/wiki/20110408pg_upgrade_fix#What_is_the_underlying_cause_of_this_bug.3F
 
    3.i) Just copy and past the text from this page in the psql windown
    3.ii) By running like this  "psql -U postgres -a -f pg_upgrade_fix.sql 
unicorn >> error.txt 2>&1"   Have attached both "pg_upgrade_fix.sql" and 
error.txt with this mail
Please help us on solving these errors.

4) As this issue is already fixed in 9.4 version, we have our newer application 
which uses 9.4 PG. But customer currently can't migrate to this newunicorn=# 
select version();
    version

 PostgreSQL 9.4.1 on x86_64-mv-linux-gnu, compiled by 
i686-montavista-linux-gnu-gcc (MontaVista Linux G++ 4.4-1311130628) 4.4.1, 
64-bit
(1 row)    4.i) May be not applicable here, just to ensure the above script is 
working fine, we tried here in the 9.4 PG version. As expected we didn't see 
any error. Please check  "no_error*.txt"

Could you please help us on solving the warning message seen (error.txt)  in 
8.2 PG version. 

Please let us know if you require more info.
Thanks,Navanee


  From: Kevin Grittner 
 To: gn...@yahoo.co.in 
Cc: "pgsql-b...@postgresql.org" 
 Sent: Wednesday, January 6, 2016 8:39 PM
 Subject: Re: [BUGS] BUG #13847: WARNING: skipping "pg_toast_" --- cannot 
vacuum indexes, views, or special system tables VACUUM
   
On Tue, Jan 5, 2016 at 9:15 AM,   wrote:

> Postgres Version:8.2

Do you really mean 8.2, not 9.2?  For a running instance, please
connect with psql (or similar) and give the output of:

  SELECT version();

If you have installed software for an upgrade and don't have a
cluster running yet, please run the following at a command line and
show the results:

  /postgres --version

Always use copy/paste for such things, rather than retyping or
showing what you think are the relevant parts.

> One of our customer is hitting this issue 20110408pg_upgrade_fix.

Rather than a diagnosis, please show exactly what you are doing and
what the results are.  You certainly can't be hitting this bug if
you are upgrading from 8.2.

https://wiki.postgresql.org/wiki/Guide_to_reporting_problems

> Customer currently cannot upgrade to our new software (which is
> running with 9.x PG DB).

Again, 9.x doesn't even tell us what the major release is.  Copy
paste a full version, as described above.

> Sorry if this is an wrong alias? Could you please guide us to the
> correct mailing list.

This would be more appropriate on the pgsql-general list.

http://www.postgresql.org/list/

Please start a new thread there with the information suggested by
the "Guide to reporting problems" page referenced above.  You can
do that by just sending an email to: pgsql-general@postgresql.org

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


  SET vacuum_cost_delay = 40;
SET
SET vacuum_cost_limit = 200;
SET
CREATE TEMPORARY TABLE pg_upgrade_fix AS SELECT 'VACUUM FREEZE pg_toast.' || 
c.relname || ';'   FROMpg_class c, pg_namespace n WHERE   c.relnamespace = 
n.oid AND n.nspname = 'pg_toast' AND c.relkind = 't' ORDER by c.oid;
SELECT
\copy pg_upgrade_fix 

Re: [GENERAL] Conflict detection in ON CONFLICT

2016-01-06 Thread Jeff Janes
On Wed, Jan 6, 2016 at 10:48 AM, Nicolas ALBEZA  wrote:
> Hello,
>
> Is there any way for a client to know if a conflict happened in an ON
> CONFLICT DO UPDATE query ?

Here is one way:

create table foo (x int primary key, y text);

insert into foo values (3,'insert') on conflict (x) do update set
y='update' returning y;

I don't know how to do it without leaving an extra column of cruft
behind in the table.

Cheers,

Jeff


-- 
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] Postgresql 9.3 not coming up after restart in centos

2016-01-06 Thread Adrian Klaver

On 01/06/2016 01:08 PM, balajishanmu...@live.in wrote:

Most of the time I will be restarting centOS by issuing reboot command. Which
will do the orderly shutdown of all the service and sometimes just pull the
plug.

But the issue appears to be random. Is there a way that before Postgres
starts we can check whether data is flushed, if not flush it manually or any
other better way to avoid this issue.


I would think the damage is done on shutdown and by the time you start 
up again it is to late to do anything.


In that vein, what does the Postgres log show at the end of the shutdown 
sequence?






Thank you!



--
View this message in context: 
http://postgresql.nabble.com/Postgresql-9-3-not-coming-up-after-restart-in-centos-tp5880435p5880690.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.





--
Adrian Klaver
adrian.kla...@aklaver.com


--
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] Charging for PostgreSQL

2016-01-06 Thread John R Pierce

On 1/6/2016 8:25 AM, FarjadFarid(ChkNet) wrote:

Music industry is a good example where too low charges has damaged it. People 
in the industry will tell you that not enough young talent are coming through 
the system. I do agree that there is some corruption but there is no escaping 
the fact that the industry's turn over has seen a massive decline.



thats a terrible example.   'the music industry' are leaches on the 
talent.young talent has chosen to stay OUT of their 'industry' 
because the industry sucks them dry.


there's TONS of young talent out there performing, its just not 
mainstream commercial crap.   much of it is self produced, by extremely 
talented musicians who have intentionally chosen to stay as far away 
from the 'music industry' as possible, earning their income by touring 
and direct CD and merchandise sales.






--
john r pierce, recycling bits in santa cruz



--
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] Definitive answer: can functions use indexes?

2016-01-06 Thread Tom Lane
Seamus Abshere  writes:
> I've been using Postgres for years ( :heart: ) and I'm still in doubt
> about this. Would somebody provide an authoritative, definitive,
> narrative answer?

> -> Can a function like `LEFT()` use an index?

To do what?

Since the question makes little sense as stated, I'm going to assume
you mean "can a query like SELECT ... WHERE left(foo, 3) = 'bar'
use an index on column foo?"

The answer to that is no, there is no such optimization built into
Postgres.  (In principle there could be, but I've not heard enough
requests to make me think we'd ever pursue it.)

The equivalent optimization that *is* built in, and has been for
a long time, is for LIKE: "SELECT ... WHERE foo LIKE 'bar%'" can
use an index on foo, at least if it's an index sorted according to
C collation.

Another answer, which might serve as long as your application only
cares about a small number of prefix lengths, is functional indexes.
If you create a functional index on "left(foo,3)" you're all set.
This won't scale well to a whole bunch of different lengths, though.

regards, tom lane


-- 
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] Definitive answer: can functions use indexes?

2016-01-06 Thread Jim Nasby

On 1/6/16 5:15 PM, Seamus Abshere wrote:

I've been using Postgres for years ( :heart: ) and I'm still in doubt
about this. Would somebody provide an authoritative, definitive,
narrative answer?

-> Can a function like `LEFT()` use an index?

(Or do I have to find an "equivalent" operator in order to leverage
indexes?)


If you're looking for magic here, there is none.

CREATE INDEX ON a(field);
... WHERE field = LEFT(...) -- can use index
... WHERE LEFT(field) = ... -- can NOT use index

CREATE INDEX ON a(LEFT(field,5))
... WHERE field = LEFT(...) -- can NOT use index
... WHERE LEFT(field,5) = ... -- CAN use index
... WHERE LEFT(field,6) = ... -- can NOT use index
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
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] Code of Conduct: Is it time?

2016-01-06 Thread Joshua D. Drake

On 01/06/2016 02:50 PM, David Gibbons wrote:


On 1/6/2016 8:50 AM, Joshua D. Drake wrote:

It provides a sense of confidence to those who are not confident
that they can come play in our playground and not be bullied.
That is what every single code of conduct is about. There are a
lot of very talented people in the FLOSS community that just
don't like to work in areas that don't have a code of conduct.



Linus's lack of a personal CoC certainly hasn't kept people away
from Linux.



Yes actually it has, perhaps not use but contribution (which is what we 
are talking about). There was just recently a very high profile exit due 
to his inability not to be a jackass. I personally know people that 
won't go anywhere near Kernel development because of the toxic 
environment that surrounds it.


JD

--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


--
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] Code of Conduct: Is it time?

2016-01-06 Thread David Gibbons
Uhm, you mean this one?

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b0bc65729070b9cbdbb53ff042984a3c545a0e34

+If however, anyone feels personally abused, threatened, or otherwise
+uncomfortable due to this process, that is not acceptable. If so,
+please contact the Linux Foundation's Technical Advisory Board at
+, or the individual members, and they
+will work to resolve the issue to the best of their ability. For more
+information on who is on the Technical Advisory Board and what their
+role is, please see:
+ http://www.linuxfoundation.org/programs/advisory-councils/tab
+

On Wed, Jan 6, 2016 at 2:41 PM, John R Pierce  wrote:

> On 1/6/2016 8:50 AM, Joshua D. Drake wrote:
>
>> It provides a sense of confidence to those who are not confident that
>> they can come play in our playground and not be bullied. That is what every
>> single code of conduct is about. There are a lot of very talented people in
>> the FLOSS community that just don't like to work in areas that don't have a
>> code of conduct.
>>
>
>
> Linus's lack of a personal CoC certainly hasn't kept people away from
> Linux.
>
>
>
> --
> john r pierce, recycling bits in santa cruz
>
>
>
> --
> 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] Definitive answer: can functions use indexes?

2016-01-06 Thread Tom Lane
Seamus Abshere  writes:
> I should have been more general. In layman's/narrative terms, what's the
> deal with functions vs. operators for postgres indexes?

> For example, `exist(hstore,text)` vs. `hstore ? text` ?

Yeah.  exist(hstore,text) and hstore?text may yield the same result,
but only the latter is a candidate to be used with an index on an hstore
column.  This is a consequence of decisions that were made twenty-five or
more years ago at Berkeley, to design the core system's interface to index
support in terms of operators and operator classes (there's a reason those
are not called "function classes").  At this point, those decisions are
so heavily embedded --- into not only the core code but perhaps hundreds
of third-party extensions --- that rethinking them would be very painful.
As long as the gain is only likely to be cosmetic, it probably won't
happen.

You can see some info about what I'm talking about here:
http://www.postgresql.org/docs/devel/static/xindex.html

A closely related issue is that most of the planner's optimization
intelligence is tied to operators, not functions, as shown here:
http://www.postgresql.org/docs/devel/static/xoper-optimization.html

Again, that's something that could be improved in principle, but
the amount of work involved seems disproportionate to the likely
benefit.

regards, tom lane


-- 
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] Code of Conduct: Is it time?

2016-01-06 Thread John R Pierce

On 1/6/2016 8:50 AM, Joshua D. Drake wrote:
It provides a sense of confidence to those who are not confident that 
they can come play in our playground and not be bullied. That is what 
every single code of conduct is about. There are a lot of very 
talented people in the FLOSS community that just don't like to work in 
areas that don't have a code of conduct. 



Linus's lack of a personal CoC certainly hasn't kept people away from Linux.



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Definitive answer: can functions use indexes?

2016-01-06 Thread Seamus Abshere
hi,

I've been using Postgres for years ( :heart: ) and I'm still in doubt
about this. Would somebody provide an authoritative, definitive,
narrative answer?

-> Can a function like `LEFT()` use an index?

(Or do I have to find an "equivalent" operator in order to leverage
indexes?)

Thanks!
Seamus

-- 
Seamus Abshere, SCEA
+598 99 54 99 54
https://github.com/seamusabshere


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Trigger function interface

2016-01-06 Thread Tatsuo Ishii
Is it possible to get the parse tree in a C trigger function which is
invoked when DML (INSERT/UPDATE/DELETE against a view) is executed?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


-- 
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] Definitive answer: can functions use indexes?

2016-01-06 Thread Jim Nasby

On 1/6/16 5:41 PM, Tom Lane wrote:

Since the question makes little sense as stated, I'm going to assume
you mean "can a query like SELECT ... WHERE left(foo, 3) = 'bar'
use an index on column foo?"

The answer to that is no, there is no such optimization built into
Postgres.  (In principle there could be, but I've not heard enough
requests to make me think we'd ever pursue it.)


BTW, the case where this would be highly valuable is timestamps. Being 
able to do something like date_part('month',timestamptz)='Jan' would be 
a big, big deal for warehousing.

--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
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] RAM of Postgres Server

2016-01-06 Thread David G. Johnston
On Wed, Jan 6, 2016 at 10:39 PM, Sachin Srivastava 
wrote:

> Dear Team,
>
> Please suggest, how much RAM and core should be define for New Postgres
> database server, if we will use Postgres 9.3 and above.
>
> If suppose my postgres database size will be near about 300 to 500 GB for
> future.
>
> There is any document regarding this server configuration, suggest ?
>
>
>
​Total size is meaningless because, for instance, consider if of that
500GB, 499GB of it​

​is archive data that is rarely if ever accessed.

RAM holds data that is recently accessed - how much of that will you have?
Cores help service concurrent requests - how many of those will you have?
How fast will they complete?
​
​David J.


Re: [GENERAL] 9.5rc1 RLS select policy on insert?

2016-01-06 Thread Stephen Frost
* Ted Toth (txt...@gmail.com) wrote:
> I see the insert policy check running but also the select policy using
> on insert. I don't understand why the select policy is being run.
> Could it possibly be related to using a sequence on the table?

It's used when SELECT rights are required on the table, such as with an
INSERT .. RETURNING.

Thanks!

Stephen


signature.asc
Description: Digital signature


Re: [GENERAL] COPY FROM STDIN

2016-01-06 Thread Jim Nasby

On 1/6/16 9:45 PM, Luke Coldiron wrote:

In the example above I'm not sure if I can use some sub struct of the
SPIPlanPtr and hand it off to the DoCopy function as the CopyStmt or if I
need to go about this entirely different. Any advice on the matter would be
much appreciated.


I don't know off-hand. I suggest you look at what psql does to implement 
\copy (note the \).

--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
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] Getting the function definition from oid in before firing the function

2016-01-06 Thread Michael Paquier
On Wed, Jan 6, 2016 at 4:29 PM, Mohammed Ajil  wrote:
> What is an executor hook?

Here you go, with a particular focus on the ones names Executor*_hook:
https://wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] RAM of Postgres Server

2016-01-06 Thread Sachin Srivastava
Dear Team,

Please suggest, how much RAM and core should be define for New Postgres
database server, if we will use Postgres 9.3 and above.

If suppose my postgres database size will be near about 300 to 500 GB for
future.

There is any document regarding this server configuration, suggest ?

Regards,
SS


Re: [GENERAL] COPY FROM STDIN

2016-01-06 Thread Luke Coldiron
> On 1/4/16 12:18 PM, Luke Coldiron wrote:
> > Is there a way to achieve the performance of the COPY FROM STDIN command
> > within a C extension function connected to the db connection that called
> > the C function? I have text that I would like to receive as input to a C
> > function that contains many COPY command statements in the file that
> > would be parsed similar to how psql would handle the file but I don't
> > want to shell out to psql as I need to do all of this work on the db
> > connection that the function was called from as there are other commands
> > that I need to perform as well after before and after handling the COPY
> > commands on this same connection. I would like the unit of work to be
> > all or nothing and have the performance of the COPY FROM STDIN command
> > and not break things out into SELECT INTO or INSERT statements for
> > performance.
> >
> > Ideally I would like to be able to attach to the calling db connection
> > via SPI_connect() and then use the libpq library to issue the copy
> > commands via PQputCopyData, PQputCopyEnd.
>
> C functions can use SPI, so I'm not sure what the issue is?
>
> http://www.postgresql.org/docs/9.5/static/spi.html
>
> (BTW, you'll want to scroll to the bottom of that page...)
> -- 
> Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
> Experts in Analytics, Data Architecture and PostgreSQL
> Data in Trouble? Get it in Treble! http://bluetreble.com/

I should probably back the boat up. I'm not too familiar with the
inter-workings of postgres. I have a general understanding of the SPI API
and realize that other c functions can be called. Part of the problem is I'm
not sure which ones. The first thing I am trying to figure out is if I can
perform a COPY FROM STDIN command via a C extension function using the SPI.
>From what I read in the documentation it seemed to indicate that this may
not be possible
(http://www.postgresql.org/docs/9.3/static/spi-spi-execute.html). 

Here is what I have tried thus far.

#include "postgres.h"
#include "fmgr.h"
#include "funcapi.h"
#include "executor/spi.h"
#include "catalog/pg_type.h"
#include "commands/copy.h"

// Attempt #1
Datum copy_test(PG_FUNCTION_ARGS)
{
   SPI_connect();

   int spi_status = SPI_execute("COPY public.test_table(val1, val2) FROM
stdin;" /* command */,
false, /* read_only */
0 /* count */);
   if (spi_status != SPI_OK_SELECT)
   {
  ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg_internal("Failed: %s.", SPI_result_code_string(spi_status;
   }

   SPI_finish();

   PG_RETURN_VOID();
}

When I run the function above I get this error:  ERROR:  Failed:
SPI_ERROR_COPY. Which is what I would expect from the documentation. 

However if I try something like this:

// Attempt #2
Datum copy_test(PG_FUNCTION_ARGS)
{
   SPI_connect();

   SPIPlanPtr plan = SPI_prepare("COPY public.test_table(val1, val2) FROM
stdin;" /* command */, 0 /* nargs */, NULL /* argtypes*/);
   if (plan == NULL)
   {
  ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg_internal("Failed: %s.", SPI_result_code_string(SPI_result;
   }

   SPI_finish();

   PG_RETURN_VOID();
}

It works, although I really haven't got to the point of doing anything. It
looked like the "commands/copy.h" has the interface that I want to use but
I'm not sure if I am even going about it the correct way. Here roughly what
I am thinking I need to do.

// Attempt #3
Datum copy_test(PG_FUNCTION_ARGS)
{
   SPI_connect();

   SPIPlanPtr plan = SPI_prepare("COPY public.test_table(val1, val2) FROM
stdin;" /* command */, 0 /* nargs */, NULL /* argtypes*/);
   if (plan == NULL)
   {
  ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg_internal("Failed: %s.", SPI_result_code_string(SPI_result;
   }

   uint64 processed;
   Oid table_oid = DoCopy(const CopyStmt *stmt,
  "COPY public.test_table(val1, val2) FROM stdin;"
/* queryString */,
   /* processed */);

   //CopyState cstate = BeginCopyFrom(table_oid /* rel */,
  NULL
/* filename */,
false /* is_program */,
  List
*attnamelist,
  List
*options);

  // Somehow  

   // End the copy command
   // EndCopyFrom(cstate);

// TODO: Make use of the callback
   // extern void CopyFromErrorCallback(void *arg);
   // extern DestReceiver *CreateCopyDestReceiver(void);

   SPI_finish();

   PG_RETURN_VOID();
}

In the example above I'm not sure if I can use some sub struct of the
SPIPlanPtr and hand it off to the DoCopy function as the CopyStmt or if I
need to go about this entirely different. Any advice on the matter would be
much appreciated.




-- 
Sent via pgsql-general mailing list 

Re: [GENERAL] RAM of Postgres Server

2016-01-06 Thread Gavin Flower

On 07/01/16 18:39, Sachin Srivastava wrote:

Dear Team,

Please suggest, how much RAM and core should be define for New 
Postgres database server, if we will use Postgres 9.3 and above.


If suppose my postgres database size will be near about 300 to 500 GB 
for future.


There is any document regarding this server configuration, suggest ?

Regards,
SS


What O/S, Linux or something else?

What type of queries?

Expected number of queries per second?

Size of commonly accessed tables, indexes, ... ?


The experts will probably need AT LEAST the above!


Cheers,
Gavin


--
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] Trigger function interface

2016-01-06 Thread Jim Nasby

On 1/6/16 7:03 PM, Tatsuo Ishii wrote:

Is it possible to get the parse tree in a C trigger function which is
invoked when DML (INSERT/UPDATE/DELETE against a view) is executed?


Yes, it's in fcinfo->flinfo->fn_expr.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
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] RAM of Postgres Server

2016-01-06 Thread Sachin Srivastava
Dear David,





Q: RAM holds data that is recently accessed - how much of that will you
have?



Ans: Kindly confirm, as per your question “RAM holds data that is recently
accessed” :  How we figured out that how much data we will have. Is it
depends of Total WAL files (total "checkpoint_segment" I have given 32), am
I correct or thinking wrong, please clarify to me.



Right now we have 10 GB RAM for first database server and 3 GB RAM for
another database server.





Q: Cores help service concurrent requests - how many of those will you
have?  How fast will they complete?



Ans: It’s means, if we have more core then we can do our work fast. Like
from 9.3 onwards for pg_dump as example, if machines having multiple cores
as the load can be shared among separate threads.



So if possible to us then more core should be available on database server
for better performance, please clarify the benefit of more core to me.



Right now we have 1 core for first database server and 2 core for another
database server.







Regards,

Sachin

On Thu, Jan 7, 2016 at 11:25 AM, David G. Johnston <
david.g.johns...@gmail.com> wrote:

> On Wed, Jan 6, 2016 at 10:39 PM, Sachin Srivastava <
> ssr.teleat...@gmail.com> wrote:
>
>> Dear Team,
>>
>> Please suggest, how much RAM and core should be define for New Postgres
>> database server, if we will use Postgres 9.3 and above.
>>
>> If suppose my postgres database size will be near about 300 to 500 GB for
>> future.
>>
>> There is any document regarding this server configuration, suggest ?
>>
>>
>>
> ​Total size is meaningless because, for instance, consider if of that
> 500GB, 499GB of it​
>
> ​is archive data that is rarely if ever accessed.
>
> RAM holds data that is recently accessed - how much of that will you have?
> Cores help service concurrent requests - how many of those will you have?
> How fast will they complete?
> ​
> ​David J.
>
>


[GENERAL] 9.5rc1 RLS select policy on insert?

2016-01-06 Thread Ted Toth
I see the insert policy check running but also the select policy using
on insert. I don't understand why the select policy is being run.
Could it possibly be related to using a sequence on the table?
Ted


-- 
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] Postgresql 9.3 not coming up after restart in centos

2016-01-06 Thread Scott Marlowe
On Wed, Jan 6, 2016 at 12:36 PM, balajishanmu...@live.in
 wrote:
> By application I mean centOS.
>
> We are starting and stopping Postgres using systemd service. We have a
> service file called postgresql9.3.service which is used to start or stop
> Postgres.
>
> Excerpts of postgresql9.3.service
>
> ExecStartPre=/usr/pgsql-9.3/bin/postgresql93-check-db-dir ${PGDATA}
> ExecStart=/usr/pgsql-9.3/bin/pg_ctl start -D ${PGDATA} -s -w -t 300
> ExecStop=/usr/pgsql-9.3/bin/pg_ctl stop -D ${PGDATA} -s -m fast
> ExecReload=/usr/pgsql-9.3/bin/pg_ctl reload -D ${PGDATA} -s
>
>

So how are you restarting centos? Orderly shutdown, pulling the power plugs etc?

I'm wondering if you've got untrustworthy data storage underneath it
(i.e. storage that lies about fsync) and maybe centos or the method of
shutdown isn't allowing the drives to flush the data that they've
already said they flushed but actually haven't.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Re: [BUGS] BUG #13847: WARNING: skipping "pg_toast_" --- cannot vacuum indexes, views, or special system tables VACUUM

2016-01-06 Thread Kevin Grittner
Please quote only enough to remind readers of context an respond
below the quoted text.  This is the conventional style for the
PostgreSQL lists, and saves a lot of time for the thousands who
will read this.  Thanks!

On Wed, Jan 6, 2016 at 12:36 PM, Navaneethakrishnan Gopal
 wrote:

>  PostgreSQL 8.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.3

Ouch!  Not only did the 8.2 major release go out of support in
2011, but there were 20 minor releases over about a five year
period after 8.2.3, each of which fixed serious bugs and/or
security vulnerabilities!  Please read this, and try to stay more
current with minor releases for any major release you are running,
and not get so far out of support for the major release:

http://www.postgresql.org/support/versioning/

> 2) This is the current error customer is facing; which I think
> same as this
> https://wiki.postgresql.org/wiki/20110408pg_upgrade_fix#What_is_the_underlying_cause_of_this_bug.3F

It simply cannot be that bug which caused the problem, because that
was a bug that only existed in early minor releases of the 8.4 and
9.0 major releases.  You may be getting the same error message, but
it is not due to the bug described on the page you cite.

> org.postgresql.util.PSQLException: ERROR: could not access status of 
> transaction 192282624
>   Detail: Could not open file "pg_clog/00B7": No such file or directory.

So, an internal file necessary for database integrity went missing.
There were bugs in early versions of 9.3 and 9.4 which could cause
this, but outside of that the most common cause that I've seen is
that someone tried to free disk space by deleting files, without
realizing their importance.  I can't rule out a bug, but since
you're missing five years of bug fixes for 8.2 on a major release
that went out of support more than four years ago, I don't think
anyone will want to put a lot of time into looking for such a
possible bug.

> 3) We tried applying the fix in two ways
> https://wiki.postgresql.org/wiki/20110408pg_upgrade_fix#What_is_the_underlying_cause_of_this_bug.3F
> 3.i) Just copy and past the text from this page in the psql windown
> 3.ii) By running like this  "psql -U postgres -a -f pg_upgrade_fix.sql 
> unicorn >> error.txt 2>&1"
>Have attached both "pg_upgrade_fix.sql" and error.txt with this mail
>
> Please help us on solving these errors.

I strongly recommend that you stop the database and copy the data
directory structure before attempting any recovery, in case it makes
things worse.

You might want to go back to your most recent good backup.  If you
can't do that, you might want to dummy up the missing clog file(s)
(perhaps using the `dd` utility).  Any in-place recovery attempt is
likely to leave some corruption, so I would recommend using pg_dump
and/or pg_dumpall to save the data and restore it into a fresh
cluster (created from initdb).  If you can still find a copy of
8.2.23 you might want to install that.

>  PostgreSQL 9.4.1 on x86_64-mv-linux-gnu, compiled by 
> i686-montavista-linux-gnu-gcc (MontaVista Linux G++ 4.4-1311130628) 4.4.1, 
> 64-bit

9.3 and 9.4 had serious bugs in early releases which could cause
database corruption and lost data.  Please use the latest 9.4
minor release.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
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] Postgresql 9.3 not coming up after restart in centos

2016-01-06 Thread balajishanmu...@live.in
Most of the time I will be restarting centOS by issuing reboot command. Which
will do the orderly shutdown of all the service and sometimes just pull the
plug.

But the issue appears to be random. Is there a way that before Postgres
starts we can check whether data is flushed, if not flush it manually or any
other better way to avoid this issue.

Thank you!



--
View this message in context: 
http://postgresql.nabble.com/Postgresql-9-3-not-coming-up-after-restart-in-centos-tp5880435p5880690.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general