Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread David G. Johnston
On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown t...@linux.com wrote: The use-case I have in mind is for finding out how close to the 32-bit integer limit sequences have reached. At the moment, this isn't possible without creating a custom function to go fetch the last_value from the specified

Re: [HACKERS] Support retrieving value from any sequence

2015-07-14 Thread David G. Johnston
On Tue, Jul 14, 2015 at 11:05 AM, Thom Brown t...@linux.com wrote: On 14 July 2015 at 16:02, David G. Johnston david.g.johns...@gmail.com wrote: On Tue, Jul 14, 2015 at 10:52 AM, Thom Brown t...@linux.com wrote: The use-case I have in mind is for finding out how close to the 32-bit integer

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread David G. Johnston
On Sunday, June 28, 2015, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-06-28 14:26 GMT+02:00 Tomas Vondra tomas.von...@2ndquadrant.com javascript:_e(%7B%7D,'cvml','tomas.von...@2ndquadrant.com');: Hi, On 06/28/2015 08:01 AM, Pavel Stehule wrote: you can use PL/pgSQL - but there

Re: [HACKERS] Conflict between REL9_4_STABLE and master branch.

2015-06-26 Thread David G. Johnston
On Fri, Jun 26, 2015 at 11:22 AM, Uriy Zhuravlev u.zhurav...@postgrespro.ru wrote: Hello hackers. I found a strange thing. I hope it's not on purpose. Example: git clone git://git.postgresql.org/git/postgresql.git cd postgresql git checkout -b remotes/origin/REL9_4_STABLE git merge

Re: [HACKERS] Removing SSL renegotiation (Was: Should we back-patch SSL renegotiation fixes?)

2015-06-26 Thread David G. Johnston
On Fri, Jun 26, 2015 at 3:09 PM, Andres Freund and...@anarazel.de wrote: On 2015-06-24 16:41:48 +0200, Andres Freund wrote: I, by now, have come to a different conclusion. I think it's time to entirely drop the renegotiation support. I think by now we essentially concluded that we should

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-06-22 Thread David G. Johnston
On Mon, Jun 22, 2015 at 4:09 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jun 22, 2015 at 1:59 PM, David G. Johnston david.g.johns...@gmail.com wrote: In addition to the codes themselves I think it would aid less-experienced operators if we would provide a meta-data categorization

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-06-22 Thread David G. Johnston
On Mon, Jun 22, 2015 at 1:37 PM, Robert Haas robertmh...@gmail.com wrote: and doesn't require a developer to interpret the results, ​[...]​ We could also invent codes for things like I'm doing a pg_usleep because I've exceeded max_spins_per_delay and I'm waiting for a cleanup lock on a

Re: [HACKERS] [CORE] Restore-reliability mode

2015-06-08 Thread David G. Johnston
On Mon, Jun 8, 2015 at 12:03 PM, Claudio Freire klaussfre...@gmail.com wrote: Just *when* is git ready for testing? You don't know from the outside. I do lurk here a lot and still am unsure quite often. Even simply releasing an alpha *tarball* would be useful enough. What is needed is the

Re: [HACKERS] [CORE] Restore-reliability mode

2015-06-08 Thread David G. Johnston
On Mon, Jun 8, 2015 at 12:14 PM, Geoff Winkless pgsqlad...@geoff.dj wrote: On 8 June 2015 at 17:03, Claudio Freire klaussfre...@gmail.com wrote: It's not about the 5 minutes of compile time, it's about the signalling. Just *when* is git ready for testing? You don't know from the outside. I

Re: [HACKERS] Can we add syntax for references auto create index or not.

2015-05-27 Thread David G. Johnston
On Tue, May 26, 2015 at 7:03 PM, digoal zhou digoal.z...@gmail.com wrote: When we create table, some column use foreign key references. Now PostgreSQL don't create index for the FK, and there is no problem. But when some body need the index to speed up the query within these APP, they need to

Re: [HACKERS] Can we add syntax for references auto create index or not.

2015-05-27 Thread David G. Johnston
On Wednesday, May 27, 2015, digoal zhou digoal.z...@gmail.com wrote: 2015-05-28 1:41 GMT+08:00 David G. Johnston david.g.johns...@gmail.com javascript:_e(%7B%7D,'cvml','david.g.johns...@gmail.com');: On Tue, May 26, 2015 at 7:03 PM, digoal zhou digoal.z...@gmail.com javascript:_e(%7B%7D

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

2015-05-20 Thread David G. Johnston
On Wed, May 20, 2015 at 8:29 AM, Bruno Harbulot br...@distributedmatter.net wrote: On Tue, May 19, 2015 at 10:50 PM, David G. Johnston david.g.johns...@gmail.com wrote: On Tue, May 19, 2015 at 2:34 PM, Bruno Harbulot br...@distributedmatter.net wrote: While I can imagine a Java

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

2015-05-19 Thread David G. Johnston
On Tue, May 19, 2015 at 4:23 PM, Marko Tiikkaja ma...@joh.to wrote: On 2015-05-20 00:59, Jim Nasby wrote: I find it annoying to have to specifically exclude pg_backend_pid() from pg_stat_activity if I'm trying to kill a bunch of backends at once, and I can't think of any reason why you'd

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

2015-05-19 Thread David G. Johnston
On Tue, May 19, 2015 at 1:36 PM, Kevin Grittner kgri...@ymail.com wrote: Gavin Flower gavinflo...@archidevsys.co.nz wrote: I prefer the $1 approach, others can't use that, and there are situations where I could not either. So, how about defaulting to the '?' approach, but have a method

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

2015-05-19 Thread David G. Johnston
On Tue, May 19, 2015 at 2:34 PM, Bruno Harbulot br...@distributedmatter.net wrote: While I can imagine a Java PostgreSQL driver that would use the libpq syntax, I can't see it being able to have any useful sort of half-compatibility with JDBC, whether it mimics its interfaces or not. I'm

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

2015-05-17 Thread David G. Johnston
On Sun, May 17, 2015 at 9:15 AM, Greg Sabino Mullane g...@turnstep.com wrote: Dave Cramer wrote: Well our solution was to use ?? but that does mean we have to do some extra parsing which in a perfect world wouldn't be necessary. That's not a good solution as '??' is a perfectly valid

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

2015-05-15 Thread David G. Johnston
On Fri, May 15, 2015 at 1:45 PM, Dave Cramer p...@fastcrypt.com wrote: On 15 May 2015 at 16:44, Dave Cramer p...@fastcrypt.com wrote: On 15 May 2015 at 16:41, Robert Haas robertmh...@gmail.com wrote: On Fri, May 15, 2015 at 4:38 PM, Dave Cramer p...@fastcrypt.com wrote: I don't really

Re: [HACKERS] trust authentication behavior

2015-05-14 Thread David G. Johnston
On Thu, May 14, 2015 at 2:16 AM, Denis Kirjanov k...@itsirius.su wrote: Hello guys, Is it possible to restrict the trust auth method to accept local connections only using the selinux policy? You want selinux to prevent trust connections from non-local clients even if pg_hba.conf explicitly

Re: [HACKERS] trust authentication behavior

2015-05-14 Thread David G. Johnston
On Thu, May 14, 2015 at 12:22 PM, Denis Kirjanov k...@itsirius.su wrote: Yeah, but the idea is to do that without the pg_hba.conf You may want to try describing the problem and not just ask if the chosen solution is possible - of which I am doubtful but I have never used selinux or studied it

[HACKERS] Silent Data Manipulation - Time(stamp) w/o Time Zone Literals w/ TZ

2015-05-12 Thread David G. Johnston
​​In a literal that has been determined to be timestamp without time zone, PostgreSQL will silently ignore any time zone indication. That is, the resulting value is derived from the date/time fields in the input value, and is not adjusted for time zone.​​​

Re: [HACKERS] PATCH: pgbench allow '=' in \set

2015-05-07 Thread David G. Johnston
On Thu, May 7, 2015 at 11:43 AM, Fabien COELHO coe...@cri.ensmp.fr wrote: Hello, \set id = 1 + abs((:id * 1021) % (10 * :scale)) seems slightly better than: \set id 1 + abs((:id * 1021) % (10 * :scale)) It is question :( - it break a consistency with psql It actually

Re: [HACKERS] Fixing busted citext function declarations

2015-05-07 Thread David G. Johnston
On Thu, May 7, 2015 at 4:19 PM, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: On Thu, May 7, 2015 at 04:19:52PM -0400, Bruce Momjian wrote: Just a reality check but this will break a pg_upgrade, and will not be detected by --check. Actually, pg_upgrade might

Re: [HACKERS] Fixing busted citext function declarations

2015-05-05 Thread David G. Johnston
On Tue, May 5, 2015 at 10:20 AM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: (I think it is possible that the behavior change is actually problematic as opposed to just behaving differently. For instance, if the function is used in a subselect that's

Re: [HACKERS] CTE optimization fence on the todo list?

2015-05-01 Thread David G. Johnston
On Fri, May 1, 2015 at 3:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: Assuming that that sketch is accurate, it would take more code to provide a new user-visible knob to enable/disable the behavior than it would to implement the optimization, which makes me pretty much -1 on providing such a

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread David G. Johnston
On Tue, Apr 28, 2015 at 9:58 AM, Stephen Frost sfr...@snowman.net wrote: * Peter Geoghegan (p...@heroku.com) wrote: On Tue, Apr 28, 2015 at 9:42 AM, Stephen Frost sfr...@snowman.net wrote: I agree with that, but how are NEW and OLD ambiguous? NEW is clearly the tuple being added, while

Re: [HACKERS] Shouldn't CREATE TABLE LIKE copy the relhasoids property?

2015-04-25 Thread David G. Johnston
On Saturday, April 25, 2015, Tom Lane t...@sss.pgh.pa.us wrote: It's perhaps debatable whether it should act that way, but in the absence of complaints from the field, I'm hesitant to change these cases. It might be better if the effective behavior were table gets OIDs if default_with_oids

Re: [HACKERS] [BUGS] Failure to coerce unknown type to specific type

2015-04-23 Thread David G. Johnston
On Thursday, April 23, 2015, Jeff Davis pg...@j-davis.com wrote: On Thu, Apr 23, 2015 at 1:49 AM, David G. Johnston david.g.johns...@gmail.com javascript:; wrote: Reading and writing all this I'm convinced you have gotten the idea in your mind an expectation of equivalency and consistency

Re: [HACKERS] [BUGS] Failure to coerce unknown type to specific type

2015-04-23 Thread David G. Johnston
On Thu, Apr 23, 2015 at 1:35 AM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Very sorry for the trash.. === Now I found a comment at just where I patched, * XXX if the typinput function is not immutable, we really ought to * postpone evaluation of the function call until

Re: [HACKERS] [BUGS] Failure to coerce unknown type to specific type

2015-04-23 Thread David G. Johnston
On Thu, Apr 23, 2015 at 1:07 AM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Hello, I think this is a bug. The core of this problem is that coerce_type() fails for Var of type UNKNOWNOID. The comment for the function says that, * The caller should already have determined

Re: [HACKERS] [BUGS] Failure to coerce unknown type to specific type

2015-04-23 Thread David G. Johnston
On Wednesday, April 22, 2015, Jeff Davis pg...@j-davis.com wrote: On Wed, 2015-04-22 at 20:35 -0700, David G. Johnston wrote: But the fact that column b has the data type unknown is only a warning - not an error. I get an error: postgres=# SELECT ' '::text = 'a'; ?column

Re: [HACKERS] [BUGS] Failure to coerce unknown type to specific type

2015-04-23 Thread David G. Johnston
On Thu, Apr 23, 2015 at 1:49 AM, David G. Johnston david.g.johns...@gmail.com wrote: On Wednesday, April 22, 2015, Jeff Davis pg...@j-davis.com wrote: On Wed, 2015-04-22 at 20:35 -0700, David G. Johnston wrote: ​My gut reaction is if you feel strongly enough to add some additional

Re: [HACKERS] [BUGS] Failure to coerce unknown type to specific type

2015-04-22 Thread David G. Johnston
My apologies if much of this is already assumed knowledge by most -hackers...I'm trying to learn from observation instead of, largely, reading code in a foreign language. On Wed, Apr 22, 2015 at 6:40 PM, Jeff Davis pg...@j-davis.com wrote: Moving thread to -hackers. On Wed, Apr 8, 2015 at

Re: [HACKERS] Allow SQL/plpgsql functions to accept record

2015-04-20 Thread David G. Johnston
On Sun, Apr 19, 2015 at 3:02 PM, Jim Nasby jim.na...@bluetreble.com wrote: Is there a fundamental reason SQL/plpgsql functions won't accept record as an input type? If not, can someone point me at a patch that might show how much work would be involved in adding support? My particular use

Re: [HACKERS] FILTER/WITHIN GROUP vs. expressions; is a HINT possible here?

2015-04-16 Thread David G. Johnston
On Thu, Apr 16, 2015 at 1:06 PM, Josh Berkus j...@agliodbs.com wrote: On 04/16/2015 01:01 PM, David G. Johnston wrote: If this is not covered adequately enough in the documentation then that should be remedied. Did you evaluate the documentation in that light while preparing your blog

Re: [HACKERS] FILTER/WITHIN GROUP vs. expressions; is a HINT possible here?

2015-04-16 Thread David G. Johnston
On Thu, Apr 16, 2015 at 12:22 PM, Josh Berkus j...@agliodbs.com wrote: Folks: SELECT device_id, count(*)::INT as present, count(*)::INT FILTER (WHERE valid) as valid_count, mode()::INT WITHIN GROUP (order by val) as mode,

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-09 Thread David G. Johnston
On Thursday, April 9, 2015, Magnus Hagander mag...@hagander.net wrote: On Thu, Apr 9, 2015 at 2:20 PM, Tom Lane t...@sss.pgh.pa.us javascript:_e(%7B%7D,'cvml','t...@sss.pgh.pa.us'); wrote: Magnus Hagander mag...@hagander.net javascript:_e(%7B%7D,'cvml','mag...@hagander.net'); writes: On

Re: [HACKERS] rejected vs returned with feedback in new CF app

2015-04-08 Thread David G. Johnston
On Tue, Apr 7, 2015 at 12:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: I tried to mark the UPDATE SET (*) patch as returned with feedback, but the CF app informed me that if I did that the patch would automatically be moved to the next commitfest. That seems completely stupid. There is no need

Re: [HACKERS] pg_restore -t should match views, matviews, and foreign tables

2015-04-07 Thread David G. Johnston
On Tue, Apr 7, 2015 at 1:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 3/31/15 11:01 PM, Craig Ringer wrote: this patch adds support for views, foreign tables, and materialised views to the pg_restore -t flag. I think this is a good change. Any

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread David G. Johnston
On Sat, Mar 28, 2015 at 3:59 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Sun, Mar 29, 2015 at 5:34 AM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: On 28/03/15 21:58, Dean Rasheed wrote: [...] Andrew mentioned that there have been complaints from people doing

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-22 Thread David G. Johnston
On Sunday, March 22, 2015, David Steele da...@pgmasters.net wrote: On 3/20/15 3:37 PM, Tom Lane wrote: =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= fabriziome...@gmail.com javascript:; writes: On Fri, Mar 20, 2015 at 4:19 PM, Peter Geoghegan p...@heroku.com javascript:; wrote: On Fri, Mar

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-22 Thread David G. Johnston
On Sunday, March 22, 2015, Florian Weimer f...@deneb.enyo.de wrote: * David G. Johnston: ​enables or disables data durability ​promise of ACID. ? “fsync = on” only works if the storage stack doesn't do funny things. Depending on the system, it might not be sufficient. Allows

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-21 Thread David G. Johnston
On Sat, Mar 21, 2015 at 8:54 AM, Tom Lane t...@sss.pgh.pa.us wrote: Stephen Frost sfr...@snowman.net writes: At the moment, one could look at our default postgresql.conf and the turns forced synchronization on or off and think it's something akin or somehow related to synchronous_commit

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread David G. Johnston
On Friday, March 20, 2015, Bruce Momjian br...@momjian.us wrote: On Fri, Mar 20, 2015 at 05:50:03PM -0700, David G. Johnston wrote: ​I'm not sure that this particular feature of the standard is something we should encourage. Its actually quite useful in this situation, and so maybe

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread David G. Johnston
On Fri, Mar 20, 2015 at 1:47 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Bruce Momjian wrote: On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: 1. The layout of the format version is different, with respect to newlines, than the quote version; but while using

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread David G. Johnston
On Thu, Mar 19, 2015 at 6:49 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Mar 19, 2015 at 06:05:52PM -0700, David G. Johnston wrote: On Thu, Mar 19, 2015 at 5:18 PM, Bruce Momjian br...@momjian.us wrote: ​​ There are other places later in the docs where we explain all the quote

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread David G. Johnston
​Looking at ​ http://momjian.us/tmp/pgsql/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN The paired example at the top of the patch has two things worth considering. 1. The layout of the format version is different, with respect to newlines, than the quote version; but while using

Re: [HACKERS] [PATCH] two-arg current_setting() with fallback

2015-03-20 Thread David G. Johnston
On Fri, Mar 20, 2015 at 9:04 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 20, 2015 at 10:54 AM, David Christensen da...@endpoint.com wrote: In that case, the other thought I had here is that we change the function signature of current_setting() to be a two-arg form where the

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-19 Thread David G. Johnston
On Thu, Mar 19, 2015 at 5:18 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Mar 19, 2015 at 04:01:32PM -0700, David G. Johnston wrote: ​Prefacing it with: You may also see the following syntax in the wild since format was only recently introduced.​ ​may solve your lack of reason

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-19 Thread David G. Johnston
On Thu, Mar 19, 2015 at 3:38 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Oct 2, 2014 at 09:06:54PM -0700, David G Johnston wrote: Jim Nasby-5 wrote On 10/2/14, 6:51 AM, Pavel Stehule wrote: EXECUTE format('UPDATE tbl SET %I = newvalue WHERE key = %L

Re: [HACKERS] Question about TEMP tables

2015-03-18 Thread David G. Johnston
On Tuesday, March 17, 2015, Воронин Дмитрий carriingfat...@yandex.ru wrote: Make sure to show your full command(s) and the full, exact text of any errors. OK, I use PostgreSQL version 9.4.1. I create cluster 'main' and connect to it. After cluster init we have those shemas: postgres=#

Re: [HACKERS] Providing catalog view to pg_hba.conf file - Patch submission

2015-03-16 Thread David G. Johnston
On Mon, Mar 16, 2015 at 9:29 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas wrote: On Wed, Mar 11, 2015 at 1:32 PM, Greg Stark st...@mit.edu wrote: I think what we have here is already a good semantic representation. It doesn't handle all the corner cases but those corner

Re: [HACKERS] Providing catalog view to pg_hba.conf file - Patch submission

2015-03-16 Thread David G. Johnston
On Mon, Mar 16, 2015 at 11:11 AM, Greg Stark st...@mit.edu wrote: On Mon, Mar 16, 2015 at 5:46 PM, David G. Johnston david.g.johns...@gmail.com wrote: ​Why not just leave the double-quoting requirements intact. An unquoted any or sameuser (etc) would represent the special keyword while

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-03-13 Thread David G. Johnston
On Fri, Mar 13, 2015 at 10:01 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-03-13 17:39 GMT+01:00 Robert Haas robertmh...@gmail.com: On Fri, Mar 13, 2015 at 11:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: we found possible bug in pg_dump. It raise a error only when all

Re: [HACKERS] Precedence of standard comparison operators

2015-03-10 Thread David G. Johnston
On Tue, Mar 10, 2015 at 9:37 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 10, 2015 at 12:11 PM, Tom Lane t...@sss.pgh.pa.us wrote: Do we have consensus on doing this? Should we have the warning on by default, or off? I vote for defaulting the warning to off. If that proves

Re: [HACKERS] object description for FDW user mappings

2015-03-05 Thread David G Johnston
Tom Lane-2 wrote Amit Langote lt; Langote_Amit_f8@.co gt; writes: By the way, in this case, is foo the name/id of a local user or does it really refer to some foo on the remote server? It's the name of a local user. I see your point that somebody might misread this as suggesting that

Re: [HACKERS] logical column ordering

2015-02-27 Thread David G Johnston
Tomas Vondra-4 wrote But if we want to allow users to define this, I'd say let's make that part of CREATE TABLE, i.e. the order of columns defines logical order, and you use something like 'AFTER' to specify physical order. CREATE TABLE test ( a INT AFTER b,-- attlognum = 1,

Re: [HACKERS] logical column ordering

2015-02-27 Thread David G Johnston
David G Johnston wrote Tomas Vondra-4 wrote But if we want to allow users to define this, I'd say let's make that part of CREATE TABLE, i.e. the order of columns defines logical order, and you use something like 'AFTER' to specify physical order. CREATE TABLE test ( a INT

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-02-19 Thread David G. Johnston
On Thu, Feb 19, 2015 at 11:10 AM, David Fetter da...@fetter.org wrote: On Wed, Feb 18, 2015 at 08:31:09PM -0700, David G. Johnston wrote: On Wed, Feb 18, 2015 at 6:50 PM, Andrew Dunstan and...@dunslane.net wrote: On 02/18/2015 08:34 PM, David Fetter wrote: On Tue, Feb 17, 2015 at 08

Re: [HACKERS] Add pg_settings.pending_restart column

2015-02-15 Thread David G Johnston
Peter Eisentraut-2 wrote So here is a patch for that. It adds a column pending_restart to pg_settings that is true when the configuration file contains a changed setting that requires a restart. We already had the logic to detect such changes, for producing the log entry. I have also set it

Re: [HACKERS] restrict global access to be readonly

2015-02-15 Thread David G Johnston
happy times wrote Sure, we can utilize the runtime parameter default_transaction_read_only, however, it does not restrict user from changing transaction attribute to non-readonly mode, so is not safe. ISTM that implementing a means to make this setting only super-user changeable would be a

Re: [HACKERS] enabling nestedloop and disabling hashjon

2015-02-12 Thread David G Johnston
Jim Nasby-5 wrote On 2/10/15 9:29 AM, Tom Lane wrote: Ravi Kiran lt; ravi.kolanpaka@ gt; writes: yes sir, I did try the pg_ctl reload command, but its still using the hash join algorithm and not the nested loop algorithm. I even restarted the server, even then its still using the hash

Re: [HACKERS] Fetch zero result rows when executing a query?

2015-02-07 Thread David G Johnston
On Sat, Feb 7, 2015 at 10:41 AM, Shay Rojansky [via PostgreSQL] ml-node+s1045698n5837082...@n5.nabble.com wrote: Sorry everyone, I was unexpectedly very busy and couldn't respond earlier... My apologies. I'll clarify just a little... I am indeed talking about the PostgreSQL network

Re: [HACKERS] GRANT USAGE on FOREIGN SERVER exposes passwords

2015-02-05 Thread David G Johnston
Tom Lane-2 wrote Stephen Frost lt; sfrost@ gt; writes: * Robert Haas ( robertmhaas@ ) wrote: On Thu, Feb 5, 2015 at 10:48 AM, Stephen Frost lt; sfrost@ gt; wrote: And I thought this was about FDW options and not about dblink, really.. The OP is pretty clearly asking about

Re: [HACKERS] Fetch zero result rows when executing a query?

2015-02-04 Thread David G Johnston
Shay Rojansky wrote The use case would be sending a query which might modify or might not (e.g. UPDATE), but we know that the user is uninterested in any result row. How do you intend to gain this knowledge if the query doesn't structure itself so that it does or does not return actual rows?

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-04 Thread David G Johnston
Tom Lane-2 wrote Kyotaro HORIGUCHI lt; horiguchi.kyotaro@.co gt; writes: The phrase {INDEX | TABLE |..} name seems to me indivisible as target specification. IMHO, the options for VACUUM and so is placed *just after* command name, not *before* the target. If this is right, the syntax

Re: [HACKERS] Release note bloat is getting out of hand

2015-02-02 Thread David G Johnston
On Mon, Feb 2, 2015 at 6:40 PM, Peter Eisentraut-2 [via PostgreSQL] ml-node+s1045698n5836471...@n5.nabble.com wrote: On 2/1/15 11:10 PM, Tom Lane wrote: I think it's time we changed the policy of including all release notes back to the beginning in Appendix E. I share the sentiment that

Re: [HACKERS] How do I bump a row to the front of sort efficiently

2015-02-01 Thread David G Johnston
sam.saffron wrote I have this query: select * from topics order by case when id=1 then 0 else 1 end, bumped_at desc limit 30 It works fine, bumps id 1 to the front of the sort fine but is terribly inefficient and scans OTH select * from topics where id = 1 is super fast select *

Re: [HACKERS] Release note bloat is getting out of hand

2015-02-01 Thread David G Johnston
Tom Lane-2 wrote I propose that we go over to a policy of keeping in HEAD only release notes for actively maintained branches, and that each back branch should retain notes only for branches that were actively maintained when it split off from HEAD. This would keep about five years worth of

Re: [HACKERS] tablespaces inside $PGDATA considered harmful

2015-01-30 Thread David G Johnston
Robert Haas wrote Arguably, we should prohibit it altogether, but there are obviously people that want to do it, and there could even be somewhat valid reasons for that, Lots of hand-waving here and it is just as likely they simply are not aware of the downsides and the only reason they put

Re: [HACKERS] Small bug on CREATE EXTENSION pgq...

2015-01-28 Thread David G Johnston
Jerry Sievers-3 wrote Hackers; I noticed this trying to import a large pg_dump file with warnings supressed. It seems loading pgq sets client_min_messages to warning and leaves it this way which defeats an attempt to change the setting prior and have it stick. I tested with several other

Re: [HACKERS] jsonb, unicode escapes and escaped backslashes

2015-01-28 Thread David G Johnston
Tom Lane-2 wrote Andrew Dunstan lt; andrew@ gt; writes: On 01/27/2015 02:28 PM, Tom Lane wrote: Well, we can either fix it now or suffer with a broken representation forever. I'm not wedded to the exact solution I described, but I think we'll regret it if we don't change the

Re: [HACKERS] Proposal: knowing detail of config files via SQL

2015-01-22 Thread David G Johnston
Tom Lane-2 wrote regression=# alter system reset timezone; ALTER SYSTEM regression=# select pg_reload_conf(); How does someone know that performing the above commands will result in the TimeZone setting being changed from Asia/Shanghai to US/Eastern? David J. -- View this message in

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-01-20 Thread David G Johnston
Andrew Dunstan wrote On 01/20/2015 01:26 PM, Arne Scheffer wrote: And a very minor aspect: The term standard deviation in your code stands for (corrected) sample standard deviation, I think, because you devide by n-1 instead of n to keep the estimator unbiased. How about mentioning the

Re: [HACKERS] Merging postgresql.conf and postgresql.auto.conf

2015-01-16 Thread David G Johnston
Sawada Masahiko wrote On Fri, Jan 16, 2015 at 12:54 PM, Amit Kapila lt; amit.kapila16@ gt; wrote: On Thu, Jan 15, 2015 at 9:48 PM, Sawada Masahiko lt; sawada.mshk@ gt; wrote: On Thu, Jan 15, 2015 at 2:02 PM, Amit Kapila lt; amit.kapila16@ gt; wrote: One thought I have in this

Re: [HACKERS] Safe memory allocation functions

2015-01-12 Thread David G Johnston
Michael Paquier wrote Attached is a patch adding the following set of functions for frontend and backends returning NULL instead of reporting ERROR when allocation fails: - palloc_safe - palloc0_safe - repalloc_safe The only thing I can contribute is paint...I'm not fond of the word _safe

[HACKERS] Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs

2015-01-05 Thread David G Johnston
Atri Sharma wrote If order of result rows is not the same as required, an error is raised: SELECT * FROM incorrect_order_nulls() ORDER BY e NULLS LAST; ERROR: Order not same as specified First reaction for the error was unfavorable but (see below) it likely is the best option and does

Re: [HACKERS] Proposal: two new role attributes and/or capabilities?

2014-12-23 Thread David G Johnston
José Luis Tallón-2 wrote On 12/23/2014 05:29 PM, Stephen Frost wrote: * José Luis Tallón ( jltallon@ ) wrote: * IMPERSONATE --- Ability to do SET AUTHORIZATION TO some_role; and RESET AUTHORIZATION This might be further refined to provide a way to say This role is authorized to

Re: [HACKERS] [COMMITTERS] pgsql: Use a bitmask to represent role attributes

2014-12-23 Thread David G Johnston
José Luis Tallón-2 wrote On 12/23/2014 06:06 PM, Bruce Momjian wrote: On Tue, Dec 23, 2014 at 11:34:09AM -0500, Tom Lane wrote: Stephen Frost lt; sfrost@ gt; writes: If that's the only consideration for this, well, that's certainly quite straight-forward to change in the other direction

Re: [HACKERS] [COMMITTERS] pgsql: Use a bitmask to represent role attributes

2014-12-23 Thread David G Johnston
On Tue, Dec 23, 2014 at 11:44 AM, Stephen Frost [via PostgreSQL] ml-node+s1045698n5831875...@n5.nabble.com wrote: It would be great to figure out a way to get feedback like this earlier on in the development. This patch has been floating around for quite a while, with intentional breaks for

Re: [HACKERS] POLA violation with \c service=

2014-12-19 Thread David G Johnston
On Wed, Dec 17, 2014 at 8:25 AM, David Fetter [via PostgreSQL] ml-node+s1045698n5831124...@n5.nabble.com wrote: On Wed, Dec 17, 2014 at 08:14:04AM -0500, Andrew Dunstan wrote: On 12/17/2014 04:11 AM, Heikki Linnakangas wrote: On 12/17/2014 10:03 AM, Albe Laurenz wrote: David Fetter

Re: [HACKERS] POLA violation with \c service=

2014-12-16 Thread David G Johnston
I do indeed see this behavior in some very quick testing using 9.3 David Fetter wrote I've noticed that psql's \c function handles service= requests in a way that I can only characterize as broken. Looking at the docs the fact it attempts to treat service=foo as anything other than a

Re: [HACKERS] 9.5 release scheduling (was Re: logical column ordering)

2014-12-11 Thread David G Johnston
Tom Lane-2 wrote Robert Haas lt; robertmhaas@ gt; writes: On Thu, Dec 11, 2014 at 1:18 AM, Josh Berkus lt; josh@ gt; wrote: While there were technical issues, 9.4 dragged a considerable amount because most people were ignoring it in favor of 9.5 development. I think 9.4 dragged

Re: [HACKERS] 9.5 release scheduling (was Re: logical column ordering)

2014-12-11 Thread David G Johnston
David G Johnston wrote Tom Lane-2 wrote Robert Haas lt; robertmhaas@ gt; writes: On Thu, Dec 11, 2014 at 1:18 AM, Josh Berkus lt; josh@ gt; wrote: While there were technical issues, 9.4 dragged a considerable amount because most people were ignoring it in favor of 9.5 development

Re: [HACKERS] Commitfest problems

2014-12-11 Thread David G Johnston
Peter Eisentraut-2 wrote On 12/11/14 1:35 AM, Bruce Momjian wrote: I have heard repeated concerns about the commitfest process in the past few months. The fact we have been in a continual commitfest since August also is concerning. I realized the other day, I'm embracing the idea of a

Re: [HACKERS] [COMMITTERS] pgsql: Revert Add libpq function PQhostaddr().

2014-11-29 Thread David G Johnston
Noah Misch-2 wrote On Sat, Nov 29, 2014 at 02:09:09PM -0500, Tom Lane wrote: Noah Misch lt; noah@ gt; writes: Revert Add libpq function PQhostaddr(). This reverts commit 9f80f4835a55a1cbffcda5d23a617917f3286c14. The function returned the raw value of a connection parameter, a task

Re: [HACKERS] Turning recovery.conf into GUCs

2014-11-24 Thread David G Johnston
Stephen Frost wrote * Alvaro Herrera ( alvherre@ ) wrote: Stephen Frost wrote: * Amit Kapila ( amit.kapila16@ ) wrote: What exactly you mean by 'disable postgresql.auto.conf', do you mean user runs Alter System to remove that entry or manually disable some particular entry?

Re: [HACKERS] Role Attribute Bitmask Catalog Representation

2014-11-24 Thread David G Johnston
Adam Brightwell wrote A few related threads/discussions/posts: * http://www.postgresql.org/message-id/ 20141016115914.GQ28859@.snowman * http://www.postgresql.org/message-id/CA+TgmobkYXNOWKEKzX2qGPSr_nvacFGueV= orxND-xmZvOVYvg@.gmail * http://www.postgresql.org/message-id/

Re: [HACKERS] some ideas from users

2014-11-22 Thread David G Johnston
Pavel Stehule wrote : 2014-11-22 12:24 GMT+01:00 Marko Tiikkaja lt; marko@ gt;: On 2014-11-22 12:20 PM, Pavel Stehule wrote: 2. missing table function with all settings. Like SHOW ALL, but with filtering possibility What's wrong with pg_settings? nothing, I didn't find it in

[HACKERS] Re: Doing better at HINTing an appropriate column within errorMissingColumn()

2014-11-20 Thread David G Johnston
Andres Freund-3 wrote I think something simplistic like levenshtein, even with modified distances, is good to catch typos. But not to find terms that are related in more complex ways. Tom Lane-2 wrote The big picture is that this is more or less our first venture into heuristic

Re: [HACKERS] Use of recent Russian TZ changes in regression tests

2014-11-18 Thread David G Johnston
Tom Lane-2 wrote The good thing about testing with the MSK changes is that those are quite well-documented and so we don't have to fear getting blindsided by future updates to the IANA database. So basically we are trading off known short term pain (for people on machines with old TZ files)

Re: [HACKERS] vacuumdb: Help text for --analyze-only.

2014-11-17 Thread David G Johnston
Mats Erik Andersson wrote Hello there, I observe that the help text of vacuumdb for --analyze, --analyze-only, and --analyze-in-stages could do with a little clarification in order to be self-documenting and thus improve the user experience of vacuumdb. The problem is that the sole

Re: [HACKERS] controlling psql's use of the pager a bit more

2014-11-13 Thread David G Johnston
Andrew Dunstan wrote On 11/13/2014 11:09 AM, Tom Lane wrote: Andrew Dunstan lt; andrew@ gt; writes: I often get annoyed because psql is a bit too aggressive when it decides whether to put output through the pager, and the only way to avoid this is to turn the pager off (in which case your

[HACKERS] Re: [GENERAL] Performance issue with libpq prepared queries on 9.3 and 9.4

2014-11-13 Thread David G Johnston
Tom Lane-2 wrote In the meantime, I assume that your real data contains a small percentage of values other than these two? If so, maybe cranking up the statistics target would help. If the planner knows that there are more than two values in the column, I think it would be less optimistic

Re: [HACKERS] EXPLAIN ANALYZE output weird for Top-N Sort

2014-11-13 Thread David G Johnston
Tom Lane-2 wrote Simon Riggs lt; simon@ gt; writes: Limit (cost= rows=20 width=175) (actual time= rows=20 loops=1) - Sort (cost= rows=568733 width=175) (actual time= rows=20 loops=1) Sort Method: top-N heapsort The Sort estimate shows 568733 rows, whereas

Re: [HACKERS] row_to_json bug with index only scans: empty keys!

2014-11-10 Thread David G Johnston
Tom Lane-2 wrote I wrote: Attached are patches meant for HEAD and 9.2-9.4 respectively. BTW, has anyone got an opinion about whether to stick the full fix into 9.4? The argument for, of course, is that we'd get the full fix out to the public a year sooner. The argument against is that

Re: [HACKERS] Tweaking Foreign Keys for larger tables

2014-11-06 Thread David G Johnston
Peter Eisentraut-2 wrote On 10/31/14 6:19 AM, Simon Riggs wrote: Various ways of tweaking Foreign Keys are suggested that are helpful for larger databases. *INITIALLY NOT ENFORCED FK created, but is not enforced during DML. Will be/Must be marked NOT VALID when first created. We can

Re: [HACKERS] Tweaking Foreign Keys for larger tables

2014-11-06 Thread David G Johnston
On Thu, Nov 6, 2014 at 10:29 AM, Jim Nasby-5 [via PostgreSQL] ml-node+s1045698n582596...@n5.nabble.com wrote: On 11/6/14, 2:58 AM, Simon Riggs wrote: On 5 November 2014 21:15, Peter Eisentraut [hidden email] http://user/SendEmail.jtp?type=nodenode=5825967i=0 wrote: On 10/31/14 6:19 AM,

[HACKERS] Re: why does LIMIT 2 take orders of magnitude longer than LIMIT 1 in this query?

2014-10-31 Thread David G Johnston
Chris Rogers wrote I'm on PostgreSQL 9.3. This should reproduce on any table with 100,000+ rows. The EXPLAIN ANALYZE shows many more rows getting scanned with LIMIT 2, but I can't figure out why. EXPLAIN ANALYZE WITH base AS ( SELECT *, ROW_NUMBER() OVER () AS rownum FROM a_big_table

Re: [HACKERS] SET TABLESPACE ... NOWAIT

2014-10-30 Thread David G Johnston
Tomas Vondra wrote Also, the current phrasing If the NOWAIT option is specified then the command will fail if it is unable to acquire all of the locks required immediately. seems a bit ambiguous to me. Maybe it's just me, but I wasn't sure if that means locks for all objects immediately,

Re: [HACKERS] proposal: CREATE DATABASE vs. (partial) CHECKPOINT

2014-10-27 Thread David G Johnston
Tomas Vondra wrote I mean, when we use database A as a template, why do we need to checkpoint B, C, D and F too? (Apologies if this is somehow obvious, I'm way out of my comfort zone in this part of the code.) IIUC you have to checkpoint the whole cluster because it is not possible to do

<    1   2   3   4   5   6   7   >