Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Michael Banck
On Wed, May 20, 2015 at 07:03:26PM -0400, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Michael Banck wrote: The other set of users I could think of are those who, for whatever reason, tend to always compile PostgreSQL from source for their company/organization. Maybe

Re: [HACKERS] Change pg_cancel_*() to ignore current backend

2015-05-20 Thread Andres Freund
On 2015-05-20 18:48:59 -0500, Jim Nasby wrote: and generally if you want to terminate the connection there's easier ways to do that then SELECT pg_terminate_backend(pg_backend_pid()). Which would be what exactly? Say, you're inside a security definer function. -- Sent via pgsql-hackers

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.

2015-05-20 Thread Peter Geoghegan
On Wed, May 20, 2015 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Hm, I just realized that the command tag for INSERT ON CONFLICT is still just INSERT. Is that okay? To me, the behavior is different enough that it should have its own tag. I'm not too set on this, but maybe

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Michael Banck wrote: The other set of users I could think of are those who, for whatever reason, tend to always compile PostgreSQL from source for their company/organization. Maybe they have internal rules that requires a custom installation

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: On 2015-05-20 15:42:23 -0400, Stephen Frost wrote: So the first thing to establish is other than Volker himself, who are we helping here? I don't agree with this either. Providing a bypass all authentication configuration option

Re: [HACKERS] anole: assorted stability problems

2015-05-20 Thread Jim Nasby
On 5/20/15 3:09 PM, Tom Lane wrote: Andres Freund and...@anarazel.de writes: On 2015-05-20 16:44:12 -0300, Alvaro Herrera wrote: Andres Freund wrote: Lots? As far as I can tell, this is the only Itanium machine in the buildfarm. ... (It's times like this that I regret not working for Red

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Andres Freund
On 2015-05-20 19:46:12 -0400, Stephen Frost wrote: In other words, I agree with you that we can't simply get rid of 'trust' without having another solution. I *do* believe that a real single-user mode that is only available to the owner of the cluster would go a long way towards this goal. I

Re: [HACKERS] Change pg_cancel_*() to ignore current backend

2015-05-20 Thread Jim Nasby
On 5/20/15 6:56 PM, Andres Freund wrote: On 2015-05-20 18:48:59 -0500, Jim Nasby wrote: and generally if you want to terminate the connection there's easier ways to do that then SELECT pg_terminate_backend(pg_backend_pid()). Which would be what exactly? Say, you're inside a security definer

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Jim Nasby
On 5/20/15 7:19 PM, Stephen Frost wrote: * Andres Freund (and...@anarazel.de) wrote: On 2015-05-20 19:46:12 -0400, Stephen Frost wrote: In other words, I agree with you that we can't simply get rid of 'trust' without having another solution. I*do* believe that a real single-user mode that

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.

2015-05-20 Thread Tom Lane
Andres Freund and...@anarazel.de writes: You realize there's other instances of this in the same damn function? Not to mention that several places in libpq/fe-exec.c should be taught about this new tag. And who-knows-what in other client-side libraries. I am not really sure that it was a good

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Michael Banck
On Wed, May 20, 2015 at 02:10:30PM -0400, Tom Lane wrote: One reason why it would not be, if it's a build-time decision, is that it's quite unlikely that any popular packagers would build that way. So this would only be applicable to custom-built binaries, which is a pretty small class of

Re: [HACKERS] Change pg_cancel_*() to ignore current backend

2015-05-20 Thread Andres Freund
On 2015-05-20 20:38:51 -0400, Tom Lane wrote: Jim Nasby jim.na...@bluetreble.com writes: On 5/20/15 6:56 PM, Andres Freund wrote: On 2015-05-20 18:48:59 -0500, Jim Nasby wrote: and generally if you want to terminate the connection there's easier ways to do that then SELECT

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.

2015-05-20 Thread Andres Freund
On 2015-05-20 15:21:49 -0700, Peter Geoghegan wrote: On Wed, May 20, 2015 at 3:14 PM, Peter Geoghegan p...@heroku.com wrote: I think you're right. The initial commit neglected to update that, and only handled it from ProcessQuery(). So it works for PlannedStmts, not raw parse trees.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.

2015-05-20 Thread Andres Freund
On 2015-05-20 21:22:08 -0400, Tom Lane wrote: Not to mention that several places in libpq/fe-exec.c should be taught about this new tag. And who-knows-what in other client-side libraries. I am not really sure that it was a good idea to invent this command tag. In fact, I'm pretty sure it

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.

2015-05-20 Thread Peter Geoghegan
On Wed, May 20, 2015 at 3:09 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Are you using an old psql? I thought that that would just result in no command tag being displayed. Well, I'm using an editor to read the code of CreateCommandTag(), not executing anything. I guess that function

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.

2015-05-20 Thread Peter Geoghegan
On Wed, May 20, 2015 at 3:14 PM, Peter Geoghegan p...@heroku.com wrote: I think you're right. The initial commit neglected to update that, and only handled it from ProcessQuery(). So it works for PlannedStmts, not raw parse trees. Attached patch fixes this. Thanks for the report. -- Peter

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Alvaro Herrera
Michael Banck wrote: On Wed, May 20, 2015 at 02:10:30PM -0400, Tom Lane wrote: One reason why it would not be, if it's a build-time decision, is that it's quite unlikely that any popular packagers would build that way. So this would only be applicable to custom-built binaries, which is a

Re: [HACKERS] Change pg_cancel_*() to ignore current backend

2015-05-20 Thread Jim Nasby
On 5/20/15 11:15 AM, Jon Nelson wrote: On Wed, May 20, 2015 at 9:09 AM, Tom Lane t...@sss.pgh.pa.us wrote: I think backwards compatibility probably trumps that argument. I have no objection to providing a different call that behaves this way, but changing the behavior of existing applications

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Stephen Frost
* Michael Banck (mba...@gmx.net) wrote: On Wed, May 20, 2015 at 07:03:26PM -0400, Tom Lane wrote: I think Andres' point about trust being an essential disaster recovery mode is something to consider, as well. That puts pretty strict limits on what would be a credible replacement. Then

Re: [HACKERS] recovery_target_action doesn't work for anything but shutdown

2015-05-20 Thread Fujii Masao
On Thu, Mar 12, 2015 at 11:53 PM, Andres Freund and...@2ndquadrant.com wrote: On 2015-03-12 15:52:02 +0100, Andres Freund wrote: I guess what you actually intended to test was StandbyModeRequested? Err, EnableHotStandby. Pushed the fix. Regards, -- Fujii Masao -- Sent via pgsql-hackers

Re: [HACKERS] recovery_target_action = pause hot_standby = off

2015-05-20 Thread Fujii Masao
On Mon, Mar 16, 2015 at 7:39 PM, Andres Freund and...@2ndquadrant.com wrote: On 2015-03-16 07:52:20 +, Simon Riggs wrote: On 15 March 2015 at 22:38, Andres Freund and...@2ndquadrant.com wrote: Sorry, I don't buy this. If I have recovery_target_action = 'pause' in the config file, I want

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.

2015-05-20 Thread Peter Geoghegan
On Wed, May 20, 2015 at 6:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: I am not really sure that it was a good idea to invent this command tag. In fact, I'm pretty sure it was a *bad* idea --- what will happen if we ever create a statement actually named UPSERT? Why would we invent a statement

Re: [HACKERS] RFC: Non-user-resettable SET SESSION AUTHORISATION

2015-05-20 Thread Robert Haas
On Wed, May 20, 2015 at 8:22 PM, Jim Nasby jim.na...@bluetreble.com wrote: It might be a good idea to do something like this, but it's significantly more complicated than a protocol-level SET SESSION AUTHORIZATION. Right now, you can never go backwards from an authenticated state to an

Re: [HACKERS] Typo in tablecmds.c

2015-05-20 Thread Etsuro Fujita
On 2015/05/20 22:59, Heikki Linnakangas wrote: On 05/20/2015 12:40 PM, Etsuro Fujita wrote: The attached patch fixes a typo in a comment in tablecmds.c. Fixed, along with dozens more similar typos I found with some grepping. Thanks for doint that completely! Best regards, Etsuro Fujita

Re: [HACKERS] Issues in Replication Progress Tracking

2015-05-20 Thread Amit Kapila
On Thu, May 21, 2015 at 12:42 AM, Andres Freund and...@anarazel.de wrote: On 2015-05-20 19:27:05 +0530, Amit Kapila wrote: 13. In function replorigin_session_setup() and or replorigin_session_advance(), don't we need to WAL log the use of Replication state? No, the point is that the

Re: [HACKERS] Change pg_cancel_*() to ignore current backend

2015-05-20 Thread Alvaro Herrera
Jim Nasby wrote: BTW, is there a reason we're putting function SQL in that file other than it was a convenient place? Probably not. I've looked at that file wondering the same thing a number of times ... -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development,

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Robert Haas
On Wed, May 20, 2015 at 7:09 PM, Michael Banck mba...@gmx.net wrote: I think Andres' point about trust being an essential disaster recovery mode is something to consider, as well. That puts pretty strict limits on what would be a credible replacement. Then let's rename it from `trust' to

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.

2015-05-20 Thread Peter Geoghegan
On Wed, May 20, 2015 at 6:12 PM, Andres Freund and...@anarazel.de wrote: You realize there's other instances of this in the same damn function? I was misled by the argument name, parsetree -- in the past, CreateCommandTag() actually only processed raw parse trees. Beyond that, I wasn't aware

Re: [HACKERS] [COMMITTERS] pgsql: Add pg_audit, an auditing extension

2015-05-20 Thread Noah Misch
On Thu, May 14, 2015 at 01:38:49PM -0400, Tom Lane wrote: * The comments in the code betray utter ignorance of how logging actually works, in particular this: * Administrators can choose which log level the audit log is to be logged * at. The default level is LOG, which goes into the

Re: [HACKERS] a few thoughts on the schedule

2015-05-20 Thread Noah Misch
On Wed, May 20, 2015 at 09:15:14AM -0400, Simon Riggs wrote: On 20 May 2015 at 03:13, Noah Misch n...@leadboat.com wrote: Brief committer appraisals are unhelpful individually, but patterns matter. I would make the questionnaire as simple as necessary to get 4-7 committer evaluations per

Re: [HACKERS] Problems with question marks in operators (JDBC, ECPG, ...)

2015-05-20 Thread Bruno Harbulot
On Tue, May 19, 2015 at 10:31 PM, Greg Sabino Mullane g...@turnstep.com wrote: If you are running into situations where you have question mark operators in your queries, you have already lost the query abstraction battle. There will be no seamless switching if you are using jsonb, hstore,

Re: [HACKERS] RFC: Non-user-resettable SET SESSION AUTHORISATION

2015-05-20 Thread Robert Haas
On Tue, May 19, 2015 at 5:02 PM, Simon Riggs si...@2ndquadrant.com wrote: That's a reasonable argument. So +1 to protocol from me. To satisfy Tom, I think this would need to have two modes: one where the session can never be reset, for ultra security, and one where the session can be reset,

Re: [HACKERS] Disabling trust/ident authentication configure option

2015-05-20 Thread Robert Haas
On Wed, May 20, 2015 at 4:20 AM, Volker Aßmann volker.assm...@gmail.com wrote: On Tue, May 19, 2015 at 1:53 AM, Robert Haas robertmh...@gmail.com wrote: On May 18, 2015, at 3:32 PM, Volker Aßmann volker.assm...@gmail.com wrote: I know these measures won't protect against an experienced

<    1   2