Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:08 PM, Joshua D. Drake 
wrote:

> On 09/14/2018 01:31 AM, Chris Travers wrote:
>
>
> I apologize for the glacial slowness with which this has all been moving.
>> The core team has now agreed to some revisions to the draft CoC based on
>> the comments in this thread; see
>>
>> https://wiki.postgresql.org/wiki/Code_of_Conduct
>>
>> (That's the updated text, but you can use the diff tool on the page
>> history tab to see the changes from the previous draft.)
>>
>
> I really have to object to this addition:
> "This Code is meant to cover all interaction between community members,
> whether or not it takes place within postgresql.org infrastructure, so
> long as there is not another Code of Conduct that takes precedence (such as
> a conference's Code of Conduct)."
>
> That covers things like public twitter messages over live political
> controversies which might not be personally directed.   At least if one is
> going to go that route, one ought to *also* include a safe harbor for
> non-personally-directed discussions of philosophy, social issues, and
> politics.  Otherwise, I think this is asking for trouble.  See, for
> example, what happened with Opalgate and how this could be seen to
> encourage use of this to silence political controversies unrelated to
> PostgreSQL.
>
>
> I think this is a complicated issue. On the one hand, postgresql.org has
> no business telling people how to act outside of postgresql.org. Full
> stop.
>

I'm going to regret jumping in here, but...

I disagree. If a community member decides to join forums for other software
and then strongly promotes PostgreSQL to the point that they become abusive
or offensive to people making other software choices, then they are clearly
bringing the project into disrepute and we should have every right to
sanction them by preventing them participating in our project in whatever
ways are deemed appropriate.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread Stephen Frost
Greetings,

* Adrian Klaver (adrian.kla...@aklaver.com) wrote:
> On 9/14/18 1:31 AM, Chris Travers wrote:
> >On Wed, Sep 12, 2018 at 10:53 PM Tom Lane  >> wrote:
> >
> >I wrote:
> > > Stephen Frost mailto:sfr...@snowman.net>>
> >writes:
> > >> We seem to be a bit past that timeline...  Do we have any update
> >on when
> > >> this will be moving forward?
> > >> Or did I miss something?
> >
> > > Nope, you didn't.  Folks have been on holiday which made it hard
> >to keep
> > > forward progress going, particularly with respect to selecting
> >the initial
> > > committee members.  Now that Magnus is back on shore, I hope we can
> > > wrap it up quickly --- say by the end of August.
> >
> >I apologize for the glacial slowness with which this has all been
> >moving.
> >The core team has now agreed to some revisions to the draft CoC based on
> >the comments in this thread; see
> >
> >https://wiki.postgresql.org/wiki/Code_of_Conduct
> >
> >(That's the updated text, but you can use the diff tool on the page
> >history tab to see the changes from the previous draft.)
> >
> >I really have to object to this addition:
> >"This Code is meant to cover all interaction between community members,
> >whether or not it takes place within postgresql.org
> > infrastructure, so long as there is not another
> >Code of Conduct that takes precedence (such as a conference's Code of
> >Conduct)."

I was wondering about that myself and rather had an objection to
implying that this CoC doesn't apply when there's a CoC set up for some
event.  The CoC for an event is typically going to be thinking about
things from the event's timeline (which is on the order of days),
whereas something which happened at an event reflects on the community
and should also be addressed at that level.

> I second that objection. It is not in PGDG's remit to cure the world, for
> whatever form of cure you ascribe to. This is especially true as 'community
> member' has no strict definition.

The goal of this CoC isn't to cure the world, it's to define what's
acceptable behavior to continue to be a member of this community, to
participate in this community through the mailing lists, IRC, etc, and
to be seen as a representative of the community/project.

We certainly have both the right and the remit to define who we want to
have in our community and to represent this community and project to
other communities, projects, organizations, and to people in general.
This CoC is about making it clear what's acceptable and what isn't and
making it clear to everyone, including other communities, that we take
conduct seriously and have a mechanism for dealing with issues that's
fair and reasonable.

Thanks!

Stephen


signature.asc
Description: PGP signature


Re: Code of Conduct plan

2018-09-14 Thread Joshua D. Drake

On 09/14/2018 06:59 AM, Robert Eckhardt wrote:



I really have to object to this addition:
"This Code is meant to cover all interaction between community members,
whether or not it takes place within postgresql.org 
infrastructure, so long as there is not another Code of Conduct that takes
precedence (such as a conference's Code of Conduct)."


I second that objection. It is not in PGDG's remit to cure the world, for
whatever form of cure you ascribe to. This is especially true as 'community
member' has no strict definition.

I understand the concern, however, if you look at how attacks happen
it is frequently through other sites. Specifically under/poorly
moderated sites. For specific examples, people who have issues with
people on Quora will frequently go after them on Facebook and Twitter.


Yes but are we to be the School Principal for the world?


these aren't a solution looking for a problem. If we just want to look
at the clusterfuck that is happening in the reddis community right now
we can see conversations spilling onto twitter and into ad hominem
vitriol.


Sure and that is unfortunate but isn't it up to the individual to deal 
with it through appropriate channels for whatever platform they are on? 
All of these platforms are:


1. Voluntary to use
2. Have their own Terms of Use and complaint departments
3. If it is abuse there are laws

I agree that within Postgresql.org we must have a professional code of 
conduct but the idea that an arbitrary committee appointed by an 
unelected board can decide the fate of a community member based on 
actions outside of the community is a bit authoritarian don't you think?


JD

--
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
* Unless otherwise stated, opinions are my own.   *




Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:13 PM, Adrian Klaver 
wrote:

> On 9/14/18 6:59 AM, Robert Eckhardt wrote:
>
>> On Fri, Sep 14, 2018 at 9:41 AM, Adrian Klaver
>>  wrote:
>>
>>> On 9/14/18 1:31 AM, Chris Travers wrote:
>>>
>>
>
 I really have to object to this addition:
 "This Code is meant to cover all interaction between community members,
 whether or not it takes place within postgresql.org <
 http://postgresql.org>
 infrastructure, so long as there is not another Code of Conduct that
 takes
 precedence (such as a conference's Code of Conduct)."

>>>
>>>
>>> I second that objection. It is not in PGDG's remit to cure the world, for
>>> whatever form of cure you ascribe to. This is especially true as
>>> 'community
>>> member' has no strict definition.
>>>
>>
>> I understand the concern, however, if you look at how attacks happen
>> it is frequently through other sites. Specifically under/poorly
>> moderated sites. For specific examples, people who have issues with
>> people on Quora will frequently go after them on Facebook and Twitter.
>>
>> these aren't a solution looking for a problem. If we just want to look
>> at the clusterfuck that is happening in the reddis community right now
>> we can see conversations spilling onto twitter and into ad hominem
>> vitriol.
>>
>
> Ask yourself, if this was a government agency tracking your speech across
> platforms would you be as approving? Personally I find the whole thing
> creepy.


No one is tracking anything as part of the CoC. That's nothing but a straw
man argument.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread Stephen Frost
Greetings,

* Joshua D. Drake (j...@commandprompt.com) wrote:
> I think this is a complicated issue. On the one hand, postgresql.org has no
> business telling people how to act outside of postgresql.org. Full stop.

This is exactly what this CoC points out- yes, PG.Org absolutely can and
should consider the behavior of individuals as a whole, regardless of
where, when it comes to deciding if it's appropriate for that individual
to continue to be a member of this community.  The CoC isn't about
everyone in the world, nor is it trying to address the actions of
individuals who are not members of this community, but it's definitely
about more than just actions seen on these mailing lists.

> On the other hand if you are (note: contributor, not community member which
> is different) contributor to PostgreSQL, your actions speak about
> PostgreSQL. So I am not sure what a good plan of action here would be.

The line being drawn here isn't terribly clear and I don't know that
it's really useful to try and draw a line.  There's a limit to what PGDG
is able to do from a technical perspective, but anything which is able
to be done within PGDG should be done to distance the community and
project, to the fullest extent possible, from inappropriate behavior.
That could be someone causing problems on IRC or on the mailing lists or
somewhere else, even if that individual isn't listed as a contributor or
involved in the project in other ways.  Naturally, there are different
levels and that's why there's a CoC committee to consider what's fair
and reasonable and at least part of that will probably take into
consideration an individual's role in the community.

> There was a time when Open Source was about code and community. It is clear
> that it is becoming about authority and politics.

This isn't actually anything new, to be clear, this is simply a
definition and documentation to provide clarity and a seperate committee
which Core is delegating out responsibility to.

Thanks,

Stephen


signature.asc
Description: PGP signature


Re: Code of Conduct plan

2018-09-14 Thread James Keener
>
> Yes, I believe so. Isn't that what "To that end, we have established this Code
> of Conduct for community interaction and participation in the project’s
> work and the community at large." basically says?
>

No? What's the "community at large"? To me that sounds like "all
interactions" whether or not they're about postgres.

Jim


Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:55 PM, James Keener  wrote:

>
>
> Yes. They can. The people who make the majority of the contributions to
>> the software can decide what happens, because without them there is no
>> software. If you want to spend 20 years of your life
>>
>
> So everyone who moderates this group and that will be part of the CoC
> committee will have had to have dedicated their life of pg?
>
> Sure, they own the servers, they make the rules. I get it. I'm not
> entirely opposed to it, even if I think it's silly to ram something down
> the rest of the groups throats.
>
> Jim
>
> PS: Also, what's with the personal replies? If you don't want to say what
> you want to the whole group, I don't really have an interest in talking to
> you personally.
>

I've had one off-list personal reply in this thread... from you :-p

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread Joshua D. Drake

On 09/14/2018 07:51 AM, Dave Page wrote:
If that business is publicly bringing the project into disrepute, or 
harassing other community members and they approach us about it, then 
it becomes our business.






If it's unrelated to PostgreSQL, then it's your personal business
and not something the project would get involved in.


O.k. so this isn't clear (at least to me) within the CoC. I want
to make sure I understand. You are saying that if a community
member posts on Twitter that they believe gays are going to hell,
reporting that to the CoC committee would result in a
non-violation UNLESS they referenced postgresql within the post?


Yes, I believe so. Isn't that what "To that end, we have established 
this Code of Conduct for community interaction and participation in 
the project’s work and the community at large." basically says?


Honestly, no. At least not to me especially when you consider the 
sentence right after that, "This Code is meant to cover all interaction 
between community members, whether or not it takes place within 
postgresql.org infrastructure, so long as there is not another Code of 
Conduct that takes precedence (such as a conference's Code of Conduct)."


Based on your clarification, I am feeling better but the language 
doesn't read that way to me.


I wish this was easier but have we considered that all channels that we 
would be concerned with already have CoC's and therefore our CoC is 
fairly powerless? Sure they call them Terms of Use but that's what they 
are, Code of Conducts.


Thanks,

JD

--

Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
* Unless otherwise stated, opinions are my own.   *



Re: Code of Conduct plan

2018-09-14 Thread James Keener
>
> And if you believe strongly that a given statement you may have made is
> not objectionable...you should be willing to defend it in an adjudication
> investigation.


So because someone doesn't like what I say in a venue 100% separate from
postgres,  I have to subject myself, and waste my time, defending actions
in this (and potentially other groups who would also adopt overly broad
CoC) group.

One of the biggest drivers of plea-bargains for innocent people in the US
justice system is the expense of having to defend yourself. I find that to
be a travesty; why are we duplicating that at a smaller level?

Jim


Re: Code of Conduct plan

2018-09-14 Thread Chris Travers
On Fri, Sep 14, 2018 at 4:14 PM Dave Page  wrote:

>
>
> On Fri, Sep 14, 2018 at 3:08 PM, Joshua D. Drake 
> wrote:
>
>> On 09/14/2018 01:31 AM, Chris Travers wrote:
>>
>>
>> I apologize for the glacial slowness with which this has all been moving.
>>> The core team has now agreed to some revisions to the draft CoC based on
>>> the comments in this thread; see
>>>
>>> https://wiki.postgresql.org/wiki/Code_of_Conduct
>>>
>>> (That's the updated text, but you can use the diff tool on the page
>>> history tab to see the changes from the previous draft.)
>>>
>>
>> I really have to object to this addition:
>> "This Code is meant to cover all interaction between community members,
>> whether or not it takes place within postgresql.org infrastructure, so
>> long as there is not another Code of Conduct that takes precedence (such as
>> a conference's Code of Conduct)."
>>
>> That covers things like public twitter messages over live political
>> controversies which might not be personally directed.   At least if one is
>> going to go that route, one ought to *also* include a safe harbor for
>> non-personally-directed discussions of philosophy, social issues, and
>> politics.  Otherwise, I think this is asking for trouble.  See, for
>> example, what happened with Opalgate and how this could be seen to
>> encourage use of this to silence political controversies unrelated to
>> PostgreSQL.
>>
>>
>> I think this is a complicated issue. On the one hand, postgresql.org has
>> no business telling people how to act outside of postgresql.org. Full
>> stop.
>>
>
> I'm going to regret jumping in here, but...
>
> I disagree. If a community member decides to join forums for other
> software and then strongly promotes PostgreSQL to the point that they
> become abusive or offensive to people making other software choices, then
> they are clearly bringing the project into disrepute and we should have
> every right to sanction them by preventing them participating in our
> project in whatever ways are deemed appropriate.
>

 Actually, the easier case here is not being abusive to MySQL users, as the
code of conduct really doesn't clearly cover that anyway.  The easier case
is where two people have a feud and one person carries on a harassment
campaign over various forms of social media.  The current problem is:

1.  The current code of conduct is not clear as to whether terms of
service/community standards of, say, Reddit, supersede or not, and
2.  The community has to act (even if it is includes behavior at a
conference which has its own code of conduct)

So I think the addition is both over inclusive and under inclusive.   It is
over inclusive because it invites a certain group of (mostly American)
people to pick fights (not saying this is all Americans).  And it is under
inclusive because there are cases where the code of conduct *should* be
employed when behavior includes behavior at events which might have their
own codes of conduct.

On the other side, consider someone carrying on a low-grade harassment
campaign against another community member at a series of conferences where
each conference may not amount to a real actionable concern but where the
pattern as a whole might.  There's the under inclusive bit.

So I don't like this clause because I think it invites problems and doesn't
solve issues.
-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: Slow shutdowns sometimes on RDS Postgres

2018-09-14 Thread Adrian Klaver

On 9/14/18 8:43 AM, Jeremy Schneider wrote:

Hi Chris - this is an interesting one that we do see from time to time;
seems worth responding here as actually our best understanding right now
is that this is something in community code, not AWS-specific.





On 9/13/18 16:10, Adrian Klaver wrote:

The thing is, what you are doing ("(e.g. reboot, changing instance
size, etc.)") are instance operations not database operations. That
comes under AWS's purview.


Correct, managing reboots and hardware reconfigurations would be the
responsibility of AWS. However Chris' issue here is just that PostgreSQL
itself took a long time to shut down. I'm not aware of anything
RDS-specific with this.


The thing is I do not remember any posts to this list mentioning the 
same problem on a platform outside RDS. A quick search seems to confirm 
that.


Would it be possible to see the RDS shutdown script?




I don't know about this specific incident, but I do know that the RDS
team has seen cases where a backend gets into a state (like a system
call) where it's not checking signals and thus doesn't receive or
process the postmaster's request to quit. We've seen these processes
delay shutdowns and also block recovery on streaming replicas.


The particulars of that state?



FYI, yes there is a timeout on the RDS side. The basic workflow is to
try to shutdown postgres the normal way, and if it hasn't cleanly shut
down after a period of time then forcefully kill it.






Hope this helps,
Jeremy





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



Re: Code of Conduct plan

2018-09-14 Thread Geoff Winkless
On Fri, 14 Sep 2018 at 15:10, James Keener  wrote:

> I understand the concern, however, if you look at how attacks happen
>
>> it is frequently through other sites. Specifically under/poorly
>> moderated sites. For specific examples, people who have issues with
>> people on Quora will frequently go after them on Facebook and Twitter.
>>
>> these aren't a solution looking for a problem. If we just want to look
>> at the clusterfuck that is happening in the reddis community right now
>> we can see conversations spilling onto twitter and into ad hominem
>> vitriol.
>>
>
> You haven't established that this is both 1) the PG mailing list's problem
> and that 2) this can't and won't be used to retaliate against those holding
> unpopular viewpoints but aren't specifically harassing anyone.
>

This argument (whether or not PostgreSQL should have a CoC) was hashed out
pretty heavily a year ago. In my opinion it wasn't really clear that any
one side or another won the argument but the people who matter came down on
the side of having one. It's pretty unlikely that re-running these
arguments is going to make those people change their minds.

Certainly posting obscenities to these open forums isn't going to do it,
however strongly you might feel about it.

Geoff


Re: Code of Conduct plan

2018-09-14 Thread Joshua D. Drake

On 09/14/2018 07:14 AM, Dave Page wrote:



On Fri, Sep 14, 2018 at 3:08 PM, Joshua D. Drake > wrote:


On 09/14/2018 01:31 AM, Chris Travers wrote:


I apologize for the glacial slowness with which this has all
been moving.
The core team has now agreed to some revisions to the draft
CoC based on
the comments in this thread; see

https://wiki.postgresql.org/wiki/Code_of_Conduct


(That's the updated text, but you can use the diff tool on
the page
history tab to see the changes from the previous draft.)


I really have to object to this addition:
"This Code is meant to cover all interaction between community
members, whether or not it takes place within postgresql.org
 infrastructure, so long as there is not
another Code of Conduct that takes precedence (such as a
conference's Code of Conduct)."

That covers things like public twitter messages over live
political controversies which might not be personally directed.  
At least if one is going to go that route, one ought to *also*
include a safe harbor for non-personally-directed discussions of
philosophy, social issues, and politics. Otherwise, I think this
is asking for trouble.  See, for example, what happened with
Opalgate and how this could be seen to encourage use of this to
silence political controversies unrelated to PostgreSQL.


I think this is a complicated issue. On the one hand,
postgresql.org  has no business telling
people how to act outside of postgresql.org
. Full stop.


I'm going to regret jumping in here, but...

I disagree. If a community member decides to join forums for other 
software and then strongly promotes PostgreSQL to the point that they 
become abusive or offensive to people making other software choices, 
then they are clearly bringing the project into disrepute and we 
should have every right to sanction them by preventing them 
participating in our project in whatever ways are deemed appropriate.


We all know that PostgreSQL is the only database we should use and 
anybody using a different one just hasn't been enlightened yet. :P


I think we need to define community member. I absolutely see your point 
of the individual is a contributor but community member is rather 
ethereal in this context don't you think?


JD

--
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
* Unless otherwise stated, opinions are my own.   *



Re: Code of Conduct plan

2018-09-14 Thread Stephen Frost
Greetings,

(trimmed to -general, tho I don't know if it'll really help)

* James Keener (j...@jimkeener.com) wrote:
> > To many of us, we absolutely are a community. Remember, there are people
> > here who have been around for 20+ years, of which many have become close
> > friends, having started working on PostgreSQL as a hobby. We have always
> > seen the project as a community of like-minded technologists, and welcome
> > others that wish to join, whether just to ask a single question or to hang
> > around for the next 20 years. I do see your viewpoint, but I would counter
> > that coming here for help (for example) is quite different from calling
> > tech support at a vendor.
> 
> I fail to see how that makes everyone here part of a community anymore than
> I'm part of the "community" of regulars at a bar I walk into for the first
> time.

Does the bartender get to kick you out if you get into a fight?  Or if
you're rude or inappropriate towards the waitress?  Yup, doesn't matter
if it's the first time you were in the bar or not.

> As I said, the rules can and should apply within the list, but applying
> them outside the list is odd and wreaks of authoritarianism.

This is more akin to an argument that the bartender can't ban you if you
got into a fight outside the bar- but it falls flat because, yeah,
they can.  Is the bartender likely to ban you because you made one rude
comment or said something on twitter that wasn't about their bar?
Probably not, but it doesn't mean it's not within their right to do so
if they found it particularly concerning (such as threats made against a
regular to the bar or such).

Ultimately, I do tend to agree with the other points made on this thread
that we end up throwing up a lot of 'straw men' attacks and that
analogies tend to not work out too well in the end, but that's part of
why we have a committee made up of reasonable people to consider a
particular complaint and address it, or not, as appropriate.

Thanks!

Stephen


signature.asc
Description: PGP signature


Re: Behaviour when autovacuum is canceled

2018-09-14 Thread Alvaro Herrera
On 2018-Sep-13, Martín Fernández wrote:

> By performing this changes we are going to start relying more heavily
> on the autovacuum work and the concern of "lost work" caused by
> autovacuum canceling itself when locking contention happen showed up.
> I'm guessing that we might be over thinking this and the canceling is
> not going to happen as frequently as we think it will.

Any DDL run on a table will cancel an autovacuum over that table (except
for-wraparound autovacuums).  If these are rare, you don't need to worry
about that too much.  If they are frequent enough that autovacuum will
be cancelled regularly in one table, you'll be sad.

If you're running vacuum by hand, you'd probably see your DDL blocking
behind VACUUM, which would be very noticeable.  I think if you don't
have trouble today without having tuned the system carefully to avoid
such trouble, you're not likely to have trouble with autovacuum either.

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



Re: Convert interval to hours

2018-09-14 Thread Steven Lembark
On Fri, 14 Sep 2018 11:55:18 -0400
Peter Kleiner  wrote:

> On Fri, Sep 14, 2018 at 11:51 AM David Gauthier
>  wrote:
> >
> > Hi:
> >
> > In perl/DBI, I have code that's getting me an "age" which returns
> > something like... "-17 days -08:29:35".  How can I convert that to
> > a number of hours (as a float I would presume) ?

Suggest using one of the date modules. One issue is that not all
days are 86400s long: "leap second" is used to keep atomic clocks
in sync with siderial time so that telescopes report consistent 
values over time. Catch is that simply dividing by 3600 doesn't 
always work if the times fall across the wrong days.

You would normally want an integer for these rather than float
as the result to avoid rounding issues on extract or with comparisions 
in or out of the database. You will normally not have more than one 
second precision on times (timestamps are a different matter).

Q: What database are you using?

Postgres makes it easy enough to cast the values or compute the 
difference is seconds. 




-- 
Steven Lembark 3920 10th Ave South
Workhorse Computing   Birmingham, AL 35222
lemb...@wrkhors.com+1 888 359 3508



Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:28 PM, Adrian Klaver 
wrote:

> On 9/14/18 7:19 AM, Dave Page wrote:
>
>>
>>
>>
>
>> No one is tracking anything as part of the CoC. That's nothing but a
>> straw man argument.
>>
>
> Not buying it or the below is null and void:
>
> "This Code is meant to cover all interaction between community members,
> whether or not it takes place within postgresql.org infrastructure, so
> long as there is not another Code of Conduct that takes precedence (such as
> a conference's Code of Conduct)."
>
> Not sure how the above can be enforced without someone reporting on what
> is said outside the 'postgresql.org infrastructure'?
>
> At any rate, whether I like it or not the CoC is here to stay. I just feel
> a dissenting opinion is important to the conversation.


I can report someone who steal my wallet to the police. That doesn't mean I
track pick-pockets activity.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Fwd: Code of Conduct plan

2018-09-14 Thread James Keener
I didn't realize they had replied personally to me.

-- Forwarded message --
From: James Keener 
Date: Fri, Sep 14, 2018 at 10:43 AM
Subject: Re: Code of Conduct plan
To: Dave Page 


If that business is publicly bringing the project into disrepute, or
> harassing other community members and they approach us about it, then it
> becomes our business.
>
> If it's unrelated to PostgreSQL, then it's your personal business and not
> something the project would get involved in.
>
>
And yet, none of that is made clear or establish or even hinted at in the
current CoC. Also, may I refer you to https://github.com/opal/opal/
issues/941 as a scenario in which an outside conversation can leak in and
become the business of the group?

Jim


Re: C++ classes as result of selection in postgresql database

2018-09-14 Thread Dmitry Igrishin
пт, 14 сент. 2018 г. в 17:23, Yuriy Rusinov :
>
> Dear colleagues !
>
> I have to calculate road graph from coordinates and save it to postgresql 
> database. Is it possible to construct my classes using libpqxx API and return 
> it to client or I need to develop these API on another layer after data 
> selection ?
With the Pgfe C++ API (https://github.com/dmitigr/pgfe) it's possible
to define any class and specialize the structure template Conversions
to convert the data nicely from the database to this class and back.



Convert interval to hours

2018-09-14 Thread David Gauthier
Hi:

In perl/DBI, I have code that's getting me an "age" which returns something
like... "-17 days -08:29:35".  How can I convert that to a number of hours
(as a float I would presume) ?

Thanks


Re: Code of Conduct plan

2018-09-14 Thread James Keener
> Community is people who joined it

We're not a "community." We're people using email to get help with or
discuss technical aspects of PostgreSQL. The types of discussions that
would normally be held within a "community" would be entirely off-topic
here.  We should be professional to each other here; we don't need to be
buddies. There is a clear difference between "professionalism" and
"community". A document governing interactions on this list is within the
right of the moderation, but leaking into the "real world" is an
abomination and perversion of what this group is.

My church group is 100% within their right to kick me out of teaching
Sunday School if I were to have an affair. Teaching Sunday School is an act
taking place as part of a community of people with a shared belief and
culture. My job would 100% not be within their right to fire me for having
an affair, as it's not a community, but a professional environment and my
personal life is just that: personal. (Baring an ethics clauses signed when
joining, I guess?)

Jim


On Fri, Sep 14, 2018 at 10:31 AM, Ilya Kosmodemiansky 
wrote:

>
>
> On 14. Sep 2018, at 16:17, Dave Page  wrote:
>
>
> The lists are just one of many different ways people in this community
> interact.
>
>
> I could only heavily +1 this. I can get from where comes the idea that
> community is only what happens just on postgresql.org or just on some
> other channel community uses. Community is people who joined it and CoC
> supposed to apply even if people use analogue telephones. This is about
> communication, not about communication channels.
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>


Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:43 PM, Joshua D. Drake 
wrote:

> On 09/14/2018 07:36 AM, Dave Page wrote:
>
>
>
> On Fri, Sep 14, 2018 at 3:21 PM, James Keener  wrote:
>
>>
>> Now, you may say that (2) would be rejected by the committee, but I would
 counter that it's still a stain on me and something that will forever
 appear
 along side my name in search results and that the amount of time and
 stress it'd take me to defend myself would make my voluntarily leaving
 the community, which would be seen as an admission of guilt, my only
 option.

>>>
>>> If you had read the policy, you would know that wouldn't happen as
>>> reports and details of reports are to be kept confidential.
>>>
>>
>> That doesn't mean I won't be strung along and it doesn't mean that the
>> attacker can't release those details. Remember, I'm worried
>> about politically motivated attacks, and attacks meant to silence
>> opposing viewpoints, not legitimate instances of harassment.
>>
>
> Sure, but an attacker can do that now. Having the CoC doesn't change
> anything there, though it does give us a framework to deal with it.
>
>
>>
>>
>>>
>>>

 People are shitheads. People are assholes. We're not agreeing to join
 some organization and sign an ethics clause when signing up for the
 mailing
 list.  The current moderators can already remove bad actors from the
 list.
 How they act outside of the list is non of this list's concern.

>>>
>>> The lists are just one of many different ways people in this community
>>> interact.
>>>
>>
>> So? We interact with people outside of specific groups all the time.
>> Baring specific
>> agreements to the contrary, why should any one group claim responsibility
>> of my
>> personal business?
>>
>
> If that business is publicly bringing the project into disrepute, or
> harassing other community members and they approach us about it, then it
> becomes our business.
>
> If it's unrelated to PostgreSQL, then it's your personal business and not
> something the project would get involved in.
>
>
> O.k. so this isn't clear (at least to me) within the CoC. I want to make
> sure I understand. You are saying that if a community member posts on
> Twitter that they believe gays are going to hell, reporting that to the CoC
> committee would result in a non-violation UNLESS they referenced postgresql
> within the post?
>

Yes, I believe so. Isn't that what "To that end, we have established this Code
of Conduct for community interaction and participation in the project’s
work and the community at large." basically says?

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread David G. Johnston
On Fri, Sep 14, 2018 at 7:16 AM, Tom Lane  wrote:

> [ Let's try to trim this discussion to just -general, please ]
>
> Robert Eckhardt  writes:
> > On Fri, Sep 14, 2018 at 9:41 AM, Adrian Klaver
> >  wrote:
> >> On 9/14/18 1:31 AM, Chris Travers wrote:
> >>> I really have to object to this addition:
>  "This Code is meant to cover all interaction between community
> members,
>  whether or not it takes place within postgresql.org <
> http://postgresql.org>
>  infrastructure, so long as there is not another Code of Conduct that
> takes
>  precedence (such as a conference's Code of Conduct)."
>
> >> I second that objection. It is not in PGDG's remit to cure the world,
> for
> >> whatever form of cure you ascribe to. This is especially true as
> 'community
> >> member' has no strict definition.
>
> > I understand the concern, however, if you look at how attacks happen
> > it is frequently through other sites. Specifically under/poorly
> > moderated sites. For specific examples, people who have issues with
> > people on Quora will frequently go after them on Facebook and Twitter.
>
> Actually, that addition was in response to concerns that the previous
> version didn't delimit the intended scope of the document *at all*.
> So I would say it's more restricted now than the previous version.
>
> I feel that most of the concerns being raised today are straw men.
> If the PG lists were a place for political discussion, there'd be
> valid points to worry about as to whether a CoC might be used to
> stifle free speech.  But every example that's been given has been
> not merely off-topic but wildly so, so I don't find the discussion
> to be very realistic.
>

Are people who simply post on -general the occasional help going to be held
to the same standard (as impractical as that probably would be) as those
who are members of the committee or core?

Particularly for the those who are the "face" of the organization (and that
doesn't just mean core members or committers) the policy should not limit
itself to "interaction[s] between community members" and the sentence
should be, IMO, adjusted to loosen the "where" while tightening the "who".

Beyond that I don't object to writing out explicitly the option to consider
"external" activity - I doubt it will matter in practice and if the
situation is severe enough that it does then core could do what they want
anyway and deal with the fallout whether a CoC exists or whatever its
contents.  I do not believe that, for the typical community member with a
low profile, this will ever come into play.

David J.


Re: Code of Conduct plan

2018-09-14 Thread James Keener
> > I fail to see how that makes everyone here part of a community anymore
> than
> > I'm part of the "community" of regulars at a bar I walk into for the
> first
> > time.
>
> Does the bartender get to kick you out if you get into a fight?  Or if
> you're rude or inappropriate towards the waitress?  Yup, doesn't matter
> if it's the first time you were in the bar or not.
>
>
You're perverting and twisting my argument. Don't do that.

My comment was that I'm not part of the "community" of the bar by simply
walking into the bar; not that the bar has to serve me.

Please try to argue only what's being argued and not what you think you're
reading into my comments.

Jim


Re: Code of Conduct plan

2018-09-14 Thread Joshua D. Drake

On 09/14/2018 01:31 AM, Chris Travers wrote:


I apologize for the glacial slowness with which this has all been
moving.
The core team has now agreed to some revisions to the draft CoC
based on
the comments in this thread; see

https://wiki.postgresql.org/wiki/Code_of_Conduct

(That's the updated text, but you can use the diff tool on the page
history tab to see the changes from the previous draft.)


I really have to object to this addition:
"This Code is meant to cover all interaction between community 
members, whether or not it takes place within postgresql.org 
 infrastructure, so long as there is not 
another Code of Conduct that takes precedence (such as a conference's 
Code of Conduct)."


That covers things like public twitter messages over live political 
controversies which might not be personally directed.   At least if 
one is going to go that route, one ought to *also* include a safe 
harbor for non-personally-directed discussions of philosophy, social 
issues, and politics.  Otherwise, I think this is asking for trouble.  
See, for example, what happened with Opalgate and how this could be 
seen to encourage use of this to silence political controversies 
unrelated to PostgreSQL.


I think this is a complicated issue. On the one hand, postgresql.org has 
no business telling people how to act outside of postgresql.org. Full stop.


On the other hand if you are (note: contributor, not community member 
which is different) contributor to PostgreSQL, your actions speak about 
PostgreSQL. So I am not sure what a good plan of action here would be.


One area where this is going to cause a lot of issues is within the 
social constructs of the micro-communities. Are we going to ban Chinese 
members because their government is anti Christian and anti Muslim? Are 
we going to ban members of countries that are not as progressive 
thinking about LGBT rights? Are we going to tell evangelical Christians 
or devout Muslims that they are unwelcome because they are against Gay 
marriage? Are we going to ban Atheists because they think Christians are 
fools?


I think the answer would be, "no" unless they post an opinion... Is that 
really what our community is becoming, thought police?


There was a time when Open Source was about code and community. It is 
clear that it is becoming about authority and politics.


I am the individual that initiated this whole process many moons ago 
with the intent that we have a simple, "be excellent to each other" code 
of conduct. What we have now (although much better than previous drafts) 
is still an over reach.


tl;dr; The willingness of people to think they are right is only 
exceeded by their willingness to oppress those they don't agree with.



JD
--

Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
* Unless otherwise stated, opinions are my own.   *



C++ classes as result of selection in postgresql database

2018-09-14 Thread Yuriy Rusinov
Dear colleagues !

I have to calculate road graph from coordinates and save it to postgresql
database. Is it possible to construct my classes using libpqxx API and
return it to client or I need to develop these API on another layer after
data selection ?

-- 
Best regards,
Sincerely yours,
Yuriy Rusinov.


Re: Code of Conduct plan

2018-09-14 Thread Joshua D. Drake

On 09/14/2018 07:36 AM, Dave Page wrote:



On Fri, Sep 14, 2018 at 3:21 PM, James Keener > wrote:



Now, you may say that (2) would be rejected by the
committee, but I would
counter that it's still a stain on me and something that
will forever appear
along side my name in search results and that the amount
of time and
stress it'd take me to defend myself would make my
voluntarily leaving
the community, which would be seen as an admission of
guilt, my only
option.


If you had read the policy, you would know that wouldn't
happen as reports and details of reports are to be kept
confidential.


That doesn't mean I won't be strung along and it doesn't mean that
the attacker can't release those details. Remember, I'm worried
about politically motivated attacks, and attacks meant to silence
opposing viewpoints, not legitimate instances of harassment.


Sure, but an attacker can do that now. Having the CoC doesn't change 
anything there, though it does give us a framework to deal with it.



People are shitheads. People are assholes. We're not
agreeing to join
some organization and sign an ethics clause when signing
up for the mailing
list.  The current moderators can already remove bad
actors from the list.
How they act outside of the list is non of this list's
concern.


The lists are just one of many different ways people in this
community interact.


So? We interact with people outside of specific groups all the
time. Baring specific
agreements to the contrary, why should any one group claim
responsibility of my
personal business?


If that business is publicly bringing the project into disrepute, or 
harassing other community members and they approach us about it, then 
it becomes our business.


If it's unrelated to PostgreSQL, then it's your personal business and 
not something the project would get involved in.


O.k. so this isn't clear (at least to me) within the CoC. I want to make 
sure I understand. You are saying that if a community member posts on 
Twitter that they believe gays are going to hell, reporting that to the 
CoC committee would result in a non-violation UNLESS they referenced 
postgresql within the post?


JD


--
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
* Unless otherwise stated, opinions are my own.   *



Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:41 PM, James Keener  wrote:

> > Community is people who joined it
>
> We're not a "community." We're people using email to get help with or
> discuss technical aspects of PostgreSQL. The types of discussions that
> would normally be held within a "community" would be entirely off-topic
> here.  We should be professional to each other here; we don't need to be
> buddies. There is a clear difference between "professionalism" and
> "community". A document governing interactions on this list is within the
> right of the moderation, but leaking into the "real world" is an
> abomination and perversion of what this group is.
>

To many of us, we absolutely are a community. Remember, there are people
here who have been around for 20+ years, of which many have become close
friends, having started working on PostgreSQL as a hobby. We have always
seen the project as a community of like-minded technologists, and welcome
others that wish to join, whether just to ask a single question or to hang
around for the next 20 years. I do see your viewpoint, but I would counter
that coming here for help (for example) is quite different from calling
tech support at a vendor.


>
> My church group is 100% within their right to kick me out of teaching
> Sunday School if I were to have an affair. Teaching Sunday School is an act
> taking place as part of a community of people with a shared belief and
> culture. My job would 100% not be within their right to fire me for having
> an affair, as it's not a community, but a professional environment and my
> personal life is just that: personal. (Baring an ethics clauses signed when
> joining, I guess?)
>

> Jim
>
>
> On Fri, Sep 14, 2018 at 10:31 AM, Ilya Kosmodemiansky 
> wrote:
>
>>
>>
>> On 14. Sep 2018, at 16:17, Dave Page  wrote:
>>
>>
>> The lists are just one of many different ways people in this community
>> interact.
>>
>>
>> I could only heavily +1 this. I can get from where comes the idea that
>> community is only what happens just on postgresql.org or just on some
>> other channel community uses. Community is people who joined it and CoC
>> supposed to apply even if people use analogue telephones. This is about
>> communication, not about communication channels.
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread James Keener
Yes. They can. The people who make the majority of the contributions to the
> software can decide what happens, because without them there is no
> software. If you want to spend 20 years of your life
>

So everyone who moderates this group and that will be part of the CoC
committee will have had to have dedicated their life of pg?

Sure, they own the servers, they make the rules. I get it. I'm not entirely
opposed to it, even if I think it's silly to ram something down the rest of
the groups throats.

Jim

PS: Also, what's with the personal replies? If you don't want to say what
you want to the whole group, I don't really have an interest in talking to
you personally.


Re: Code of Conduct plan

2018-09-14 Thread David Wall

On 9/14/18 7:52 AM, James Keener wrote:


I fail to see how that makes everyone here part of a community anymore 
than I'm part of the "community" of regulars at a bar I walk into for 
the first time.


As I said, the rules can and should apply within the list, but 
applying them outside the list is odd and wreaks of authoritarianism.


Jim
In the 20 years I've been using PG, I've not noted any bizarre "list 
speech" except this discussion that suggests others should monitor 
people's behavior wherever they are, and report any "infraction" to PG, 
so PG can boot them.  I'm with those who think that idea is 
diametrically opposed to open source's freedom.  What next, monitor what 
apps people are using their DB for and decide if the "community" 
approves of its character or not?


David



Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:57 PM, James Keener  wrote:

>
>
>> Yes, I believe so. Isn't that what "To that end, we have established
>> this Code of Conduct for community interaction and participation in the
>> project’s work and the community at large." basically says?
>>
>
> No? What's the "community at large"? To me that sounds like "all
> interactions" whether or not they're about postgres.
>

That wording has been in the published draft for 18 months, and noone
objected to it that I'm aware of. There will always be people who don't
like some of the wording, much as there are often people who disagree with
the way a patch to the code is written. Sooner or later though, the general
consensus prevails and we have to move on, otherwise nothing will ever get
completed.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread Chris Travers
On Fri, Sep 14, 2018 at 4:51 PM Dave Page  wrote:

>
>
> On Fri, Sep 14, 2018 at 3:43 PM, Joshua D. Drake 
> wrote:
>
>> On 09/14/2018 07:36 AM, Dave Page wrote:
>>
>>
>>
>> On Fri, Sep 14, 2018 at 3:21 PM, James Keener  wrote:
>>
>>>
>>> Now, you may say that (2) would be rejected by the committee, but I would
> counter that it's still a stain on me and something that will forever
> appear
> along side my name in search results and that the amount of time and
> stress it'd take me to defend myself would make my voluntarily leaving
> the community, which would be seen as an admission of guilt, my only
> option.
>

 If you had read the policy, you would know that wouldn't happen as
 reports and details of reports are to be kept confidential.

>>>
>>> That doesn't mean I won't be strung along and it doesn't mean that the
>>> attacker can't release those details. Remember, I'm worried
>>> about politically motivated attacks, and attacks meant to silence
>>> opposing viewpoints, not legitimate instances of harassment.
>>>
>>
>> Sure, but an attacker can do that now. Having the CoC doesn't change
>> anything there, though it does give us a framework to deal with it.
>>
>>
>>>
>>>


>
> People are shitheads. People are assholes. We're not agreeing to join
> some organization and sign an ethics clause when signing up for the
> mailing
> list.  The current moderators can already remove bad actors from the
> list.
> How they act outside of the list is non of this list's concern.
>

 The lists are just one of many different ways people in this community
 interact.

>>>
>>> So? We interact with people outside of specific groups all the time.
>>> Baring specific
>>> agreements to the contrary, why should any one group claim
>>> responsibility of my
>>> personal business?
>>>
>>
>> If that business is publicly bringing the project into disrepute, or
>> harassing other community members and they approach us about it, then it
>> becomes our business.
>>
>> If it's unrelated to PostgreSQL, then it's your personal business and not
>> something the project would get involved in.
>>
>>
>> O.k. so this isn't clear (at least to me) within the CoC. I want to make
>> sure I understand. You are saying that if a community member posts on
>> Twitter that they believe gays are going to hell, reporting that to the CoC
>> committee would result in a non-violation UNLESS they referenced postgresql
>> within the post?
>>
>
> Yes, I believe so. Isn't that what "To that end, we have established this Code
> of Conduct for community interaction and participation in the project’s
> work and the community at large." basically says?
>
> And in the end, a broad scope is required to some extent.

I want to be clear about where my concern and objection is:

1.  I think PostgreSQL, as an international project with people from many
different walks of life and different cultures needs to stay out of culture
war topics or assigning truth values to political viewpoints to the extent
absolutely possible.  We do this today and we must continue to do this.
2.  Compared to the rest of the world, people from my culture (the US) have
a tendency to take disagreements regarding political policies, social
theories, etc. personally and see abuse/attack where mere disagreement was
present.  People making complaints aren't necessarily acting in bad faith.
3.  If we don't set the expectation ahead of time that we remain
pluralistic in terms of political philosophy, culture, then it is way too
easy to end up in a situation where people are bringing up bad press for
failing to kick out people who disagree with them.

Like it or not there are precedents for this in the open source community,
such as the dismissal of Brendan Eich, and in an international project with
developers from all kinds of cultures with different views on deeply
divisive issues, such conflicts could hurt our community.

-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:37 PM, Joshua D. Drake 
wrote:

> On 09/14/2018 07:14 AM, Dave Page wrote:
>
>
>
> On Fri, Sep 14, 2018 at 3:08 PM, Joshua D. Drake 
> wrote:
>
>> On 09/14/2018 01:31 AM, Chris Travers wrote:
>>
>>
>> I apologize for the glacial slowness with which this has all been moving.
>>> The core team has now agreed to some revisions to the draft CoC based on
>>> the comments in this thread; see
>>>
>>> https://wiki.postgresql.org/wiki/Code_of_Conduct
>>>
>>> (That's the updated text, but you can use the diff tool on the page
>>> history tab to see the changes from the previous draft.)
>>>
>>
>> I really have to object to this addition:
>> "This Code is meant to cover all interaction between community members,
>> whether or not it takes place within postgresql.org infrastructure, so
>> long as there is not another Code of Conduct that takes precedence (such as
>> a conference's Code of Conduct)."
>>
>> That covers things like public twitter messages over live political
>> controversies which might not be personally directed.   At least if one is
>> going to go that route, one ought to *also* include a safe harbor for
>> non-personally-directed discussions of philosophy, social issues, and
>> politics.  Otherwise, I think this is asking for trouble.  See, for
>> example, what happened with Opalgate and how this could be seen to
>> encourage use of this to silence political controversies unrelated to
>> PostgreSQL.
>>
>>
>> I think this is a complicated issue. On the one hand, postgresql.org has
>> no business telling people how to act outside of postgresql.org. Full
>> stop.
>>
>
> I'm going to regret jumping in here, but...
>
> I disagree. If a community member decides to join forums for other
> software and then strongly promotes PostgreSQL to the point that they
> become abusive or offensive to people making other software choices, then
> they are clearly bringing the project into disrepute and we should have
> every right to sanction them by preventing them participating in our
> project in whatever ways are deemed appropriate.
>
>
> We all know that PostgreSQL is the only database we should use and anybody
> using a different one just hasn't been enlightened yet. :P
>
> I think we need to define community member. I absolutely see your point of
> the individual is a contributor but community member is rather ethereal in
> this context don't you think?
>

There are some fuzzy edges I guess (e.g. Slack), but in my mind it's always
been anyone who participates in any of the projects communications channels.


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: C++ classes as result of selection in postgresql database

2018-09-14 Thread Yuriy Rusinov
Thanks a lot.

On Fri, Sep 14, 2018 at 6:41 PM Dmitry Igrishin  wrote:

> пт, 14 сент. 2018 г. в 17:23, Yuriy Rusinov :
> >
> > Dear colleagues !
> >
> > I have to calculate road graph from coordinates and save it to
> postgresql database. Is it possible to construct my classes using libpqxx
> API and return it to client or I need to develop these API on another layer
> after data selection ?
> With the Pgfe C++ API (https://github.com/dmitigr/pgfe) it's possible
> to define any class and specialize the structure template Conversions
> to convert the data nicely from the database to this class and back.
>


-- 
Best regards,
Sincerely yours,
Yuriy Rusinov.


Re: Code of Conduct plan

2018-09-14 Thread James Keener
I understand the concern, however, if you look at how attacks happen

> it is frequently through other sites. Specifically under/poorly
> moderated sites. For specific examples, people who have issues with
> people on Quora will frequently go after them on Facebook and Twitter.
>
> these aren't a solution looking for a problem. If we just want to look
> at the clusterfuck that is happening in the reddis community right now
> we can see conversations spilling onto twitter and into ad hominem
> vitriol.
>

You haven't established that this is both 1) the PG mailing list's problem
and that 2) this can't and won't be used to retaliate against those holding
unpopular viewpoints but aren't specifically harassing anyone.

Now, you may say that (2) would be rejected by the committee, but I would
counter that it's still a stain on me and something that will forever appear
along side my name in search results and that the amount of time and
stress it'd take me to defend myself would make my voluntarily leaving
the community, which would be seen as an admission of guilt, my only
option.

People are shitheads. People are assholes. We're not agreeing to join
some organization and sign an ethics clause when signing up for the mailing
list.  The current moderators can already remove bad actors from the list.
How they act outside of the list is non of this list's concern.

Conferences are free to hold their own CoC because you explicitly agree to
it when you purchase a ticket, and it's governing interactions at the
conference
(or should only be governing actions at the conference.)

Jim


Re: Code of Conduct plan

2018-09-14 Thread Adrian Klaver

On 9/14/18 7:19 AM, Dave Page wrote:







No one is tracking anything as part of the CoC. That's nothing but a 
straw man argument.


Not buying it or the below is null and void:

"This Code is meant to cover all interaction between community members, 
whether or not it takes place within postgresql.org infrastructure, so 
long as there is not another Code of Conduct that takes precedence (such 
as a conference's Code of Conduct)."


Not sure how the above can be enforced without someone reporting on what 
is said outside the 'postgresql.org infrastructure'?


At any rate, whether I like it or not the CoC is here to stay. I just 
feel a dissenting opinion is important to the conversation.




--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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



Re: Code of Conduct plan

2018-09-14 Thread Ilya Kosmodemiansky


> On 14. Sep 2018, at 16:17, Dave Page  wrote:
> 
> 
> The lists are just one of many different ways people in this community 
> interact.

I could only heavily +1 this. I can get from where comes the idea that 
community is only what happens just on postgresql.org or just on some other 
channel community uses. Community is people who joined it and CoC supposed to 
apply even if people use analogue telephones. This is about communication, not 
about communication channels. 


> 
> -- 
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
> 
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread Adrian Klaver

On 9/14/18 6:59 AM, Robert Eckhardt wrote:

On Fri, Sep 14, 2018 at 9:41 AM, Adrian Klaver
 wrote:

On 9/14/18 1:31 AM, Chris Travers wrote:




I really have to object to this addition:
"This Code is meant to cover all interaction between community members,
whether or not it takes place within postgresql.org 
infrastructure, so long as there is not another Code of Conduct that takes
precedence (such as a conference's Code of Conduct)."



I second that objection. It is not in PGDG's remit to cure the world, for
whatever form of cure you ascribe to. This is especially true as 'community
member' has no strict definition.


I understand the concern, however, if you look at how attacks happen
it is frequently through other sites. Specifically under/poorly
moderated sites. For specific examples, people who have issues with
people on Quora will frequently go after them on Facebook and Twitter.

these aren't a solution looking for a problem. If we just want to look
at the clusterfuck that is happening in the reddis community right now
we can see conversations spilling onto twitter and into ad hominem
vitriol.


Ask yourself, if this was a government agency tracking your speech 
across platforms would you be as approving? Personally I find the whole 
thing creepy.




My $0.02
-- Rob Eckhardt




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






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



Re: Code of Conduct plan

2018-09-14 Thread James Keener
> Now, you may say that (2) would be rejected by the committee, but I would
>> counter that it's still a stain on me and something that will forever
>> appear
>> along side my name in search results and that the amount of time and
>> stress it'd take me to defend myself would make my voluntarily leaving
>> the community, which would be seen as an admission of guilt, my only
>> option.
>>
>
> If you had read the policy, you would know that wouldn't happen as reports
> and details of reports are to be kept confidential.
>

That doesn't mean I won't be strung along and it doesn't mean that the
attacker can't release those details. Remember, I'm worried
about politically motivated attacks, and attacks meant to silence opposing
viewpoints, not legitimate instances of harassment.


>
>
>>
>> People are shitheads. People are assholes. We're not agreeing to join
>> some organization and sign an ethics clause when signing up for the
>> mailing
>> list.  The current moderators can already remove bad actors from the list.
>> How they act outside of the list is non of this list's concern.
>>
>
> The lists are just one of many different ways people in this community
> interact.
>

So? We interact with people outside of specific groups all the time. Baring
specific
agreements to the contrary, why should any one group claim responsibility
of my
personal business?

Jim


Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:21 PM, James Keener  wrote:

>
> Now, you may say that (2) would be rejected by the committee, but I would
>>> counter that it's still a stain on me and something that will forever
>>> appear
>>> along side my name in search results and that the amount of time and
>>> stress it'd take me to defend myself would make my voluntarily leaving
>>> the community, which would be seen as an admission of guilt, my only
>>> option.
>>>
>>
>> If you had read the policy, you would know that wouldn't happen as
>> reports and details of reports are to be kept confidential.
>>
>
> That doesn't mean I won't be strung along and it doesn't mean that the
> attacker can't release those details. Remember, I'm worried
> about politically motivated attacks, and attacks meant to silence opposing
> viewpoints, not legitimate instances of harassment.
>

Sure, but an attacker can do that now. Having the CoC doesn't change
anything there, though it does give us a framework to deal with it.


>
>
>>
>>
>>>
>>> People are shitheads. People are assholes. We're not agreeing to join
>>> some organization and sign an ethics clause when signing up for the
>>> mailing
>>> list.  The current moderators can already remove bad actors from the
>>> list.
>>> How they act outside of the list is non of this list's concern.
>>>
>>
>> The lists are just one of many different ways people in this community
>> interact.
>>
>
> So? We interact with people outside of specific groups all the time.
> Baring specific
> agreements to the contrary, why should any one group claim responsibility
> of my
> personal business?
>

If that business is publicly bringing the project into disrepute, or
harassing other community members and they approach us about it, then it
becomes our business.

If it's unrelated to PostgreSQL, then it's your personal business and not
something the project would get involved in.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread Chris Travers
On Fri, Sep 14, 2018 at 4:16 PM Tom Lane  wrote:

> [ Let's try to trim this discussion to just -general, please ]
>
> Robert Eckhardt  writes:
> > On Fri, Sep 14, 2018 at 9:41 AM, Adrian Klaver
> >  wrote:
> >> On 9/14/18 1:31 AM, Chris Travers wrote:
> >>> I really have to object to this addition:
>  "This Code is meant to cover all interaction between community
> members,
>  whether or not it takes place within postgresql.org <
> http://postgresql.org>
>  infrastructure, so long as there is not another Code of Conduct that
> takes
>  precedence (such as a conference's Code of Conduct)."
>
> >> I second that objection. It is not in PGDG's remit to cure the world,
> for
> >> whatever form of cure you ascribe to. This is especially true as
> 'community
> >> member' has no strict definition.
>
> > I understand the concern, however, if you look at how attacks happen
> > it is frequently through other sites. Specifically under/poorly
> > moderated sites. For specific examples, people who have issues with
> > people on Quora will frequently go after them on Facebook and Twitter.
>
> Actually, that addition was in response to concerns that the previous
> version didn't delimit the intended scope of the document *at all*.
> So I would say it's more restricted now than the previous version.
>
> I feel that most of the concerns being raised today are straw men.
> If the PG lists were a place for political discussion, there'd be
> valid points to worry about as to whether a CoC might be used to
> stifle free speech.  But every example that's been given has been
> not merely off-topic but wildly so, so I don't find the discussion
> to be very realistic.
>

If the code of conduct limited conduct that related to postgresql.org
infrastructure, I would agree.  This one explicitly includes all kinds of
interactions which are beyond that.

I assume "all interaction between members" could include having a few beers
at a pub, or being in an argument over the scope of human rights on
facebook, and I think there are people who will read it that way.

-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: Code of Conduct plan

2018-09-14 Thread James Keener
> To many of us, we absolutely are a community. Remember, there are people
> here who have been around for 20+ years, of which many have become close
> friends, having started working on PostgreSQL as a hobby. We have always
> seen the project as a community of like-minded technologists, and welcome
> others that wish to join, whether just to ask a single question or to hang
> around for the next 20 years. I do see your viewpoint, but I would counter
> that coming here for help (for example) is quite different from calling
> tech support at a vendor.
>

I fail to see how that makes everyone here part of a community anymore than
I'm part of the "community" of regulars at a bar I walk into for the first
time.

As I said, the rules can and should apply within the list, but applying
them outside the list is odd and wreaks of authoritarianism.

Jim


Re: Code of Conduct plan

2018-09-14 Thread Tom Lane
[ Let's try to trim this discussion to just -general, please ]

Robert Eckhardt  writes:
> On Fri, Sep 14, 2018 at 9:41 AM, Adrian Klaver
>  wrote:
>> On 9/14/18 1:31 AM, Chris Travers wrote:
>>> I really have to object to this addition:
 "This Code is meant to cover all interaction between community members,
 whether or not it takes place within postgresql.org 
 infrastructure, so long as there is not another Code of Conduct that takes
 precedence (such as a conference's Code of Conduct)."

>> I second that objection. It is not in PGDG's remit to cure the world, for
>> whatever form of cure you ascribe to. This is especially true as 'community
>> member' has no strict definition.

> I understand the concern, however, if you look at how attacks happen
> it is frequently through other sites. Specifically under/poorly
> moderated sites. For specific examples, people who have issues with
> people on Quora will frequently go after them on Facebook and Twitter.

Actually, that addition was in response to concerns that the previous
version didn't delimit the intended scope of the document *at all*.
So I would say it's more restricted now than the previous version.

I feel that most of the concerns being raised today are straw men.
If the PG lists were a place for political discussion, there'd be
valid points to worry about as to whether a CoC might be used to
stifle free speech.  But every example that's been given has been
not merely off-topic but wildly so, so I don't find the discussion
to be very realistic.

regards, tom lane



Re: Convert interval to hours

2018-09-14 Thread Peter Kleiner
On Fri, Sep 14, 2018 at 11:51 AM David Gauthier
 wrote:
>
> Hi:
>
> In perl/DBI, I have code that's getting me an "age" which returns something 
> like... "-17 days -08:29:35".  How can I convert that to a number of hours 
> (as a float I would presume) ?
>
> Thanks
>
>
>
>

I've done this as
select extract(epoch from '-17 days -08:29:35'::interval)/3600 as hours;

hours
---
 -416.49305556
(1 row)

Others might have a better way, though.

Pete



Re: Code of Conduct plan

2018-09-14 Thread Ilya Kosmodemiansky


> On 14. Sep 2018, at 16:31, Ilya Kosmodemiansky  wrote:
> 
> 
> 
> 
> I could only heavily +1 this. I can get

I can’t get of course, sorry for typo


> from where comes the idea that community is only what happens just on 
> postgresql.org or just on some other channel community uses.



> . 
> 
> 
>> 
>> -- 
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>> 
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread Dave Page
On Fri, Sep 14, 2018 at 3:10 PM, James Keener  wrote:

> I understand the concern, however, if you look at how attacks happen
>
>> it is frequently through other sites. Specifically under/poorly
>> moderated sites. For specific examples, people who have issues with
>> people on Quora will frequently go after them on Facebook and Twitter.
>>
>> these aren't a solution looking for a problem. If we just want to look
>> at the clusterfuck that is happening in the reddis community right now
>> we can see conversations spilling onto twitter and into ad hominem
>> vitriol.
>>
>
> You haven't established that this is both 1) the PG mailing list's problem
> and that 2) this can't and won't be used to retaliate against those holding
> unpopular viewpoints but aren't specifically harassing anyone.
>
> Now, you may say that (2) would be rejected by the committee, but I would
> counter that it's still a stain on me and something that will forever
> appear
> along side my name in search results and that the amount of time and
> stress it'd take me to defend myself would make my voluntarily leaving
> the community, which would be seen as an admission of guilt, my only
> option.
>

If you had read the policy, you would know that wouldn't happen as reports
and details of reports are to be kept confidential.


>
> People are shitheads. People are assholes. We're not agreeing to join
> some organization and sign an ethics clause when signing up for the mailing
> list.  The current moderators can already remove bad actors from the list.
> How they act outside of the list is non of this list's concern.
>

The lists are just one of many different ways people in this community
interact.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Code of Conduct plan

2018-09-14 Thread Dimitri Maziuk
On 09/14/2018 09:42 AM, Dave Page wrote:

> There are some fuzzy edges I guess (e.g. Slack), but in my mind it's always
> been anyone who participates in any of the projects communications channels.

Then you Sir are an evil ter'rist member of isis because your spoken
words are carried by the same air in the same atmosphere as theirs.
Please stand by while the black helicopters are being dispatched to your
current location, you will be shot in the face and dropped in the ocean
shortly.

Have a nice day
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature


Re: Code of Conduct plan

2018-09-14 Thread Evan Macbeth
I hesitate to exacerbate what is a society-wide debate that is being worked
out across organizations across the spectrum, but if I may provide a
thought for consideration.

The framing and language of the Code of Conduct, as written and proposed,
includes a large number of checkpoints to protect those accused of
violations of the code of conduct: Confidentiality, the Good Faith clause
that actually puts risk on those who report behavior under the code, a
scaling of consequences that is weighted *heavily* towards providing second
and third chances to those who may be accused of violating the code.

In the examples that have been raised in this discussion, it would seem to
me to be unreasonable for an investigation to result in a finding that the
code had been violated to the extent that any kind of public consequence
would be warranted. Indeed, were the examples cited to be adjudicated under
this code, I am confident we as a community would discover the code to be
working as designed, rather than the opposite.

If the objection is to the possibility of being reported at all for your
own behavior that you believe is not in violation, that's a different
matter. But if that is the concern, than the objection is not to *this*
code of conduct but to ANY code of conduct, because any code of conduct is
inherently going to introduce risk of being reported for everyone. And if
you believe strongly that a given statement you may have made is not
objectionable...you should be willing to defend it in an adjudication
investigation. If you are not willing to defend it in an adjudication
investigation, then you are tacitly (at least) acknowledging the statement
was not in keeping withe standards represented by the code.

This code of conduct as written, in my opinion, merely holds every member
of our community responsible for owning our words and behavior, and the
consequences thereof. I believe that we are adult enough to be willing to
take responsibility for ourselves.

Just my $0.02.

Evan Macbeth


On Fri, Sep 14, 2018 at 8:50 AM, James Keener  wrote:

> I find a lot of neo-con/trumpian political stances moronic, short-sighted,
> and anti-intellectual and therefore consider them offensive, an affront on
> my way of life, and a stain on my country.
>
> 1) Can I report anyone holding such views and discussing them on a 3rd
> party forum?
>
> 2) Could I be reported for saying the above on a 3rd party forum?
>
> Obviously the pg mailing list isn't a place for such discussion, but is
> being a member of this community a deal with the devil to give up my right
> to free speech elsewhere?
>
> Jim
>
>
> On September 14, 2018 6:10:47 AM EDT, Chris Travers <
> chris.trav...@gmail.com> wrote:
>>
>>
>>
>> On Fri, Sep 14, 2018 at 11:45 AM Ilya Kosmodemiansky 
>> wrote:
>>
>>> On Fri, Sep 14, 2018 at 10:31 AM, Chris Travers 
>>> wrote:
>>> > I really have to object to this addition:
>>> > "This Code is meant to cover all interaction between community members,
>>> > whether or not it takes place within postgresql.org infrastructure,
>>> so long
>>> > as there is not another Code of Conduct that takes precedence (such as
>>> a
>>> > conference's Code of Conduct)."
>>> >
>>> > That covers things like public twitter messages over live political
>>> > controversies which might not be personally directed.   At least if
>>> one is
>>> > going to go that route, one ought to *also* include a safe harbor for
>>> > non-personally-directed discussions of philosophy, social issues, and
>>> > politics.  Otherwise, I think this is asking for trouble.  See, for
>>> example,
>>> > what happened with Opalgate and how this could be seen to encourage
>>> use of
>>> > this to silence political controversies unrelated to PostgreSQL.
>>>
>>> I think, this point has nothing to do with _correct_ discussions or
>>> public tweets.
>>>
>>> If one community member tweets publicly and in a way which abuses
>>> other community members, it is obvious CoC violation. It is hard to
>>> imagine healthy community if someone interacts with others  correctly
>>> on the list or at a conference because the CoC stops him doing things
>>> which he will do on private capacity to the same people when CoC
>>> doesnt apply.
>>>
>>> If someone reports CoC violation just because other community member's
>>> _correct_ public tweet or whatsoever  expressed different
>>> political/philosophical/religious views, this is a quite different
>>> story. I suppose CoC committee and/or Core team in this case should
>>> explain the reporter the purpose of CoC rather than automatically
>>> enforce it.
>>>
>>
>> So first, I think what the clause is trying to do is address cases where
>> harassment targeting a particular community member takes place outside the
>> infrastructure and frankly ensuring that the code of conduct applies in
>> these cases is important and something I agree with.
>>
>> However, let's look at problem cases:
>>
>> "I am enough of a Marxist to see gender as a 

Re: Code of Conduct plan

2018-09-14 Thread Dimitri Maziuk
On 09/14/2018 12:14 PM, Peter Geoghegan wrote:

> No CoC can possibly provide for every conceivable situation. Somebody
> has to interpret the rules, and it has to be possible to impose
> sanctions when the CoC is violated -- otherwise, what's the point?
> There are several checks and balances in place, and I for one have
> confidence in the process as outlined. It's imperfect, but quite a lot
> better than either the status quo, or a platitude about inclusivity.

So let me get this straight: you want to have a "sanctioned" way to deny
people access to postgresql community support channel?  "Because
somebody who may or may not be the same person, allegedly said something
somewhere that some other tweet disagreed with on faceplant"?

Great plan if you do for-pay postgresql support for the living.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature


Re: Behaviour when autovacuum is canceled

2018-09-14 Thread Martín Fernández
Alvaro,

Thanks for the insight, was really helpful!

Best,

Martín

On Fri, Sep 14th, 2018 at 12:41 PM, Alvaro Herrera  
wrote:

> 
> 
> 
> On 2018-Sep-13, Martín Fernández wrote:
> 
> > By performing this changes we are going to start relying more heavily
> > on the autovacuum work and the concern of "lost work" caused by
> > autovacuum canceling itself when locking contention happen showed up.
> > I'm guessing that we might be over thinking this and the canceling is
> > not going to happen as frequently as we think it will.
> 
> Any DDL run on a table will cancel an autovacuum over that table (except
> for-wraparound autovacuums). If these are rare, you don't need to worry
> about that too much. If they are frequent enough that autovacuum will
> be cancelled regularly in one table, you'll be sad.
> 
> If you're running vacuum by hand, you'd probably see your DDL blocking
> behind VACUUM, which would be very noticeable. I think if you don't
> have trouble today without having tuned the system carefully to avoid
> such trouble, you're not likely to have trouble with autovacuum either.
> 
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
> 
> 
> 
>

Query act different when doing by hand and by using a driver in app

2018-09-14 Thread ik
Hello,

Not sure that this is the right mailing list, so sorry from advance.

I have a program that when it does a query I have one raw returns, but when
I execute the same query with the same conditions, I get the right number
of rows back.

I'm using gonlang and https://github.com/jackc/pgx .
The query inside is inside an already open cursor of another "select" query
that I iterate over.

Is there a way to debug just that inside pg-logs without having all
possible queries logged in?

Thank you
Ido


Re: Convert interval to hours

2018-09-14 Thread Steven Lembark
On Fri, 14 Sep 2018 12:21:14 -0400
David Gauthier  wrote:

> I'm using postgres v9.5.2 on RH6.

PG can convert the times for you.
For times (not timestamps) you are always better off dealing with
either time or integer seconds. There are a variety of issues with
rouding that affect repeatability and accuracy of results using 
floats or doubles. Given that 10 and three are both continuing 
fractions in binary (e.g., 1/10 binary is an infinite series) 
division by 3600 will only cause you annoyance at some point.

If you are subtracting times then you will (usually) end up with
an interval, which can be cast to seconds in the query and give
you precise, accurate, repeatable results every time.

e.g., 

select
extract
(
epoch from ( time1 - time2 )::interval 
)
as "seconds",
...

is one approach.

In nearly all cases you are better off selecting and converting
the time in SQL rather than converting the start and end times 
from numeric (time) to string (DBI) and then back from char *
to float/double or int/unsigned. The charaacter conversion is 
expensive and numeric -> string -> numeric leaes you open to all
sorts of rouding and conversion issues.

Frankly, if you have to run the query more than once I'd suggest
adding a view that does the select/convert for you (along with 
dealing with any NULL's that creep into things). PG makes it quite
easy to add the view and quite in-expensive to apply it.

-- 
Steven Lembark 3920 10th Ave South
Workhorse Computing   Birmingham, AL 35222
lemb...@wrkhors.com+1 888 359 3508

-- 
Steven Lembark 3920 10th Ave South
Workhorse Computing   Birmingham, AL 35222
lemb...@wrkhors.com+1 888 359 3508



Bitmap Heap Scan and Bitmap Index Scan

2018-09-14 Thread Arup Rakshit
Here is a explain plan of a very simple query:

aruprakshit=# explain analyze select first_name, last_name from users where 
lower(state) = 'colorado';
QUERY PLAN
--
 Bitmap Heap Scan on users  (cost=5.86..161.40 rows=203 width=13) (actual 
time=0.134..0.444 rows=203 loops=1)
   Recheck Cond: (lower((state)::text) = 'colorado'::text)
   Heap Blocks: exact=106
   ->  Bitmap Index Scan on lower_state_users_idx  (cost=0.00..5.81 rows=203 
width=0) (actual time=0.098..0.098 rows=203 loops=1)
 Index Cond: (lower((state)::text) = 'colorado'::text)
 Planning time: 0.263 ms
 Execution time: 0.517 ms
(7 rows)

I read this 
https://www.postgresql.org/message-id/12553.1135634231%40sss.pgh.pa.us 
 and 
https://www.postgresql.org/message-id/464F3C5D.2000700%40enterprisedb.com 
  to 
understand what this bitmap heap scan and index scan is. But there are some 
questions still in mind which I am not able to figure out yet.

Does bitmap index apply when normal index scan is costly?
Does bitmap index always store page number of matching tuples instead of just 
the tuples?
What is Heap Blocks: exact=106 ?
Why the cost is higher in Heap scan than index scan?



Thanks,

Arup Rakshit
a...@zeit.io





Re: Slow shutdowns sometimes on RDS Postgres

2018-09-14 Thread Christophe Pettus


> On Sep 14, 2018, at 08:43, Jeremy Schneider  wrote:
> So yeah, it's not common...

In our experience, it's actually quite common that an RDS shutdown (or even 
just applying parameter changes) can take a while.  What's particularly 
concerning is that it's not predictable, and that can make it hard to schedule 
and manage maintenance windows.  What we were told previously is that RDS 
queues the operations, and it can take a variable amount of time for the 
operation to be worked on from the queue.  Is that not the case?

--
-- Christophe Pettus
   x...@thebuild.com




Re: Code of Conduct plan

2018-09-14 Thread Stephen Frost
Greetings,

* James Keener (j...@jimkeener.com) wrote:
> > > I fail to see how that makes everyone here part of a community anymore
> > than
> > > I'm part of the "community" of regulars at a bar I walk into for the
> > first
> > > time.
> >
> > Does the bartender get to kick you out if you get into a fight?  Or if
> > you're rude or inappropriate towards the waitress?  Yup, doesn't matter
> > if it's the first time you were in the bar or not.
>
> You're perverting and twisting my argument. Don't do that.

I was trying to follow your analogy.  My apologies that it's not a great
one, I raised that same concern in the part of my email you omitted.

> My comment was that I'm not part of the "community" of the bar by simply
> walking into the bar; not that the bar has to serve me.
> 
> Please try to argue only what's being argued and not what you think you're
> reading into my comments.

The point I was making is that these lists are more like the bar and the
list manager like the bartender.  Yes, actions outside of the lists can
impact if someone's allowed to participate on these lists.  There's, of
course, a test of reasonableness and things like disagreements about
political views expressed outside of these lists aren't likely to make
the CoC feel that someone isn't appropriate for participation, even if a
complaint is made, but that doesn't mean that only actions on the list
are considered.

(note that I'm not part of the CoC, nor core, this is my expression of
how I feel things should be, as a member of this community)

Thanks!

Stephen


signature.asc
Description: PGP signature


Re: Convert interval to hours

2018-09-14 Thread Ron

On 09/14/2018 11:10 AM, Steven Lembark wrote:

On Fri, 14 Sep 2018 11:55:18 -0400
Peter Kleiner  wrote:

On Fri, Sep 14, 2018 at 11:51 AM David Gauthier
 wrote:

Hi:

In perl/DBI, I have code that's getting me an "age" which returns
something like... "-17 days -08:29:35".  How can I convert that to
a number of hours (as a float I would presume) ?

Suggest using one of the date modules. One issue is that not all
days are 86400s long: "leap second" is used to keep atomic clocks
in sync with siderial time so that telescopes report consistent
values over time. Catch is that simply dividing by 3600 doesn't
always work if the times fall across the wrong days.


Can you give us a hard example of when this won't work?

select extract(epoch from '-17 days -08:29:35'::interval)/3600 as hours;

hours
---
 -416.49305556
(1 row)


--
Angular momentum makes the world go 'round.



Re: Code of Conduct plan

2018-09-14 Thread Martin Mueller


On 9/14/18, 12:50 PM, "Joshua D. Drake"  wrote:

On 09/14/2018 07:41 AM, James Keener wrote:
> > Community is people who joined it
>
> We're not a "community."

I do not think you are going to get very many people on board with that 
argument. As anyone who knows me will attest I am one of the most 
contrarian members of this community but I still agree that it is a 
community.

JD


As Bill Clinton said in another context, "it all depends on the meaning of 
'community'".  'Community' is a very tricky word with uncertain boundaries and 
variable degrees of belonging to it.  Moreover, it's reciprocal: 'you' and the 
'community' may have different ideas of whether or how you belong. Rules in 
communities are usually tacit. You might almost want to say that if you need to 
write rules you no longer have a community.  Writing community rules is a very 
and probably hopeless endeavor.

For quite a while the word 'community' has been grossly overused and has often 
been invoked as a way of creating a sense of community where there is reason to 
doubt whether the thing is there in the first place. 

'Civil' and 'civility' are more modest words with more modest goals that are 
perhaps easier to capture in language. When it comes to a code of civil 
conduct, less is more. If you use more than the words of the ten commandments 
you almost certainly have gone too far. I have yet to see a posting on this 
list that would suggest an urgent need for trying to regulate what contributors 
say or how they say it.  





-- 
Command Prompt, Inc. || 
https://urldefense.proofpoint.com/v2/url?u=http-3A__the.postgres.company_=DwICaQ=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws=rG8zxOdssqSzDRz4x1GLlmLOW60xyVXydxwnJZpkxbk=RJwS1VI8elhlnCutR_Pulg0oUzeSh5KpHQs0EJSdr04=3RBPPMk6HiBPEHYfzKDsP-DZxFvRs5NCYc9LKGXjpdE=
 || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__postgresconf.org=DwICaQ=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws=rG8zxOdssqSzDRz4x1GLlmLOW60xyVXydxwnJZpkxbk=RJwS1VI8elhlnCutR_Pulg0oUzeSh5KpHQs0EJSdr04=ZiPaHw5gfja9OJeMGlTHieS-paSoyTHYC35rTgkwv_U=
* Unless otherwise stated, opinions are my own.   *






Re: Code of Conduct plan

2018-09-14 Thread Dimitri Maziuk
On 09/14/2018 01:17 PM, Chris Travers wrote:

> And frankly I am probably being paranoid here though I find paranoia is a
> good thing when it comes to care of databases and computer systems.  But I
> do worry about the interactions between the PostgreSQL community and the
> larger world with things worded this way.

"The issue isn't whether you're paranoid, it's whether you're paranoid
enough"

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature


Re: Convert interval to hours

2018-09-14 Thread Peter Kleiner
On Fri, Sep 14, 2018 at 2:42 PM Steven Lembark  wrote:
>
> On Fri, 14 Sep 2018 12:21:14 -0400
> David Gauthier  wrote:
>
> > I'm using postgres v9.5.2 on RH6.
>
> PG can convert the times for you.
> For times (not timestamps) you are always better off dealing with
> either time or integer seconds. There are a variety of issues with
> rouding that affect repeatability and accuracy of results using
> floats or doubles. Given that 10 and three are both continuing
> fractions in binary (e.g., 1/10 binary is an infinite series)
> division by 3600 will only cause you annoyance at some point.
>
> If you are subtracting times then you will (usually) end up with
> an interval, which can be cast to seconds in the query and give
> you precise, accurate, repeatable results every time.
>
> e.g.,
>
> select
> extract
> (
> epoch from ( time1 - time2 )::interval
> )
> as "seconds",
> ...
>
> is one approach.
>
> In nearly all cases you are better off selecting and converting
> the time in SQL rather than converting the start and end times
> from numeric (time) to string (DBI) and then back from char *
> to float/double or int/unsigned. The charaacter conversion is
> expensive and numeric -> string -> numeric leaes you open to all
> sorts of rouding and conversion issues.
>
> Frankly, if you have to run the query more than once I'd suggest
> adding a view that does the select/convert for you (along with
> dealing with any NULL's that creep into things). PG makes it quite
> easy to add the view and quite in-expensive to apply it.
>

In the original e-mail, the OP said
> I have code that's getting me an "age" which returns something like... "-17 
> days -08:29:35".

I took that to mean he was beginning with a string, which I suggested
to cast to an interval.  If he's starting with a different type, then
of course the fewer castings the better.  Also, it seems as though you
two have had private communication, because I don't see an e-mail
where he specified the DB type.  Perhaps he also showed more of the
source data there.

Pete



Re: Code of Conduct plan

2018-09-14 Thread Tom Lane
Robert Haas  writes:
> It's not clear to me that there IS a general consensus here.  It looks
> to me like the unelected core team got together and decided to impose
> a vaguely-worded code of conduct on a vaguely-defined group of people
> covering not only their work on PostgreSQL but also their entire life.

There's been quite a lot of input, from quite a lot of people, dating
back at least as far as a well-attended session at PGCon 2016.  I find
it quite upsetting to hear accusations that core is imposing this out
of nowhere.  From my perspective, we're responding to a real need
voiced by other people, not so much by us.

> However, I also don't think it matters very much.

Yeah, this.  The PG community is mostly nice people, AFAICT.  I'll be
astonished (and worried) if the CoC committee finds much to do.  We're
implementing this mostly to make newcomers to the project feel that
it's a safe space.

It's also worth reminding people that this is v1.0 of the CoC document.
We plan to revisit it in a year or so, and thereafter as needed, to
improve anything that's causing problems or not working well.

regards, tom lane



Re: Code of Conduct plan

2018-09-14 Thread Joshua D. Drake

On 09/14/2018 07:41 AM, James Keener wrote:

> Community is people who joined it

We're not a "community."


I do not think you are going to get very many people on board with that 
argument. As anyone who knows me will attest I am one of the most 
contrarian members of this community but I still agree that it is a 
community.


JD


--
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
* Unless otherwise stated, opinions are my own.   *




Re: Code of Conduct plan

2018-09-14 Thread Peter Geoghegan
On Fri, Sep 14, 2018 at 11:06 AM, Dimitri Maziuk  wrote:
> Personally I would like that. Others might prefer an invitation to
> unsubscribe or forever hold their peace, I could live with that too, but
> I believe explicit opt-ins are preferable to opt-outs.

I think that it's a legitimate position to be opposed to a CoC like
this. I also think it's legitimate to feel so strongly about it, on
philosophical or political grounds, that you are compelled to avoid
participating while subject to the CoC. FWIW, the latter position
seems rather extreme to me personally, but I still respect it.

In all sincerity, if you're compelled to walk away from participating
in mailing list discussions on a point of principle, then I wish you
well. That is your right.

-- 
Peter Geoghegan



Re: Code of Conduct plan

2018-09-14 Thread Peter Geoghegan
On Fri, Sep 14, 2018 at 7:19 AM, Joshua D. Drake  wrote:
> Sure and that is unfortunate but isn't it up to the individual to deal with
> it through appropriate channels for whatever platform they are on? All of
> these platforms are:
>
> 1. Voluntary to use
> 2. Have their own Terms of Use and complaint departments
> 3. If it is abuse there are laws
>
> I agree that within Postgresql.org we must have a professional code of
> conduct but the idea that an arbitrary committee appointed by an unelected
> board can decide the fate of a community member based on actions outside of
> the community is a bit authoritarian don't you think?

The choice of the committee members is hardly arbitrary. Having
committee members be appointed by core is more or less consistent with
how the community has always dealt with disciplinary issues. The
criteria used by core were discussed quite openly. While the risk that
the committee will yield their power in an "authoritarian" way seems
very small, it cannot be ruled out entirely. In fact, it hasn't been
ruled out by the draft CoC itself.

No CoC can possibly provide for every conceivable situation. Somebody
has to interpret the rules, and it has to be possible to impose
sanctions when the CoC is violated -- otherwise, what's the point?
There are several checks and balances in place, and I for one have
confidence in the process as outlined. It's imperfect, but quite a lot
better than either the status quo, or a platitude about inclusivity.

-- 
Peter Geoghegan



Re: Code of Conduct plan

2018-09-14 Thread Stephen Frost
Greetings,

* Dimitri Maziuk (dmaz...@bmrb.wisc.edu) wrote:
> On 09/14/2018 12:46 PM, Peter Geoghegan wrote:
> > On Fri, Sep 14, 2018 at 10:31 AM, Dimitri Maziuk  
> > wrote:
> >> So let me get this straight: you want to have a "sanctioned" way to deny
> >> people access to postgresql community support channel?
> > 
> > Yes.
> 
> A question to TPTBs, then: once The Great Plan is implemented, will I be
> automagically unsubscribed from all postgres lists because I did not
> explicitly agree to abide by The Rules And Regulations back when I
> susbscribed?

The short answer is: probably.  We have been working for a while to
implement a mechanism to get people to explicitly opt-in for certain
things, like having all posts made public, due to GDPR requirements, and
I'm kinda hoping that this gets folded into it.

Thanks!

Stephen


signature.asc
Description: PGP signature


Re: Code of Conduct plan

2018-09-14 Thread Peter Geoghegan
On Fri, Sep 14, 2018 at 10:31 AM, Dimitri Maziuk  wrote:
> So let me get this straight: you want to have a "sanctioned" way to deny
> people access to postgresql community support channel?

Yes.

> "Because
> somebody who may or may not be the same person, allegedly said something
> somewhere that some other tweet disagreed with on faceplant"?
>
> Great plan if you do for-pay postgresql support for the living.

You can make your own conclusions about my motivations, just as I'll
make my own conclusions about yours. I'm not going to engage with you
on either, though.

-- 
Peter Geoghegan



Re: Code of Conduct plan

2018-09-14 Thread Robert Haas
On Fri, Sep 14, 2018 at 11:10 AM, Dave Page  wrote:
> That wording has been in the published draft for 18 months, and noone
> objected to it that I'm aware of. There will always be people who don't like
> some of the wording, much as there are often people who disagree with the
> way a patch to the code is written. Sooner or later though, the general
> consensus prevails and we have to move on, otherwise nothing will ever get
> completed.

It's not clear to me that there IS a general consensus here.  It looks
to me like the unelected core team got together and decided to impose
a vaguely-worded code of conduct on a vaguely-defined group of people
covering not only their work on PostgreSQL but also their entire life.
It is not difficult to imagine that someone's private life might
include "behavior that may bring the PostgreSQL project into
disrepute."

However, I also don't think it matters very much.  The Code of Conduct
Committee is going to consist of small number of people -- at least
four, perhaps a few more.  But there are hundreds of people involved
on the PostgreSQL mailing lists, maybe thousands.  If the Code of
Conduct Committee, or the core team, believes that it can impose on a
very large group of people, all of whom are volunteers, some set of
rules with which they don't agree, it's probably going to find out
pretty quickly that it is mistaken.  If people from that large group
get banned for behavior which is perceived by other members of that
large group to be legitimate, then there will be a ferocious backlash.
Nobody wants to see people who are willing to contribute driven away
from the project, and anyone we drive away without a really good
reason will find some other project that welcomes their participation.
So the only thing that the Code of Conduct Committee is likely to be
able to do in practice is admonish people to be nicer (which is
probably a good thing) and punish really egregious conduct, especially
when committed by people who aren't involved enough that their absence
will be keenly felt.

In practice, therefore, democracy is going to win out.  That's both
good and bad.  It's good because nobody wants a CoC witch-hunt, and
it's bad because there's probably some behavior which legitimately
deserves censure and will escape it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



commit timestamps and replication

2018-09-14 Thread Andreas Brandl
Hi,

we're discussing a system design and it boils down to a question
regarding commit timestamps (in the sense of [1],
track_commit_timestamp='on'):

We have a insert-only (append-only) table. Do commit timestamps on
this table constitute the same order in which records become visible
on a secondary (streaming replication)? Is there any reason why this
might not be the case?

To put this differently: If a client reads from a secondary and reads
the "latest" record by commit timestamp (commit time T). Is it safe to
assume that there won't ever be another record with a lower commit
timestamp < T, that only shows up on the secondary after that read?

I'm aware of concerns regarding physical time, time adjustments and so
on, so the question here assumes those things never happen.

Thank you!

Best regards,
Andreas

[1] 
https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.5#Commit_timestamp_tracking



Re: Code of Conduct plan

2018-09-14 Thread Geoff Winkless
On Fri, 14 Sep 2018, 15:55 James Keener,  wrote:

>
>
> Yes. They can. The people who make the majority of the contributions to
>> the software can decide what happens, because without them there is no
>> software. If you want to spend 20 years of your life
>>
>
> So everyone who moderates this group and that will be part of the CoC
> committee will have had to have dedicated their life of pg?
>

No. The core developers get to decide the policy and who is best to enforce
it. It seems fair that the people who have contributed so much get to
decide what goes on in their name.

>
> Sure, they own the servers, they make the rules. I get it. I'm not
> entirely opposed to it, even if I think it's silly to ram something down
> the rest of the groups throats.
>

I agree with you. I'm just fed up with rerunning the same argument every 3
months every time a new CoC update comes out.

PS: Also, what's with the personal replies? If you don't want to say what
> you want to the whole group, I don't really have an interest in talking to
> you personally.
>

Sorry what? I replied offlist to your offlist reply to my onlist post,
since I assumed you had decided (correctly) that this was hardly the sort
of discussion that we should be clogging up other people's mailboxes with.

Geoff

>


Re: Code of Conduct plan

2018-09-14 Thread Lee Hachadoorian
While agreeing that there are good arguments that we are a "community" in a
prescriptive sense, I don't think the discussion about whether we
constitute a community is relevant. For at least 25 years "community" has
been applied to virtually any group of people, much to the chagrin of those
such as community organizers and members of religious and intentional
communities who prefer to restrict its usage to a prescriptive sense.

Regarding treating conduct as a matter of "professionalism" rather than
"community", possibly all of the examples offered in the section
Inclusivity and Appropriate Conduct--thing such as personal attacks and
negative comments, threats of violence, and unwelcome sexual attention--do
strike me as unprofessional conduct, although these behaviors have
frequently been tolerated in *many* professional settings. (This is not
even close to being a uniquely tech problem. I could list the industries,
but it would basically be cutting and pasting the list of NAICS codes.)

The CoC will have largely the same meaning if "community" is replaced by
"users and developers" in most places. I do *not* suggest we do so, (a) the
word "community" as used in the document is at this point common usage, (b)
it will be uglier prose, and (c) there would sometimes need to be
additional verbose clarification as to whether it meant "individual users
and developers" or "users and developers as a collective body", and
sometimes it even appears to mean "the Spirit of PosgreSQL". (That last
might be an exaggeration.)

The question of when two or more "users or developers" interacting outside
our common purpose is worthy of the attention of the CoC committee--e.g.
direct email between members, two people at a bar after a conference--is a
legitimate concern, but I do not think a clear line can be decided
beforehand. Someone who received a direct, insulting or threatening email
from someone else on this particular thread that did *not* get distributed
to the list, and does *not* reference this conversation at all, could
reasonably initiate a CoC complaint even though the harassing behavior did
not make use of PG infrastructure. Two long-time PG developers who become
friends, and have been friends for many years in a way that goes far beyond
their PG activities, should not initiate a CoC complaint, or have their
complaint taken seriously by the committee, if they get into a screaming
fight at a family barbecue over one of them serving soda to the other's
kid. There's a lot of gray area in the middle that I think cannot be
resolved ahead of time, but gray areas don't preclude a good faith attempt
to cover some kinds of "outside" interactions.

I do agree, however, that the language "community at large" is somewhat
vague. The phrase is only used once, and is pretty much dropped in the next
sentence which reverts to discussing "interactions between community
members". I can't tell whether it could mean (from most to least
restrictive) (a) someone who is considering adopting PG (so not already a
user or developer) and asks a question online, in which case the phrase
"community at large" is merely meant to forestall an argument about whether
a non-user is a "community member", (b) someone PG-adjacent, such as a
vendor for a competing product at a conference, who is harassed by a PG
booster, or (c) literally everyone.

Best,
--Lee

-- 
Lee Hachadoorian
Assistant Professor of Instruction, Geography and Urban Studies
Assistant Director, Professional Science Master's in GIS
Temple University


Re: Code of Conduct plan

2018-09-14 Thread Dimitri Maziuk
On 09/14/2018 12:46 PM, Peter Geoghegan wrote:
> On Fri, Sep 14, 2018 at 10:31 AM, Dimitri Maziuk  
> wrote:
>> So let me get this straight: you want to have a "sanctioned" way to deny
>> people access to postgresql community support channel?
> 
> Yes.

A question to TPTBs, then: once The Great Plan is implemented, will I be
automagically unsubscribed from all postgres lists because I did not
explicitly agree to abide by The Rules And Regulations back when I
susbscribed?

Personally I would like that. Others might prefer an invitation to
unsubscribe or forever hold their peace, I could live with that too, but
I believe explicit opt-ins are preferable to opt-outs.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature


Re: Code of Conduct plan

2018-09-14 Thread Chris Travers
On Fri, Sep 14, 2018 at 7:47 PM Peter Geoghegan  wrote:

> On Fri, Sep 14, 2018 at 10:31 AM, Dimitri Maziuk 
> wrote:
> > So let me get this straight: you want to have a "sanctioned" way to deny
> > people access to postgresql community support channel?
>
> Yes.
>
> > "Because
> > somebody who may or may not be the same person, allegedly said something
> > somewhere that some other tweet disagreed with on faceplant"?
> >
> > Great plan if you do for-pay postgresql support for the living.
>
> You can make your own conclusions about my motivations, just as I'll
> make my own conclusions about yours. I'm not going to engage with you
> on either, though.
>

With regard to the  concerns about authoritarianism, I have to defend the
Code of Conduct here.

It's not anything of the above.  The PostgreSQL project has a pretty good
track record of ensuring that people can participate across boundaries of
culture, ethnicity, political ideology (which is always informed by culture
and ethnicity), and the like.  On the whole I trust the committee to make
sound judgments.

The thing is, yes it is scary that someone might be effectively denied
access to commons based on false accusations, but it is also concerning
that people might be driven away from commons by aggressive harassment (on
or off list) or the like.  The code of conduct is a welcome step in that
goal.  I think we should trust long-standing communities with a track
record of being generally cultivating access to the commons with decisions
which foster that.   The fact is, at least I would hope we all agree that

This is basic governance.  Communities require arbitration and management
of the economic commons we build together and this is a part of that.  I am
pretty sure that's why the expansive wording was included.  And I support
the right of the committee to act even for off-list behavior when it is
appropriate to do so.  That part, I am not questioning.  I think that's
important.

So I think a lot of the hysteria misses the point.  We have good people.
We have a generally good track record of getting along.  We have a track
record of not being mean to eachother because of differences in political,
social, religious, etc. belief.  The committee as a custodian of this
community can't really take the hard sides on divisive issues that we might
expect in, say, an American corporation like Mozilla or Google.  I think
people who worry about this don't get the weight of responsibility that
will be placed on such individuals to support a breathtakingly diverse
international project and keep the peace, giving people room for civic
engagement even on divisive issues.

And frankly I am probably being paranoid here though I find paranoia is a
good thing when it comes to care of databases and computer systems.  But I
do worry about the interactions between the PostgreSQL community and the
larger world with things worded this way.



> --
> Peter Geoghegan
>
>

-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: commit timestamps and replication

2018-09-14 Thread Andres Freund
Hi,

On 2018-09-14 21:01:54 +0200, Andreas Brandl wrote:
> we're discussing a system design and it boils down to a question
> regarding commit timestamps (in the sense of [1],
> track_commit_timestamp='on'):
> 
> We have a insert-only (append-only) table. Do commit timestamps on
> this table constitute the same order in which records become visible
> on a secondary (streaming replication)? Is there any reason why this
> might not be the case?
> 
> To put this differently: If a client reads from a secondary and reads
> the "latest" record by commit timestamp (commit time T). Is it safe to
> assume that there won't ever be another record with a lower commit
> timestamp < T, that only shows up on the secondary after that read?

No, that's not safe to assume.  The order of visibility on the standby
is determined by the point the WAL record is inserted into the log.  The
commit timestamp has to *previously* be determined to be part of the WAL
log:

SetCurrentTransactionStopTimestamp();

XactLogCommitRecord(xactStopTimestamp,
nchildren, children, nrels, rels,
nmsgs, invalMessages,
RelcacheInitFileInval, forceSyncCommit,
MyXactFlags,
InvalidTransactionId, NULL /* plain commit */ );

Those two things happen sequentially, *WITHOUT* a lock preventing
concurrent transactions to do the same.


> I'm aware of concerns regarding physical time, time adjustments and so
> on, so the question here assumes those things never happen.

Note that in addition to that you cannot be certain that concurrent
transactions *in the same postgres cluster* have perfectly coherent
timestamp - clock drift between CPU sockets does still sometimes occur,
and was extremely common.

Greetings,

Andres Freund



Re: column information from view

2018-09-14 Thread Tom Lane
"Sebastian P. Luque"  writes:
> Tom Lane  wrote:
>> Personally, I'd probably write it something like this:

>> select pa.attnum, pa.attname, col_description(pa.attrelid, pa.attnum)
>> from pg_attribute pa, pg_attribute ta where pa.attrelid =
>> 'persistent_view'::regclass and ta.attrelid =
>> 'temporary_view'::regclass and pa.attname = ta.attname order by
>> pa.attnum;

> Thank you Tom, this does seem more elegant, but I'd have to retrieve the
> actual "attrelid" from the names of the two views somehow.

That's what the regclass converter does for you.

regards, tom lane



Vacuum not deleting tuples when lockless

2018-09-14 Thread Martín Fernández
Hello,

We are experiencing some `vacuum` issues with a given table (potentially more). 
When a manual vacuum runs on the given table it seems that the `vacuum` process 
is not doing the expected cleanup.

```
DETAIL:  113257 dead row versions cannot be removed yet.
```

I've been investigating the reasons for vacuum not being able to do it's work 
and I found that generally the problem is caused by open transactions 
referencing the dead tuples. I also found that locking can be a problem as well.

I did check that no long running transaction was happening and no locking was 
happening before running `vacuum` on the given table.

I used this query to check the locks:

```
SELECT query, state,locktype,mode
FROM pg_locks
JOIN pg_stat_activity
  USING (pid)
WHERE relation::regclass = 'my_table'::regclass
  AND granted IS TRUE;
```

I'm not sure where else to look for a potential issue that could be causing 
this problem. A few days back we had to use re_pack on the given table to solve 
our performance issues.

Important thing to clarify is that we are using postgresql 9.2.24

Thanks in advance!

Best,
Martín

Re: column information from view

2018-09-14 Thread Adrian Klaver

On 9/14/18 3:17 PM, Sebastian P. Luque wrote:

On Fri, 14 Sep 2018 14:47:07 -0700,
Adrian Klaver  wrote:


SELECT cols.ordinal_position, cols.column_name,
   col_description(cl.oid, cols.ordinal_position::INT)
FROM pg_class cl, information_schema.columns cols
WHERE cols.table_catalog='aquaculture' AND cols.table_schema ilike
'pg_temp%' AND
   cols.table_name = 'c_data' AND cols.table_name = cl.relname
ORDER BY cols.ordinal_position::INT;



  ordinal_position | column_name | col_description
--++-
 1 | source_id | NULL
 2 | geography_desc | NULL


Exactly, except that the column descriptions reside in the persistent
view whereas the above pulls them from the temporary view, which are all
NULL.


COMMENT ON column catfish_data.source_id IS 'The source';

SELECT cols.ordinal_position, cols.column_name,
  col_description('catfish_data'::regclass, cols.ordinal_position::INT)
FROM
pg_class AS cl
JOIN
information_schema.columns AS cols
ON
cl.relname = cols.table_name
JOIN
information_schema.columns AS cols2
ON
cols.column_name = cols2.column_name
WHERE
cols.table_catalog='aquaculture'
AND
cols2.table_name = 'c_data'
AND
cols.table_schema = 'public'
AND
  cols.table_name = 'catfish_data'
;

ordinal_position |  column_name   | col_description
--++-
2 | source_id  | The source
5 | geography_desc | NULL



Always learning something here.

Thanks,




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



Re: Vacuum not deleting tuples when lockless

2018-09-14 Thread Jerry Sievers
Martín Fernández  writes:

> *
> Hello,
>
> We are experiencing some `vacuum` issues with a given table
> (potentially more). When a manual vacuum runs on the given table it
> seems that the `vacuum` process is not doing the expected cleanup.
>
> ```
> DETAIL:  113257 dead row versions cannot be removed yet.
> ```
>
> I've been investigating the reasons for vacuum not being able to do
> it's work and I found that generally the problem is caused by open
> transactions referencing the dead tuples. I also found that locking
> can be a problem as well.
>
> I did check that no long running transaction was happening and no
> locking was happening before running `vacuum` on the given table.
>
> I used this query to check the locks:
>
> ```
> SELECT query, state,locktype,mode
> FROM pg_locks
> JOIN pg_stat_activity
>   USING (pid)
> WHERE relation::regclass = 'my_table'::regclass
>   AND granted IS TRUE;
> ```
>
> I'm not sure where else to look for a potential issue that could be
> causing this problem. A few days back we had to use re_pack on the

Also check for...

* Old open prepared xacts.
* Inactive replication slots.
* Standbys confi'd with large vacuum clean up delay and feedback
  enabled.

HTH

> given table to solve our performance issues.
>
> Important thing to clarify is that we are using postgresql 9.2.24
>
> Thanks in advance!
>
> Best,
> Martín
>
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consult...@comcast.net
p: 312.241.7800



Re: Code of Conduct plan

2018-09-14 Thread Steve Litt
On Fri, 14 Sep 2018 13:18:12 +
Martin Mueller  wrote:

> I have followed this list for a couple of years, have benefited
> several times from quick and helpful advice,  and wonder whether all
> this code of conduct stuff is a solution in search of a problem. 

No, it's not. Talk to anyone outside the mainstream in a way that it
would be costly, in money or safety, for them to proclaim their
differences from the rooftops.

> My
> grandchildren were taught that “please and thank you sound so
> nice  manners are important, be polite” sung to the tune of Frère
> Jacques. They don’t always remember it,  but a longer poem wouldn’t
> help.

And indeed, if everybody were taught these things and lived by them,
including not saying bad stuff about groups of people, not making jokes
about groups of people, and calling people what they want to be called,
there would be no need at all.

But there are people who think that a Geek gathering is a really good
place to grope females. There are people who have no problem piling on
the unfortunate, perhaps because their misfortunes are God's punishment
for their sins (then why not be nice and leave the punishment to God?).
There are those who just love to cause trouble. There are really bad
people out there, and we need to define what's allowed and what's not
so these people can't cause damage, and that's why we have CoCs.

As far as behavior in other venues, I'm sure there are people out there
who would object to some of the stuff in some of my books. I've tried
my best to make my books unhurtful, but truth be told, if my books
(which don't name or resemble anyone on this list) run afoul of the
CoC, I'd have to resign from the list. I suggest treading very
carefully when discussing, in the Postgres CoC, peoples' behavior in
other venues.

SteveT

Steve Litt 
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz



column information from view

2018-09-14 Thread Sebastian P. Luque
Hello,

I'm trying to generate a table with information on columns from a
temporary view that simply selects a subset of columns from a persistent
view in a given schema.  The persistent view joins a number of tables
with columns that may or may not have a description entered.  I need a
table with a list of columns from the temporary view, and the matching
descriptions from the underlying persistent view.

Here's my attempt at listing the temporary view's columns and respective
descriptions:

SELECT cols.ordinal_position, cols.column_name,
  col_description(cl.oid, cols.ordinal_position::INT)
FROM pg_class cl, information_schema.columns cols
WHERE cols.table_catalog='dbname' AND cols.table_schema='some_schema' AND
  cols.table_name = 'persistent_view' AND cols.table_name = cl.relname
ORDER BY cols.ordinal_position::INT;

The problem, of course, is that it lists columns from the persistent
view, instead of the subset of them in the temporary view.  Is there a
better way to do that?  Hopefully this makes sense.

Thanks,
--
Seb



Re: Slow shutdowns sometimes on RDS Postgres

2018-09-14 Thread Adrian Klaver

On 9/14/18 12:11 PM, Jeremy Schneider wrote:

On 9/14/18 10:04, Christophe Pettus wrote:


Thanks Christophe - even if it's not what Chris is running into, this is 
is another good call-out.


It's important to distinguish here between the RDS parts and the 
community PostgreSQL parts.  I think for this thread it's just worth 
pointing out that RDS automation/tooling will report the database in a 
"modifying" state until it completes its management operations, however 
the actual database unavailability is much shorter.  RDS carefully 
engineers their processes to minimize the actual database unavailability 
itself.


Chris has run into a problem where the PostgreSQL processes did not shut 
down, evidenced by the error messages he mentioned, and as a result his 
database was actually unavailable to applications for an extended 
period.  This is uncommon and concerning.


This isn't the right forum for discussing the RDS bits; lets take that 
to the AWS forums.  It's not synchronous, but the time to complete 
should absolutely be predictable within reasonable bounds depending on 
the operation type. I don't know how anyone could use the platform 
otherwise!  If anyone is unable to establish bounded expectations for 
some automated operation, I'd strongly encourage starting a thread on 
the AWS forums or opening a support ticket.


Not sure I follow. RDS using Postgres is a set, so I am not sure you can 
unbundle then when tracking down a bug.





On 9/14/18 09:27, Adrian Klaver wrote:
The thing is I do not remember any posts to this list mentioning the 
same problem on a platform outside RDS. A quick search seems to 
confirm that.
I've met folks from other large fleet operators at PG conferences. There 
are all kinds of stories we don't find on the lists yet.  :) Hopefully 
we're all getting better about closing the loop and sharing stuff back - 
that's part of the value large fleet operators can and should bring to 
the community.


Hopefully sooner rather then later.



-Jeremy





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



Re: column information from view

2018-09-14 Thread Sebastian P . Luque
On Fri, 14 Sep 2018 17:52:28 -0400,
Tom Lane  wrote:

> Umm ... why are you doing cols.table_name = 'persistent_view' and not
> cols.table_name = 'temporary_view' ?

I should have pointed out that the column descriptions are all NULL in
the temporary view, and I'd like to pull them from the persistent view
which have the same name.  I know this is brittle though.


> It seems rather odd to write a query that involves both pg_class and
> the information_schema --- by involving pg_class, you've already given
> up hope of making the query portable to non-PG DBMSes.

> Personally, I'd probably write it something like this:

> select pa.attnum, pa.attname, col_description(pa.attrelid, pa.attnum)
> from pg_attribute pa, pg_attribute ta where pa.attrelid =
> 'persistent_view'::regclass and ta.attrelid =
> 'temporary_view'::regclass and pa.attname = ta.attname order by
> pa.attnum;

> If you were dealing with tables, it'd also be wise to add "pa.attnum >
> 0 and not pa.attisdropped", but I think neither of those conditions
> can fail for views.

Thank you Tom, this does seem more elegant, but I'd have to retrieve the
actual "attrelid" from the names of the two views somehow.  I'm very
green on using these internal database tables.

-- 
Seb



Re: Code of Conduct plan

2018-09-14 Thread James Keener
The preceding's pretty simple. An attacker goes after an individual,
> presumably without provocation and/or asymetrically. The attacked
> person is on this mailing list. IMHO this attacker must choose between
> continuing his attacks, and belonging to the Postgres community.
>
> What's tougher is the person who attacks groups of people.
>
>
The preceding's pretty simple. An "attacker" voices their political opinions
or other unorthodoxy or unpopular stance, but in no way directs it at the
postgres user base or on a postgres list. The "attacked"
person is on this mailing list. IMHO this "attacker" must choose between
continuing to voice their opinion, and belonging to the Postgres community.


Re: column information from view

2018-09-14 Thread Sebastian P. Luque
On Fri, 14 Sep 2018 14:47:07 -0700,
Adrian Klaver  wrote:

> SELECT cols.ordinal_position, cols.column_name,
>   col_description(cl.oid, cols.ordinal_position::INT)
> FROM pg_class cl, information_schema.columns cols
> WHERE cols.table_catalog='aquaculture' AND cols.table_schema ilike
> 'pg_temp%' AND
>   cols.table_name = 'c_data' AND cols.table_name = cl.relname
> ORDER BY cols.ordinal_position::INT;

>  ordinal_position | column_name | col_description
> --++-
> 1 | source_id | NULL
> 2 | geography_desc | NULL

Exactly, except that the column descriptions reside in the persistent
view whereas the above pulls them from the temporary view, which are all
NULL.

Always learning something here.

Thanks,
-- 
Seb



Re: column information from view

2018-09-14 Thread Sebastian P . Luque
On Fri, 14 Sep 2018 18:29:27 -0400,
Tom Lane  wrote:

> "Sebastian P. Luque"  writes:
>> Tom Lane  wrote:
>>> Personally, I'd probably write it something like this:

>>> select pa.attnum, pa.attname, col_description(pa.attrelid,
>>> pa.attnum) from pg_attribute pa, pg_attribute ta where pa.attrelid =
>>> 'persistent_view'::regclass and ta.attrelid =
>>> 'temporary_view'::regclass and pa.attname = ta.attname order by
>>> pa.attnum;

>> Thank you Tom, this does seem more elegant, but I'd have to retrieve
>> the actual "attrelid" from the names of the two views somehow.

> That's what the regclass converter does for you.

Amazing!

Thank you all for these insights,
-- 
Seb




Re: Query act different when doing by hand and by using a driver in app

2018-09-14 Thread Adrian Klaver

On 9/14/18 12:11 PM, ik wrote:

Hello,

Not sure that this is the right mailing list, so sorry from advance.

I have a program that when it does a query I have one raw returns, but 
when I execute the same query with the same conditions, I get the right 
number of rows back.


The above is going to need more information to work out:

1) The query that returns one row is running in a Go program using the 
Go driver below, correct?


2) The other query that returns correctly is being run where and how?

3) What is the actual query?

4) How is the query setup in the program?

5) Are you sure the incorrect and correct queries are running against 
the same database?




I'm using gonlang and https://github.com/jackc/pgx .
The query inside is inside an already open cursor of another "select" 
query that I iterate over.


Is there a way to debug just that inside pg-logs without having all 
possible queries logged in?


If it is a SELECT query then no.



Thank you
Ido



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



Re: Slow shutdowns sometimes on RDS Postgres

2018-09-14 Thread Chris Williams
Hey Jeremy,

Thanks so much for your response. That's a great tip regarding enabling
enhanced monitoring.  Maybe it will give some insight into which particular
backends are causing the shutdown to hang.  One interesting data point when
this happened is that in cloudwatch, once the database started shutting
down, you can see the connection count drop from 600 to 4 immediately.
Then the graph shows a constant 4 connections for 10 minutes straight
before it finally shuts down and goes to 0.  I'm guessing the shutdown is
hanging because of one of these 4 connections.  Unfortunately, because the
database is shutting down, I'm not able to connect and get any info about
these connections, so enabling enhanced monitoring might give some more
clues.

My other question is, do you think shutting down my apps manually once I
noticed the shutdown was hanging had any effect on the total shutdown time?
It seems a bit coincidental that the database finally shut down after
exactly 10 minutes.  This makes me think that some internal timeout in
RDS's shutdown script was triggered and that shutting down my apps didn't
actually affect anything. I'd much rather just wait 10 minutes then
frantically try to shutdown all of my apps.  So I'd be curious to know if
you are able to look up what the timeout is and if you think the timeout is
what is actually causing it to finally shut down. While I'd much rather
have my database shutdown in a minute or two, at least there would be some
comfort in knowing that 10 minutes is the upper bound.

I'd love to be able to figure out how to reproduce it, but it doesn't
happen consistently unfortunately and I've only ever seen it on our main
production database so that makes things trickier.  We do need to resize
our database again in a few weeks.  If there's any special debug settings i
should enable before modifying it (besides enhanced monitoring) or if
support wanted to observe it in the middle of the shutdown, let me know.
The last two times I've resized the database, the shutdown has hung like
this, so there's a good chance it will do it again.

Another idea I had too was to remove all the security group rules on the db
right before applying the modification.  My thinking was that maybe that
might help postgres terminate all the connections quicker? That said, it's
all a shot in the dark I guess since we don't know the underlying cause.

Best,
Chris

On Fri, Sep 14, 2018 at 8:43 AM Jeremy Schneider 
wrote:

> Hi Chris - this is an interesting one that we do see from time to time;
> seems worth responding here as actually our best understanding right now
> is that this is something in community code, not AWS-specific.
>
>
> On 9/13/18 15:17, Joshua D. Drake wrote:
> > This is probably something you would have to talk to Amazon about. AWS
> > RDS Postgres is a fork of PostgreSQL and not 100% compatible from an
> > administrative perspective.
>
> Hey JD! FWIW, the code differences are pretty minimal and generally just
> what's required to have a managed service where people can still use the
> database as they normally would. The biggest difference is just getting
> used to operating without direct OS access, and working through
> automation/tooling instead. (And there's always EC2 for the many
> customers who want/need superuser but still don't want to maintain the
> hardware.)
>
>
> On 9/13/18 16:10, Adrian Klaver wrote:
> > The thing is, what you are doing ("(e.g. reboot, changing instance
> > size, etc.)") are instance operations not database operations. That
> > comes under AWS's purview.
>
> Correct, managing reboots and hardware reconfigurations would be the
> responsibility of AWS. However Chris' issue here is just that PostgreSQL
> itself took a long time to shut down. I'm not aware of anything
> RDS-specific with this.
>
>
> > On 09/13/2018 03:04 PM, Chris Williams wrote:
> >> I'm using AWS RDS Postgres (9.6.6) and have run into very slow
> >> shutdowns (10+ minutes) a few times when making database modifications
> >> (e.g. reboot, changing instance size, etc.).  Other times, it shuts
> >> down quickly (1 minute or so).  I have not been able to figure out why
> >> sometimes it takes a long time to shutdown.
>
> I don't know about this specific incident, but I do know that the RDS
> team has seen cases where a backend gets into a state (like a system
> call) where it's not checking signals and thus doesn't receive or
> process the postmaster's request to quit. We've seen these processes
> delay shutdowns and also block recovery on streaming replicas.
>
>
> >> Once I start seeing these messages, I start manually shutting down all
> >> of our applications that are connected to the db.  I'm not sure if
> >> shutting down the apps fixes it or if there's some timeout on the RDS
> >> side, but it seems like once I start doing this, the database finally
> >> shuts down.
>
> FYI, yes there is a timeout on the RDS side. The basic workflow is to
> try to shutdown postgres the normal way, and 

Re: Code of Conduct plan

2018-09-14 Thread Steve Litt
On Fri, 14 Sep 2018 10:10:38 -0400
James Keener  wrote:

> > I understand the concern, however, if you look at how attacks happen
> >
> > it is frequently through other sites. Specifically under/poorly
> > moderated sites. For specific examples, people who have issues with
> > people on Quora will frequently go after them on Facebook and
> > Twitter.

The preceding's pretty simple. An attacker goes after an individual,
presumably without provocation and/or asymetrically. The attacked
person is on this mailing list. IMHO this attacker must choose between
continuing his attacks, and belonging to the Postgres community.

What's tougher is the person who attacks groups of people.

SteveT

Steve Litt 
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz



Re: Vacuum not deleting tuples when lockless

2018-09-14 Thread Tom Lane
=?UTF-8?q?Mart=C3=ADn_Fern=C3=A1ndez?=  writes:
> We are experiencing some `vacuum` issues with a given table (potentially 
> more). When a manual vacuum runs on the given table it seems that the 
> `vacuum` process is not doing the expected cleanup.

> DETAIL:  113257 dead row versions cannot be removed yet.

Locks don't really have anything to do with that: what does matter is
how old is the oldest open transaction, because that determines the
"event horizon" that dead row versions have to fall below before they
can be removed.  That oldest transaction might not be holding any locks
at the moment, but it doesn't matter, because in principle it could ask
to read this table later --- and it should see the table's contents as
of its snapshot.

Serializable transactions are worse than repeatable-read transactions
for this purpose, because the former will keep a snapshot as of their
start time.

As Jerry mentioned, replication slots can also act like open transactions
for this purpose, though I don't recall how much of that behavior is
present in 9.2.x.

regards, tom lane



Re: Vacuum not deleting tuples when lockless

2018-09-14 Thread Jerry Sievers
Tom Lane  writes:

> =?UTF-8?q?Mart=C3=ADn_Fern=C3=A1ndez?=  writes:
>
>> We are experiencing some `vacuum` issues with a given table
>> (potentially more). When a manual vacuum runs on the given table it
>> seems that the `vacuum` process is not doing the expected cleanup.
>
>> DETAIL:  113257 dead row versions cannot be removed yet.
>
> Locks don't really have anything to do with that: what does matter is
> how old is the oldest open transaction, because that determines the
> "event horizon" that dead row versions have to fall below before they
> can be removed.  That oldest transaction might not be holding any locks
> at the moment, but it doesn't matter, because in principle it could ask
> to read this table later --- and it should see the table's contents as
> of its snapshot.
>
> Serializable transactions are worse than repeatable-read transactions
> for this purpose, because the former will keep a snapshot as of their
> start time.
>
> As Jerry mentioned, replication slots can also act like open transactions
> for this purpose, though I don't recall how much of that behavior is
> present in 9.2.x.

Oops, didn't notice OP was on 9.2!  Presume none, since I don't think we
got rep slots till 9.4 :-)

>
>   regards, tom lane
>
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consult...@comcast.net
p: 312.241.7800



Re: column information from view

2018-09-14 Thread Adrian Klaver

On 9/14/18 2:35 PM, Sebastian P. Luque wrote:

Hello,

I'm trying to generate a table with information on columns from a
temporary view that simply selects a subset of columns from a persistent
view in a given schema.  The persistent view joins a number of tables
with columns that may or may not have a description entered.  I need a
table with a list of columns from the temporary view, and the matching
descriptions from the underlying persistent view.

Here's my attempt at listing the temporary view's columns and respective
descriptions:

SELECT cols.ordinal_position, cols.column_name,
   col_description(cl.oid, cols.ordinal_position::INT)
FROM pg_class cl, information_schema.columns cols
WHERE cols.table_catalog='dbname' AND cols.table_schema='some_schema' AND
   cols.table_name = 'persistent_view' AND cols.table_name = cl.relname
ORDER BY cols.ordinal_position::INT;

The problem, of course, is that it lists columns from the persistent
view, instead of the subset of them in the temporary view.  Is there a
better way to do that?  Hopefully this makes sense.


create temp view c_data as select source_id, geography_desc from 
catfish_data ;


\d c_data
   View "pg_temp_3.c_data"
 Column |   Type| Collation | Nullable | Default
+---+---+--+-
 source_id  | integer   |   |  |
 geography_desc | character varying |



SELECT cols.ordinal_position, cols.column_name, 



  col_description(cl.oid, cols.ordinal_position::INT) 



FROM pg_class cl, information_schema.columns cols 



WHERE cols.table_catalog='aquaculture' AND cols.table_schema ilike 
'pg_temp%' AND 

  cols.table_name = 'c_data' AND cols.table_name = cl.relname 



ORDER BY cols.ordinal_position::INT; 




 ordinal_position |  column_name   | col_description 



--++- 



1 | source_id  | NULL 



2 | geography_desc | NULL



Thanks,
--
Seb





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



Re: column information from view

2018-09-14 Thread Tom Lane
"Sebastian P. Luque"  writes:
> Here's my attempt at listing the temporary view's columns and respective
> descriptions:

> SELECT cols.ordinal_position, cols.column_name,
>   col_description(cl.oid, cols.ordinal_position::INT)
> FROM pg_class cl, information_schema.columns cols
> WHERE cols.table_catalog='dbname' AND cols.table_schema='some_schema' AND
>   cols.table_name = 'persistent_view' AND cols.table_name = cl.relname
> ORDER BY cols.ordinal_position::INT;

> The problem, of course, is that it lists columns from the persistent
> view, instead of the subset of them in the temporary view.  Is there a
> better way to do that?  Hopefully this makes sense.

Umm ... why are you doing cols.table_name = 'persistent_view'
and not cols.table_name = 'temporary_view' ?

It seems rather odd to write a query that involves both pg_class
and the information_schema --- by involving pg_class, you've already
given up hope of making the query portable to non-PG DBMSes.

Personally, I'd probably write it something like this:

select pa.attnum, pa.attname, col_description(pa.attrelid, pa.attnum)
from
  pg_attribute pa, pg_attribute ta
where
  pa.attrelid = 'persistent_view'::regclass and
  ta.attrelid = 'temporary_view'::regclass and
  pa.attname = ta.attname
order by pa.attnum;

If you were dealing with tables, it'd also be wise to add
"pa.attnum > 0 and not pa.attisdropped", but I think neither of
those conditions can fail for views.

regards, tom lane



Re: Code of Conduct plan

2018-09-14 Thread Steve Litt
On Fri, 14 Sep 2018 07:19:59 -0700
"Joshua D. Drake"  wrote:


> I agree that within Postgresql.org we must have a professional code
> of conduct but the idea that an arbitrary committee appointed by an 
> unelected board can decide the fate of a community member based on 
> actions outside of the community is a bit authoritarian don't you
> think?
> 
> JD

You know the member inspected by the committee is free to start an
alternative Postgres community, if things get that bad. A LUG I once
founded started getting too abusive in their email, so I started a
second LUG, where people like me could communicate without what we
considered overt extraneous bullshit.

If this committee truly becomes authoritative, as perceived by a
significant portion of membership, the organization will fork.

SteveT

Steve Litt 
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz



Re: Code of Conduct plan

2018-09-14 Thread Karsten Hilbert
On Fri, Sep 14, 2018 at 10:38:56AM +0200, Chris Travers wrote:

> > I really have to object to this addition:
> > "This Code is meant to cover all interaction between community members,
> > whether or not it takes place within postgresql.org infrastructure, so
> > long as there is not another Code of Conduct that takes precedence (such as
> > a conference's Code of Conduct)."
> >
> > That covers things like public twitter messages over live political
> > controversies which might not be personally directed.   At least if one is
> > going to go that route, one ought to *also* include a safe harbor for
> > non-personally-directed discussions of philosophy, social issues, and
> > politics.  Otherwise, I think this is asking for trouble.  See, for
> > example, what happened with Opalgate and how this could be seen to
> > encourage use of this to silence political controversies unrelated to
> > PostgreSQL.
> >
> 
> Suggestion instead:
> 
> "Personally directed behavior is not automatically excluded from this code
> of conduct merely because it does not happen on the postgresql.org
> infrastructure.  In the case where a dispute of such a nature occurs
> outside said infrastructure, if other parties are unable to act, this code
> of conduct may be considered where it is, on the balance, in the interest
> of the global community to do so."
> 
> This preserves the ability to act, without basically providing the same
> invitation for problems.

Sounds pretty balanced to me.

Karsten
-- 
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



Re: Code of Conduct plan

2018-09-14 Thread Chris Travers
On Wed, Sep 12, 2018 at 10:53 PM Tom Lane  wrote:

> I wrote:
> > Stephen Frost  writes:
> >> We seem to be a bit past that timeline...  Do we have any update on when
> >> this will be moving forward?
> >> Or did I miss something?
>
> > Nope, you didn't.  Folks have been on holiday which made it hard to keep
> > forward progress going, particularly with respect to selecting the
> initial
> > committee members.  Now that Magnus is back on shore, I hope we can
> > wrap it up quickly --- say by the end of August.
>
> I apologize for the glacial slowness with which this has all been moving.
> The core team has now agreed to some revisions to the draft CoC based on
> the comments in this thread; see
>
> https://wiki.postgresql.org/wiki/Code_of_Conduct
>
> (That's the updated text, but you can use the diff tool on the page
> history tab to see the changes from the previous draft.)
>

I really have to object to this addition:
"This Code is meant to cover all interaction between community members,
whether or not it takes place within postgresql.org infrastructure, so long
as there is not another Code of Conduct that takes precedence (such as a
conference's Code of Conduct)."

That covers things like public twitter messages over live political
controversies which might not be personally directed.   At least if one is
going to go that route, one ought to *also* include a safe harbor for
non-personally-directed discussions of philosophy, social issues, and
politics.  Otherwise, I think this is asking for trouble.  See, for
example, what happened with Opalgate and how this could be seen to
encourage use of this to silence political controversies unrelated to
PostgreSQL.

>
> I think we are about ready to announce the initial membership of the
> CoC committee, as well, but that should be a separate post.
>
> regards, tom lane
>
>

-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: Code of Conduct plan

2018-09-14 Thread Chris Travers
On Fri, Sep 14, 2018 at 10:31 AM Chris Travers 
wrote:

>
>
> On Wed, Sep 12, 2018 at 10:53 PM Tom Lane  wrote:
>
>> I wrote:
>> > Stephen Frost  writes:
>> >> We seem to be a bit past that timeline...  Do we have any update on
>> when
>> >> this will be moving forward?
>> >> Or did I miss something?
>>
>> > Nope, you didn't.  Folks have been on holiday which made it hard to keep
>> > forward progress going, particularly with respect to selecting the
>> initial
>> > committee members.  Now that Magnus is back on shore, I hope we can
>> > wrap it up quickly --- say by the end of August.
>>
>> I apologize for the glacial slowness with which this has all been moving.
>> The core team has now agreed to some revisions to the draft CoC based on
>> the comments in this thread; see
>>
>> https://wiki.postgresql.org/wiki/Code_of_Conduct
>>
>> (That's the updated text, but you can use the diff tool on the page
>> history tab to see the changes from the previous draft.)
>>
>
> I really have to object to this addition:
> "This Code is meant to cover all interaction between community members,
> whether or not it takes place within postgresql.org infrastructure, so
> long as there is not another Code of Conduct that takes precedence (such as
> a conference's Code of Conduct)."
>
> That covers things like public twitter messages over live political
> controversies which might not be personally directed.   At least if one is
> going to go that route, one ought to *also* include a safe harbor for
> non-personally-directed discussions of philosophy, social issues, and
> politics.  Otherwise, I think this is asking for trouble.  See, for
> example, what happened with Opalgate and how this could be seen to
> encourage use of this to silence political controversies unrelated to
> PostgreSQL.
>

Suggestion instead:

"Personally directed behavior is not automatically excluded from this code
of conduct merely because it does not happen on the postgresql.org
infrastructure.  In the case where a dispute of such a nature occurs
outside said infrastructure, if other parties are unable to act, this code
of conduct may be considered where it is, on the balance, in the interest
of the global community to do so."

This preserves the ability to act, without basically providing the same
invitation for problems.


>> I think we are about ready to announce the initial membership of the
>> CoC committee, as well, but that should be a separate post.
>>
>> regards, tom lane
>>
>>
>
> --
> Best Wishes,
> Chris Travers
>
> Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
> lock-in.
> http://www.efficito.com/learn_more
>


-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: Code of Conduct plan

2018-09-14 Thread James Keener
I find a lot of neo-con/trumpian political stances moronic, short-sighted, and 
anti-intellectual and therefore consider them offensive, an affront on my way 
of life, and a stain on my country.

1) Can I report anyone holding such views and discussing them on a 3rd party 
forum? 

2) Could I be reported for saying the above on a 3rd party forum? 

Obviously the pg mailing list isn't a place for such discussion, but is being a 
member of this community a deal with the devil to give up my right to free 
speech elsewhere?

Jim

On September 14, 2018 6:10:47 AM EDT, Chris Travers  
wrote:
>On Fri, Sep 14, 2018 at 11:45 AM Ilya Kosmodemiansky 
>wrote:
>
>> On Fri, Sep 14, 2018 at 10:31 AM, Chris Travers
>
>> wrote:
>> > I really have to object to this addition:
>> > "This Code is meant to cover all interaction between community
>members,
>> > whether or not it takes place within postgresql.org infrastructure,
>so
>> long
>> > as there is not another Code of Conduct that takes precedence (such
>as a
>> > conference's Code of Conduct)."
>> >
>> > That covers things like public twitter messages over live political
>> > controversies which might not be personally directed.   At least if
>one
>> is
>> > going to go that route, one ought to *also* include a safe harbor
>for
>> > non-personally-directed discussions of philosophy, social issues,
>and
>> > politics.  Otherwise, I think this is asking for trouble.  See, for
>> example,
>> > what happened with Opalgate and how this could be seen to encourage
>use
>> of
>> > this to silence political controversies unrelated to PostgreSQL.
>>
>> I think, this point has nothing to do with _correct_ discussions or
>> public tweets.
>>
>> If one community member tweets publicly and in a way which abuses
>> other community members, it is obvious CoC violation. It is hard to
>> imagine healthy community if someone interacts with others  correctly
>> on the list or at a conference because the CoC stops him doing things
>> which he will do on private capacity to the same people when CoC
>> doesnt apply.
>>
>> If someone reports CoC violation just because other community
>member's
>> _correct_ public tweet or whatsoever  expressed different
>> political/philosophical/religious views, this is a quite different
>> story. I suppose CoC committee and/or Core team in this case should
>> explain the reporter the purpose of CoC rather than automatically
>> enforce it.
>>
>
>So first, I think what the clause is trying to do is address cases
>where
>harassment targeting a particular community member takes place outside
>the
>infrastructure and frankly ensuring that the code of conduct applies in
>these cases is important and something I agree with.
>
>However, let's look at problem cases:
>
>"I am enough of a Marxist to see gender as a qualitative relationship
>to
>biological reproduction and maybe economic production too."
>
>I can totally imagine someone arguing that such a tweet might be
>abusive,
>and certainly not "correct."
>
>Or consider:
>
>"The effort to push GLBT rights on family-business economies is nothing
>more than an effort at corporate neocolonialism."
>
>Which would make the problem more clear.  Whether or not a comment like
>that occurring outside postgresql.org infrastructure would be
>considered
>"correct" or "abusive" is ultimately a political decision and something
>which, once that fight is picked, has no reasonable solution in an
>international and cross-cultural product (where issues like sexuality,
>economics, and how gender and individualism intersect will vary
>dramatically across members around the world).  There are people who
>will
>assume that both of the above statements are personally offensive and
>attacks on the basis of gender identity even if they are critiques of
>political agendas severable from that.  Worse, the sense of attack
>themselves could be seen as attacks on culture or religions of other
>participants.
>
>Now neither of these comments would be tolerated as viewpoints
>expressed on
>PostgreSQL.org email lists because they are off-topic, but once one
>expands
>the code of conduct in this way they become fair game.  Given the way
>culture war issues are shaping up particularly in the US, I think one
>has
>to be very careful not to set an expectation that this applies to
>literally
>everything that anyone does anywhere.
>
>So maybe something more like:
>
>"Conduct that occurs outside the postgresql.org infrastructure is not
>automatically excluded from enforcement of this code of conduct.  In
>particular if other parties are unable to act, and if it is, on
>balance, in
>the interest of the global community to apply the code of conduct, then
>the
>code of conduct shall apply."
>
>>
>> > --
>> > Best Wishes,
>> > Chris Travers
>> >
>> > Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No
>vendor
>> > lock-in.
>> > http://www.efficito.com/learn_more
>>
>
>
>-- 
>Best Wishes,
>Chris Travers
>
>Efficito:  Hosted Accounting and ERP.  

Re: Can I add Index to make a query faster which involves joins on unnest ?

2018-09-14 Thread Arup Rakshit
Hello Rob,


So how do I improve this query speed?


Thanks,

Arup Rakshit
a...@zeit.io



> On 14-Sep-2018, at 12:27 AM, Rob Sargent  wrote:
> 
> 
> 
>> On Sep 13, 2018, at 12:17 PM, Arup Rakshit > > wrote:
>> 
>> The below query basically gives the result by maintaining the order of the 
>> sizes in the list.
>> 
>> explain analyze select
>> "price_levels"."name",
>> "price_levels"."size"
>> from
>> "price_levels"
>> join unnest(array['M',
>> 'L',
>> 'XL',
>> '2XL',
>> '3XL',
>> '4XL',
>> '5XL',
>> '6XL',
>> 'S']) with ordinality t(size,
>> ord)
>> using (size)
>> order by
>> t.size
>> 
>> 
>> I have a Btree index on the size column.
>> 
>> Explain output is:
>> 
>> Merge Join  (cost=4.61..5165.38 rows=6 width=46) (actual 
>> time=0.157..57.872 rows=6 loops=1)
>>   Merge Cond: ((price_levels.size)::text = t.size)
>>   ->  Index Scan using price_levels_size_idx on price_levels  
>> (cost=0.29..4111.05 rows=6 width=14) (actual time=0.044..25.941 
>> rows=6 loops=1)
>>   ->  Sort  (cost=4.32..4.57 rows=100 width=32) (actual time=0.108..3.946 
>> rows=53289 loops=1)
>> Sort Key: t.size
>> Sort Method: quicksort  Memory: 25kB
>> ->  Function Scan on unnest t  (cost=0.00..1.00 rows=100 width=32) 
>> (actual time=0.030..0.033 rows=9 loops=1)
>> Planning time: 0.667 ms
>> Execution time: 62.846 ms
>> 
>> 
>> 
>> Thanks,
>> 
>> Arup Rakshit
>> a...@zeit.io 
>> 
>> 
> There are not value of size fit it to be a worthwhile key.
>> 
> 



Re: Code of Conduct plan

2018-09-14 Thread Damir Colak
Please take me off this list.


> On Sep 14, 2018, at 05:31, Chris Travers  wrote:
> 
> 
> 
> On Wed, Sep 12, 2018 at 10:53 PM Tom Lane  > wrote:
> I wrote:
> > Stephen Frost mailto:sfr...@snowman.net>> writes:
> >> We seem to be a bit past that timeline...  Do we have any update on when
> >> this will be moving forward?
> >> Or did I miss something?
> 
> > Nope, you didn't.  Folks have been on holiday which made it hard to keep
> > forward progress going, particularly with respect to selecting the initial
> > committee members.  Now that Magnus is back on shore, I hope we can
> > wrap it up quickly --- say by the end of August.
> 
> I apologize for the glacial slowness with which this has all been moving.
> The core team has now agreed to some revisions to the draft CoC based on
> the comments in this thread; see
> 
> https://wiki.postgresql.org/wiki/Code_of_Conduct 
> 
> 
> (That's the updated text, but you can use the diff tool on the page
> history tab to see the changes from the previous draft.)
> 
> I really have to object to this addition:
> "This Code is meant to cover all interaction between community members, 
> whether or not it takes place within postgresql.org  
> infrastructure, so long as there is not another Code of Conduct that takes 
> precedence (such as a conference's Code of Conduct)."
> 
> That covers things like public twitter messages over live political 
> controversies which might not be personally directed.   At least if one is 
> going to go that route, one ought to *also* include a safe harbor for 
> non-personally-directed discussions of philosophy, social issues, and 
> politics.  Otherwise, I think this is asking for trouble.  See, for example, 
> what happened with Opalgate and how this could be seen to encourage use of 
> this to silence political controversies unrelated to PostgreSQL.
> 
> I think we are about ready to announce the initial membership of the
> CoC committee, as well, but that should be a separate post.
> 
> regards, tom lane
> 
> 
> 
> -- 
> Best Wishes,
> Chris Travers
> 
> Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor 
> lock-in.
> http://www.efficito.com/learn_more 


Re: Code of Conduct plan

2018-09-14 Thread Chris Travers
On Fri, Sep 14, 2018 at 11:45 AM Ilya Kosmodemiansky 
wrote:

> On Fri, Sep 14, 2018 at 10:31 AM, Chris Travers 
> wrote:
> > I really have to object to this addition:
> > "This Code is meant to cover all interaction between community members,
> > whether or not it takes place within postgresql.org infrastructure, so
> long
> > as there is not another Code of Conduct that takes precedence (such as a
> > conference's Code of Conduct)."
> >
> > That covers things like public twitter messages over live political
> > controversies which might not be personally directed.   At least if one
> is
> > going to go that route, one ought to *also* include a safe harbor for
> > non-personally-directed discussions of philosophy, social issues, and
> > politics.  Otherwise, I think this is asking for trouble.  See, for
> example,
> > what happened with Opalgate and how this could be seen to encourage use
> of
> > this to silence political controversies unrelated to PostgreSQL.
>
> I think, this point has nothing to do with _correct_ discussions or
> public tweets.
>
> If one community member tweets publicly and in a way which abuses
> other community members, it is obvious CoC violation. It is hard to
> imagine healthy community if someone interacts with others  correctly
> on the list or at a conference because the CoC stops him doing things
> which he will do on private capacity to the same people when CoC
> doesnt apply.
>
> If someone reports CoC violation just because other community member's
> _correct_ public tweet or whatsoever  expressed different
> political/philosophical/religious views, this is a quite different
> story. I suppose CoC committee and/or Core team in this case should
> explain the reporter the purpose of CoC rather than automatically
> enforce it.
>

So first, I think what the clause is trying to do is address cases where
harassment targeting a particular community member takes place outside the
infrastructure and frankly ensuring that the code of conduct applies in
these cases is important and something I agree with.

However, let's look at problem cases:

"I am enough of a Marxist to see gender as a qualitative relationship to
biological reproduction and maybe economic production too."

I can totally imagine someone arguing that such a tweet might be abusive,
and certainly not "correct."

Or consider:

"The effort to push GLBT rights on family-business economies is nothing
more than an effort at corporate neocolonialism."

Which would make the problem more clear.  Whether or not a comment like
that occurring outside postgresql.org infrastructure would be considered
"correct" or "abusive" is ultimately a political decision and something
which, once that fight is picked, has no reasonable solution in an
international and cross-cultural product (where issues like sexuality,
economics, and how gender and individualism intersect will vary
dramatically across members around the world).  There are people who will
assume that both of the above statements are personally offensive and
attacks on the basis of gender identity even if they are critiques of
political agendas severable from that.  Worse, the sense of attack
themselves could be seen as attacks on culture or religions of other
participants.

Now neither of these comments would be tolerated as viewpoints expressed on
PostgreSQL.org email lists because they are off-topic, but once one expands
the code of conduct in this way they become fair game.  Given the way
culture war issues are shaping up particularly in the US, I think one has
to be very careful not to set an expectation that this applies to literally
everything that anyone does anywhere.

So maybe something more like:

"Conduct that occurs outside the postgresql.org infrastructure is not
automatically excluded from enforcement of this code of conduct.  In
particular if other parties are unable to act, and if it is, on balance, in
the interest of the global community to apply the code of conduct, then the
code of conduct shall apply."

>
> > --
> > Best Wishes,
> > Chris Travers
> >
> > Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
> > lock-in.
> > http://www.efficito.com/learn_more
>


-- 
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
lock-in.
http://www.efficito.com/learn_more


Re: Code of Conduct plan

2018-09-14 Thread Ilya Kosmodemiansky
On Fri, Sep 14, 2018 at 10:31 AM, Chris Travers  wrote:
> I really have to object to this addition:
> "This Code is meant to cover all interaction between community members,
> whether or not it takes place within postgresql.org infrastructure, so long
> as there is not another Code of Conduct that takes precedence (such as a
> conference's Code of Conduct)."
>
> That covers things like public twitter messages over live political
> controversies which might not be personally directed.   At least if one is
> going to go that route, one ought to *also* include a safe harbor for
> non-personally-directed discussions of philosophy, social issues, and
> politics.  Otherwise, I think this is asking for trouble.  See, for example,
> what happened with Opalgate and how this could be seen to encourage use of
> this to silence political controversies unrelated to PostgreSQL.

I think, this point has nothing to do with _correct_ discussions or
public tweets.

If one community member tweets publicly and in a way which abuses
other community members, it is obvious CoC violation. It is hard to
imagine healthy community if someone interacts with others  correctly
on the list or at a conference because the CoC stops him doing things
which he will do on private capacity to the same people when CoC
doesnt apply.

If someone reports CoC violation just because other community member's
_correct_ public tweet or whatsoever  expressed different
political/philosophical/religious views, this is a quite different
story. I suppose CoC committee and/or Core team in this case should
explain the reporter the purpose of CoC rather than automatically
enforce it.

> --
> Best Wishes,
> Chris Travers
>
> Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor
> lock-in.
> http://www.efficito.com/learn_more



Re: Code of Conduct plan

2018-09-14 Thread Martin Mueller
I have followed this list for a couple of years, have benefited several times 
from quick and helpful advice,  and wonder whether all this code of conduct 
stuff is a solution in search of a problem. Or, if there is a problem now and 
then, whether an elaborate code does a better job than reminding offenders that 
they’ve crossed a line marked by common decency or common courtesy. I think a 
list manager should have the right to expel repeat offenders. I doubt whether 
‘proceduralizing’ offences against common decency or common courtesy makes it 
easier to police what is always a tricky boundary.

It is possible to spend a lot of time and energy designing bureaucratic 
solution that in the end does little good.  My grandchildren were taught that 
“please and thank you sound so nice  manners are important, be polite” sung 
to the tune of Frère Jacques. They don’t always remember it,  but a longer poem 
wouldn’t help.


From: James Keener 
Date: Friday, September 14, 2018 at 7:52 AM
To: "pgsql-general@lists.postgresql.org" , 
Chris Travers , "i...@dataegret.com" 

Cc: Tom Lane , Stephen Frost , 
"pgsql-generallists.postgresql.org" , 
"pgsql-hack...@lists.postgresql.org" , 
"pgsql-advoc...@lists.postgresql.org" 
Subject: Re: Code of Conduct plan

I find a lot of neo-con/trumpian political stances moronic, short-sighted, and 
anti-intellectual and therefore consider them offensive, an affront on my way 
of life, and a stain on my country.

1) Can I report anyone holding such views and discussing them on a 3rd party 
forum?

2) Could I be reported for saying the above on a 3rd party forum?

Obviously the pg mailing list isn't a place for such discussion, but is being a 
member of this community a deal with the devil to give up my right to free 
speech elsewhere?

Jim
On September 14, 2018 6:10:47 AM EDT, Chris Travers  
wrote:

On Fri, Sep 14, 2018 at 11:45 AM Ilya Kosmodemiansky 
mailto:i...@dataegret.com>> wrote:
On Fri, Sep 14, 2018 at 10:31 AM, Chris Travers 
mailto:chris.trav...@gmail.com>> wrote:
> I really have to object to this addition:
> "This Code is meant to cover all interaction between community members,
> whether or not it takes place within 
> postgresql.org
>  infrastructure, so long
> as there is not another Code of Conduct that takes precedence (such as a
> conference's Code of Conduct)."
>
> That covers things like public twitter messages over live political
> controversies which might not be personally directed.   At least if one is
> going to go that route, one ought to *also* include a safe harbor for
> non-personally-directed discussions of philosophy, social issues, and
> politics.  Otherwise, I think this is asking for trouble.  See, for example,
> what happened with Opalgate and how this could be seen to encourage use of
> this to silence political controversies unrelated to PostgreSQL.

I think, this point has nothing to do with _correct_ discussions or
public tweets.

If one community member tweets publicly and in a way which abuses
other community members, it is obvious CoC violation. It is hard to
imagine healthy community if someone interacts with others  correctly
on the list or at a conference because the CoC stops him doing things
which he will do on private capacity to the same people when CoC
doesnt apply.

If someone reports CoC violation just because other community member's
_correct_ public tweet or whatsoever  expressed different
political/philosophical/religious views, this is a quite different
story. I suppose CoC committee and/or Core team in this case should
explain the reporter the purpose of CoC rather than automatically
enforce it.

So first, I think what the clause is trying to do is address cases where 
harassment targeting a particular community member takes place outside the 
infrastructure and frankly ensuring that the code of conduct applies in these 
cases is important and something I agree with.

However, let's look at problem cases:

"I am enough of a Marxist to see gender as a qualitative relationship to 
biological reproduction and maybe economic production too."

I can totally imagine someone arguing that such a tweet might be abusive, and 
certainly not "correct."

Or consider:

"The effort to push GLBT rights on family-business economies is nothing more 
than an effort at corporate neocolonialism."

Which would make the problem more clear.  Whether or not a comment like that 
occurring outside 
postgresql.org
 infrastructure would be considered 

  1   2   >