Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-02 Thread David G. Johnston
On Wed, Aug 2, 2017 at 10:58 AM, Tom Lane wrote: > Robert Haas writes: > > On Wed, Aug 2, 2017 at 1:08 PM, Tom Lane wrote: > >> --restore-via-partition-root ? > > > I worry someone will think that pg_dump is now restoring stuff,

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread David G. Johnston
On Thursday, August 3, 2017, Rushabh Lathia wrote: > > > --use-partitioned-table [partitioned_name, ...] # if > names are omitted it defaults to all the partitioned tables. > > Here user need to specify the root relation name in the option - and any > partition table

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-03 Thread David G. Johnston
On Thu, Aug 3, 2017 at 8:53 AM, Tom Lane wrote: > Robert Haas writes: > > So maybe --load-via-partition-root if nobody likes my previous > > suggestion of --partition-data-via-root ? > > WFM. > ​+1 David J.​

Re: [HACKERS] CAST vs ::

2017-07-13 Thread David G. Johnston
On Thursday, July 13, 2017, Tom Lane wrote: > Maybe we can hack ruleutils to use > the CAST syntax only in this specific context. > Given the lack of complaints, and ubiquity of ::, this would seem ideal and sufficient. While there is something to be said for using standard

Re: [HACKERS] Domains and arrays and composites, oh my

2017-07-13 Thread David G. Johnston
On Thursday, July 13, 2017, Tom Lane wrote: > > regression=# select * from fdc(); > fdc > --- > (1,2) > (1 row) > > Select (fdc).* from fdc(); is considerably more intuitive that the cast. Does that give the expected multi-column result? David J.

Re: [HACKERS] pg_upgrade failed if view contain natural left join condition

2017-07-20 Thread David G. Johnston
On Thu, Jul 20, 2017 at 6:53 AM, Tom Lane wrote: > tushar writes: > > postgres=# create table t(n int); > > CREATE TABLE > > postgres=# create table t1(a int); > > CREATE TABLE > > postgres=# create view ttt1 as SELECT e.n FROM t e NATURAL LEFT

Re: [HACKERS] Cached plans and statement generalization

2017-04-25 Thread David G. Johnston
On Tue, Apr 25, 2017 at 3:24 PM, David Fetter wrote: > I don't have an exploit yet. What concerns me is attackers' access to > what is in essence the ability to poke at RULEs when they only have > privileges to read. > ​If they want to see how it works they can read the

Re: [HACKERS] question: data file update when pg_basebackup in progress

2017-04-25 Thread David G. Johnston
On Tue, Apr 25, 2017 at 9:08 AM, Rui Hai Jiang wrote: > When pg_basebackup is launched, a checkpoint is created first, then all > files are transferred to the pg_basebackup client. Is it possible that a > data page(say page-N) in a data file is changed after the checkpoint

Re: [HACKERS] Separation walsender & normal backends

2017-04-25 Thread David G. Johnston
On Tue, Apr 25, 2017 at 2:24 PM, Petr Jelinek wrote: > On 25/04/17 17:13, Fujii Masao wrote: > > On Tue, Apr 25, 2017 at 11:34 PM, Tom Lane wrote: > > OTOH, I believe that logical replication is still useful even without > > initial table sync

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-08-08 Thread David G. Johnston
On Tue, Aug 8, 2017 at 4:33 PM, Dean Rasheed wrote: > On 8 August 2017 at 19:22, Robert Haas wrote: > > On Fri, Jul 21, 2017 at 4:24 AM, Dean Rasheed > wrote: > >> Also drop the constraint prohibiting finite values

Re: [HACKERS] dubious error message from partition.c

2017-08-08 Thread David G. Johnston
On Tue, Aug 8, 2017 at 8:34 PM, Tom Lane wrote: > A small suggestion is that it'd be better to write it like "Specified > upper bound \"%s\" precedes lower bound \"%s\"." I think "succeeds" has > more alternate meanings than "precedes", so the wording you have seems > more

Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail

2017-07-31 Thread David G. Johnston
On Tue, Jul 25, 2017 at 11:29 PM, Amit Langote < langote_amit...@lab.ntt.co.jp> wrote: > > I'm curious what the other limitations are... > > When I first wrote that documentation line (I am assuming you're asking > about "although these have some limitations that normal tables do not"), I > was

Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitions fail

2017-07-31 Thread David G. Johnston
On Mon, Jul 31, 2017 at 5:42 PM, Amit Langote wrote: > > On a second thought though, I think we should list the foreign table > partitions' limitations in only one place, that is, the CREATE FOREIGN > TABLE reference page. Listing them under 5.10.2.3. seems a bit

Re: [HACKERS] Possible bug in 9.3.17 using operator <>

2017-08-01 Thread David G. Johnston
On Tue, Aug 1, 2017 at 8:39 AM, Nick Dro wrote: > The operator <> seems to not work properly comparing citext types in > triggers function. > > https://stackoverflow.com/questions/45441840/posgresql- > 9-3-operator-doesnt-give-logical-result > > Can someone figure out

Re: [HACKERS] Update description of \d[S+] in \?

2017-07-31 Thread David G. Johnston
On Mon, Jul 31, 2017 at 7:06 PM, Robert Haas wrote: > On Thu, Jul 13, 2017 at 8:40 PM, Amit Langote > wrote: > > On 2017/07/13 19:57, Ashutosh Bapat wrote: > >> On Thu, Jul 13, 2017 at 12:01 PM, Amit Langote > >>

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-14 Thread David G. Johnston
On Thu, Sep 14, 2017 at 8:41 AM, Stephen Frost wrote: > Robert, all, > > * Robert Haas (robertmh...@gmail.com) wrote: > > > > > > > I vote for rejecting it. DDL compatibility is less valuable than other > > > compatibility. The hypothetical affected application can change

Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list

2017-09-19 Thread David G. Johnston
On Tue, Sep 19, 2017 at 2:12 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > "David G. Johnston" <david.g.johns...@gmail.com> writes: > > Actually, this does work, just not the way one would immediately expect. > > On closer inspection, what's actually happe

Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list

2017-09-19 Thread David G. Johnston
On Tue, Sep 19, 2017 at 11:29 AM, Tom Lane wrote: > ​T​ > hat > ​ ​ > doesn't work today, and this patch doesn't fix it, but it does create > enough confusion that we never would be able to fix it. > > I'd be much happier if there were some notational difference > between

Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list

2017-09-19 Thread David G. Johnston
On Tue, Sep 19, 2017 at 11:29 AM, Tom Lane wrote: > Aside from being inconsistent, it doesn't cover all > the cases --- what if you have just one query output column, that is > composite, and you'd like it to go into a composite variable? That > doesn't work today, and this

Re: [HACKERS] issue: record or row variable cannot be part of multiple-item INTO list

2017-09-19 Thread David G. Johnston
On Tuesday, September 19, 2017, Tom Lane wrote: > Pavel Stehule > writes: > > 2017-09-14 12:33 GMT+02:00 Anthony Bykov >: > >> As far as I understand, this patch adds functionality (correct me if

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-09-14 Thread David G. Johnston
On Thursday, September 14, 2017, Robert Haas wrote: > On Thu, Sep 14, 2017 at 3:23 AM, Tsunakawa, Takayuki > > wrote: > > Sorry again, but how can we handle this? A non-PG-developer, Tels (and > possibly someone else, IIRC)

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-13 Thread David G. Johnston
On Wed, Sep 13, 2017 at 12:46 PM, Fabien COELHO wrote: > > Hello Tom, > > Probably it needs some rebase after Tom committed result status variables. >>> >> >> As it is a style thing, ISTM that the patch is ready if most people agree >>> that it is better this way and there

Re: [HACKERS] search path security issue?

2017-10-05 Thread David G. Johnston
On Thu, Oct 5, 2017 at 3:05 PM, Joshua D. Drake <j...@commandprompt.com> wrote: > On 10/05/2017 02:54 PM, David G. Johnston wrote: > >> On Thu, Oct 5, 2017 at 2:37 PM, Joshua D. Drake <j...@commandprompt.com >> <mailto:j...@commandprompt.com>>wrote: >

Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan

2017-09-08 Thread David G. Johnston
On Fri, Sep 8, 2017 at 2:09 PM, Tom Lane wrote: > Pavel Stehule writes: > > personally I prefer syntax without FOR keyword - because following > keyword > > must be reserved keyword > > > SET x = .., y = .. SELECT ... ; > > Nope. Most of the

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-08-30 Thread David G. Johnston
On Wed, Aug 30, 2017 at 4:08 PM, Bossart, Nathan wrote: > On 8/30/17, 5:37 PM, "Michael Paquier" wrote: > > Yeah... Each approach has its cost and its advantages. It may be > > better to wait for more opinions, no many people have complained yet >

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-08-21 Thread David G. Johnston
On Mon, Aug 21, 2017 at 2:30 PM, Simon Riggs wrote: > > > The patch applies cleanly to current master and all tests run without > > failures. > > > > I also test against all current supported versions (9.2 ... 9.6) and > didn't > > find any issue. > > > > Changed status to

Re: [HACKERS] show "aggressive" or not in autovacuum logs

2017-08-28 Thread David G. Johnston
On Mon, Aug 28, 2017 at 2:26 AM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > https://www.postgresql.org/docs/devel/static/runtime-config-client.html > > > > ​V​ > ACUUM performs an aggressive scan > ​Maybe this should gets its own thread/patch but I'll tack this on here since

Re: [HACKERS] search path security issue?

2017-10-05 Thread David G. Johnston
On Thu, Oct 5, 2017 at 2:37 PM, Joshua D. Drake wrote: > I get being able to change my search_path on the fly but it seems odd that > as user foo I can change my default search path? > Seems down-right thoughtful of us to allow users to change their own defaults instead

[HACKERS] v10 telease note for pg_basebackup refers to old --xlog-method argument

2017-10-17 Thread David G. Johnston
diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml index 116f7224da..f1f7cfed5f 100644 --- a/doc/src/sgml/release-10.sgml +++ b/doc/src/sgml/release-10.sgml @@ -242,7 +242,7 @@ This changes pg_basebackup's - -X/--xlog-method default to stream. +

Re: [HACKERS] Interest in a SECURITY DEFINER function current_user stack access mechanism?

2017-10-18 Thread David G. Johnston
On Wed, Oct 18, 2017 at 2:08 PM, Nico Williams <n...@cryptonector.com> wrote: > On Wed, Oct 18, 2017 at 01:43:30PM -0700, David G. Johnston wrote: > > More useful than this, for me, would be a way to get the top-most user. > > ​That would be "session_user"?​ >

Re: [HACKERS] Interest in a SECURITY DEFINER function current_user stack access mechanism?

2017-10-18 Thread David G. Johnston
On Wed, Oct 18, 2017 at 2:30 PM, Nico Williams <n...@cryptonector.com> wrote: > On Wed, Oct 18, 2017 at 02:13:29PM -0700, David G. Johnston wrote: > > > More useful than this, for me, would be a way to get the top-most user. > > > > That would be "session_user

Re: [HACKERS] Interest in a SECURITY DEFINER function current_user stack access mechanism?

2017-10-18 Thread David G. Johnston
On Wed, Oct 18, 2017 at 1:26 PM, Nico Williams wrote: > On Wed, Oct 18, 2017 at 10:15:01PM +0200, Pavel Stehule wrote: > > there is a function session_user() already > > But it doesn't do this. Are you saying that I should add a > session_user(int)? > > ​Regardless of the

Re: [HACKERS] [PATCH] Add two-arg for of current_setting(NAME, FALLBACK)

2017-11-01 Thread David G. Johnston
On Thu, Mar 19, 2015 at 3:41 PM, David Christensen wrote: > The two-arg form of the current_setting() function will allow a > fallback value to be returned instead of throwing an error when an > unknown GUC is provided. This would come in most useful when using > custom

Re: [HACKERS] PostgreSQL 10 parenthesized single-column updates can produce errors

2017-10-31 Thread David G. Johnston
On Tue, Oct 31, 2017 at 3:14 PM, Rob McColl wrote: > >> I believe that this is not an intended change or behavior, but is instead >> an unintentional side effect of 906bfcad7ba7cb3863fe0e2a7810be8e3cd84fbd >> Improve handling of "UPDATE ... SET (column_list) =

Re: [HACKERS] PostgreSQL 10 parenthesized single-column updates can produce errors

2017-10-31 Thread David G. Johnston
On Tue, Oct 31, 2017 at 3:43 PM, Tom Lane wrote: > According to the spec, the elements of a parenthesized > SET list should be assigned from the fields of a composite RHS. If > there's just one element of the SET list, the RHS should be a single-field > composite value, and

Re: [HACKERS] Account for cost and selectivity of HAVING quals

2017-10-31 Thread David G. Johnston
On Tue, Oct 31, 2017 at 4:31 PM, Tels wrote: > > ​​ > That looks odd to me, it first uses output_tuples in a formula, then > overwrites the value with a new value. Should these lines be swapped? > ​IIUC it is correct: the additional total_cost comes from

[HACKERS] Remove inbound links to sql-createuser

2017-10-30 Thread David G. Johnston
Since CREATE USER is officially an alias for CREATE ROLE other parts of the documentation should point to CREATE ROLE, not CREATE USER. Most do but I noticed when looking at CREATE DATABASE that it did not. Further searching turned up the usage in client-auth.sgml. That one is questionable

Re: [HACKERS] [GENERAL] CLOB BLOB limitations in PostgreSQL

2014-04-14 Thread David G Johnston
Bruce Momjian wrote On Mon, Apr 14, 2014 at 02:01:19PM +0200, Ivan Voras wrote: On 11/04/2014 16:45, Jack.O' Sullivan@ wrote: With point two, does this mean that any table with a bytea datatype is limited to 4 billion rows (which would seem in conflict with the unlimited rows shown

Re: [HACKERS] Patch: iff - if

2014-04-15 Thread David G Johnston
Thom Brown-2 wrote On 15 April 2014 23:19, Andreas 'ads' Scherbaum lt; adsmail@ gt; wrote: Hi, stumbled over a number of iff in the source where if is meant - not sure what the real story behind this is, but attached is a patch to fix the about 80 occurrences. This only appears in

Re: [HACKERS] The question about the type numeric

2014-04-15 Thread David G Johnston
sure.postgres wrote Hi hackers, I am learning about numeric . The comment of NumericShort format is: * In the NumericShort format, the remaining 14 bits of the header word * (n_short.n_header) are allocated as follows: 1 for sign (positive or * negative), 6 for dynamic scale, and 7 for

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread David G Johnston
Alvaro Herrera-9 wrote Are we going to backpatch a doc change that says releases all temporary resources, except for plptyhon's and plperl's GD? Surely not ... GD = Global Dictionary I don't see why something like the following wouldn't have value. For those languages that make use of a

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread David G Johnston
On 04/17/2014 05:24 PM, Tom Lane wrote: On the whole I'm not sure this is something we ought to get into. If you really need a fresh session, maybe you should start a fresh session. Isn't the whole point to avoid the reconnection overhead, especially for connection poolers? DISCARD ALL

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-04-21 Thread David G Johnston
Jim Nasby-2 wrote I feel that if there is no memory pressure, frankly it doesnt matter much about what gets out and what not. The case I am specifically targeting is when the clocksweep gets to move about a lot i.e. high memory pressure workloads. Of course, I may be totally wrong here.

Re: [HACKERS] Perfomance degradation 9.3 (vs 9.2) for FreeBSD

2014-04-21 Thread David G Johnston
Stephen Frost wrote * Alfred Perlstein ( alfred@ ) wrote: On 4/21/14, 12:47 PM, Stephen Frost wrote: Asking for help to address the FreeBSD performance would have been much better received. Thanks, Stephen That is exactly what I did, I asked for a version of postgresql that was easy

Re: [HACKERS] So why is EXPLAIN printing only *plan* time?

2014-04-27 Thread David G Johnston
Tom Lane-2 wrote Or we could add them into just the first planning-time printout, though that might also be misleading. If you are going to show a number for these steps, which seems like a good idea, then this seems like a reasonable option in the face of this situation. Basically two

Re: [HACKERS] need of anonymous record

2014-05-03 Thread David G Johnston
Peter Padua Krauss wrote The first question is about performance: *returns table* have the same performance than *returns record*?? If yes, the *record* datatype is somewhat outdated? Table defines the possibility to return a set while record can only ever return a single value; so likely the

Re: [HACKERS] EXPIRE as a statement

2014-05-04 Thread David G Johnston
Blagoj Petrushev wrote I know for example that redis has this feature, the EXPIRE / EXPIREAT / TTL commands. http://redis.io/commands/expire Redis seems to have decided that limiting the extent to which EXPIRE works is necessary in order to maintain performance; I'd be very worried about a

Re: [HACKERS] EXPIRE as a statement

2014-05-04 Thread David G Johnston
On Sun, May 4, 2014 at 10:06 PM, Tom Lane-2 [via PostgreSQL] ml-node+s1045698n5802390...@n5.nabble.com wrote: David G Johnston [hidden email]http://user/SendEmail.jtp?type=nodenode=5802390i=0 writes: Blagoj Petrushev wrote I know for example that redis has this feature, the EXPIRE

Re: [HACKERS] Supporting multiple column assignment in UPDATE (9.5 project)

2014-05-05 Thread David G Johnston
Merlin Moncure-2 wrote On Sat, May 3, 2014 at 5:48 AM, Marko Tiikkaja lt; marko@ gt; wrote: On 5/2/14, 10:10 PM, Merlin Moncure wrote: On Fri, May 2, 2014 at 3:03 PM, Tom Lane lt; tgl@.pa gt; wrote: Meh. Then you could have a query that works fine until you add a column to the

Re: [HACKERS] PGDLLEXPORTing all GUCs?

2014-05-07 Thread David G Johnston
Tom Lane-2 wrote Andres Freund lt; andres@ gt; writes: On 2014-05-07 09:35:06 -0400, Tom Lane wrote: Craig Ringer lt; craig@ gt; writes: Is there any reason _not_ to PGDLLEXPORT all GUCs, other than cosmetic concerns? That seems morally equivalent to is there a reason not to make

Re: [HACKERS] PQputCopyEnd doesn't adhere to its API contract

2014-05-08 Thread David G Johnston
Tom Lane-2 wrote Robert Haas lt; robertmhaas@ gt; writes: On Thu, May 8, 2014 at 1:51 PM, Tom Lane lt; tgl@.pa gt; wrote: Robert Haas lt; robertmhaas@ gt; writes: OK. It still seems to me that there's a doc fix needed here, if nothing else. The documentation for PQputCopyEnd()

Re: [HACKERS] [WIP] showing index maintenance on EXPLAIN

2014-05-08 Thread David G Johnston
Robert Haas wrote On Thu, May 8, 2014 at 2:31 AM, Jaime Casanova lt; jaime@ gt; wrote: On Wed, May 7, 2014 at 10:52 PM, Amit Kapila lt; amit.kapila16@ gt; wrote: On Thu, May 8, 2014 at 5:30 AM, Jaime Casanova lt; jaime@ gt; wrote: QUERY PLAN

Re: [HACKERS] Error in running DBT2

2014-05-13 Thread David G Johnston
Rohit Goyal wrote Hi Peter, On Tue, May 13, 2014 at 9:44 PM, Peter Geoghegan lt; pg@ gt; wrote: On Tue, May 13, 2014 at 12:36 PM, Rohit Goyal lt; rhtgyl.87@ gt; wrote: This pattern the above found many times. Please guide me through!!! IIRC, people have been working around

Re: [HACKERS] CTE that result in repeated sorting of the data

2014-05-15 Thread David G Johnston
Jon Nelson-14 wrote I was watching a very large recursive CTE get built today and this CTE involves on the order of a dozen or so loops joining the initial table against existing tables. It struck me that - every time through the loop the tables were sorted and then joined and that it would be

Re: [HACKERS] Error in running DBT2

2014-05-15 Thread David G Johnston
Andrew Dunstan wrote On 05/15/2014 06:37 PM, Rohit Goyal wrote: Hi All, I am using centOS6 and after all confugration, I run the below command *dbt2-run-workload -a pgsql -d 120 -w 1 -o /tmp/result -c 10 * *Error:* Stage 3. Processing of results... Killing client... waiting for server

Re: [HACKERS] 9.4 release notes

2014-05-15 Thread David G Johnston
Andres Freund-3 wrote On 2014-05-04 08:46:07 -0400, Bruce Momjian wrote: I have completed the initial version of the 9.4 release notes. You can view them here: http://www.postgresql.org/docs/devel/static/release-9-4.html I will be adding additional markup in the next few days.

Re: [HACKERS] Trigger concurrent execution

2014-05-15 Thread David G Johnston
Blagoj Petrushev wrote Hi, I'm thinking of an extension to trigger functionality like this: CREATE TRIGGER trigger_name AFTER event ON table CONCURRENTLY EXECUTE PROCEDURE trigger_fc This would call the trigger after the end of the transaction. The following is a

[HACKERS] Re: pg_basebackup: could not get transaction log end position from server: FATAL: could not open file ./pg_hba.conf~: Permission denied

2014-05-16 Thread David G Johnston
Andres Freund-3 wrote On 2014-05-16 18:29:25 +0200, Magnus Hagander wrote: On Fri, May 16, 2014 at 6:25 PM, Andres Freund lt; andres@ gt;wrote: On 2014-05-16 18:20:35 +0200, Magnus Hagander wrote: On Fri, May 16, 2014 at 5:46 PM, Joshua D. Drake lt; jd@ gt; wrote: At a

Re: [HACKERS] chr() is still too loose about UTF8 code points

2014-05-16 Thread David G Johnston
Tom Lane-2 wrote Noah Misch lt; noah@ gt; writes: On Fri, May 16, 2014 at 11:05:08AM -0400, Tom Lane wrote: I think this probably means we need to change chr() to reject code points above 10. Should we back-patch that, or just do it in HEAD? The compatibility risks resemble those

[HACKERS] Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 - 9.3

2014-05-23 Thread David G Johnston
Bruce Momjian wrote On Thu, May 22, 2014 at 09:20:38AM -0600, Jeff Ross wrote: I just tested ALTER TABLE in 8.4 and it does create a toast table for this case in 9.4: CREATE TABLE test (x CHAR(10)); ALTER TABLE test ALTER COLUMN x TYPE CHAR(8000); I just tried this on the problem

Re: [HACKERS] PG Manual: Clarifying the repeatable read isolation example

2014-05-27 Thread David G Johnston
Heikki Linnakangas-6 wrote On 05/27/2014 10:12 PM, Evan Jones wrote: I was reading the Postgres MVCC documentation today (which is generally fantastic BTW), and am slightly confused by a single sentence example, describing possible read-only snapshot isolation anomalies. I would like to

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-05-27 Thread David G Johnston
Alexander Shulgin wrote Hi Hackers, This came up recently on general list (and I've just hit the same issue today): http://www.postgresql.org/message-id/ CAB7nPqTLmMn1LTb5WE0v0dO57iP0U73yKwzbZytAXDF1CAWLZg@.gmail Why couldn't postgres re-create the dependent views automatically? I

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-03 Thread David G Johnston
On Tuesday, June 3, 2014, Robert Haas [via PostgreSQL] ml-node+s1045698n5805857...@n5.nabble.com wrote: On Mon, Jun 2, 2014 at 10:00 PM, Tom Lane [hidden email] http://user/SendEmail.jtp?type=nodenode=5805857i=0 wrote: I can see two answers. Answer #1 is that the column type of bar.a

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread David G Johnston
Vik Fearing wrote On 06/03/2014 03:30 PM, Abhijit Menon-Sen wrote: At 2014-06-03 15:06:11 +0200, vik.fearing@ wrote: This patch implements a timeout for broken clients that idle in transaction. I think this is a nice feature, but I suggest that (at the very least) the GUC should be

Re: [HACKERS] idle_in_transaction_timeout

2014-06-03 Thread David G Johnston
On Tue, Jun 3, 2014 at 7:40 PM, Josh Berkus [via PostgreSQL] ml-node+s1045698n5805933...@n5.nabble.com wrote: On 06/03/2014 02:53 PM, Tom Lane wrote: Josh Berkus [hidden email] http://user/SendEmail.jtp?type=nodenode=5805933i=0 writes: Out of curiosity, how much harder would it have been

Re: [HACKERS] Sigh, we need an initdb

2014-06-04 Thread David G Johnston
Robert Haas wrote On Wed, Jun 4, 2014 at 2:52 PM, Tom Lane lt; tgl@.pa gt; wrote: I just noticed that we had not one, but two commits in 9.4 that added fields to pg_control. And neither one changed PG_CONTROL_VERSION. This is inexcusable sloppiness on the part of the committers involved,

Re: [HACKERS] Sigh, we need an initdb

2014-06-04 Thread David G Johnston
Stefan Kaltenbrunner wrote On 06/04/2014 08:56 PM, Joshua D. Drake wrote: On 06/04/2014 11:52 AM, Tom Lane wrote: I think we could possibly ship 9.4 without fixing this, but it would be imprudent. Anyone think differently? Of course, if we do fix this then the door opens for pushing

Re: [HACKERS] configure does not check for bison or flex

2014-06-08 Thread David G Johnston
Eric L wrote I am installing postgresql from source on 64 bit Ubuntu 14.04 and when I run the ./configure script, it is successful, but when I run make it fails with an error: ERROR: `flex' is missing on your system. It is needed to create the file `bootscanner.c'. You can either get flex

Re: [HACKERS] RETURNING PRIMARY KEY syntax extension

2014-06-08 Thread David G Johnston
Ian Barwick wrote Hi, The JDBC API provides the getGeneratedKeys() method as a way of retrieving primary key values without the need to explicitly specify the primary key column(s). This is a widely-used feature, however the implementation has significant performance drawbacks.

Re: [HACKERS] RETURNING PRIMARY KEY syntax extension

2014-06-09 Thread David G Johnston
David G Johnston wrote Ian Barwick wrote Hi, The JDBC API provides the getGeneratedKeys() method as a way of retrieving primary key values without the need to explicitly specify the primary key column(s). This is a widely-used feature, however the implementation has significant

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-10 Thread David G Johnston
In short: I can accept the idea that picking reasonable specific values is impossible so let's just ensure that children are always killed before the parent (basically the default behavior). If you then say that any system that is capable of implementing that rule should have it set then leaving

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-10 Thread David G Johnston
Gurjeet Singh-4 wrote Even if the clueless DBA tries to set the oom_score_adj below that of Postmaster, Linux kernel prevents that from being done. I demonstrate that in the below screen share. I used GUC as well as plain command line to try and set a child's badness (oom_score_adj) to be

Re: [HACKERS] PL/pgSQL support to define multi variables once

2014-06-13 Thread David G Johnston
Tom Lane-2 wrote Andres Freund lt; andres@ gt; writes: On 2014-06-13 16:12:36 +0200, Pavel Stehule wrote: Quan' example is 100% valid in SQL/PSM and what I read about ADA then in ADA too. So what? plpgsql is neither language and this doesn't seem to be the way to make them actually

Re: [HACKERS] Audit of logout

2014-06-13 Thread David G Johnston
Tom Lane-2 wrote Another answer is to make both variables PGC_SIGHUP, on the grounds that it doesn't make much sense for them not to be applied system-wide; except that I think there was some idea that logging might be enabled per-user or per-database using ALTER ROLE/DATABASE. From a

Re: [HACKERS] comparison operators

2014-06-18 Thread David G Johnston
Andrew Dunstan wrote On 06/17/2014 07:25 PM, Andres Freund wrote: On 2014-06-17 19:22:07 -0400, Tom Lane wrote: Andrew Dunstan lt; andrew@ gt; writes: I went to have a look at documenting the jsonb comparison operators, and found that the docs on comparison operators contain this:

Re: [HACKERS] idle_in_transaction_timeout

2014-06-18 Thread David G Johnston
On Wed, Jun 18, 2014 at 8:01 PM, Josh Berkus [via PostgreSQL] ml-node+s1045698n5807868...@n5.nabble.com wrote: On 06/18/2014 04:54 PM, Marko Tiikkaja wrote: On 2014-06-19 1:46 AM, Josh Berkus wrote: Robert's right, not killing the BEGIN; only transactions is liable to result in user

Re: [HACKERS] idle_in_transaction_timeout

2014-06-19 Thread David G Johnston
On Thu, Jun 19, 2014 at 12:40 PM, Abhijit Menon-Sen-2 [via PostgreSQL] ml-node+s1045698n5808016...@n5.nabble.com wrote: At 2014-06-19 17:53:17 +0200, [hidden email] http://user/SendEmail.jtp?type=nodenode=5808016i=0 wrote: I much prefer with in but it doesn't much matter. If you look at

Re: [HACKERS] idle_in_transaction_timeout

2014-06-22 Thread David G Johnston
On Sunday, June 22, 2014, Kevin Grittner-5 [via PostgreSQL] ml-node+s1045698n580830...@n5.nabble.com wrote: Andres Freund [hidden email] http://user/SendEmail.jtp?type=nodenode=5808309i=0 wrote: I think we'll want a version of this that just fails the transaction once we have the

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread David G Johnston
I think that'd be rather confusing. For one it'd need to be idle_in_transaction_timeout Why? We're cancelling an idle transaction, not an idle in transaction, whatever that is. ​The confusion derives from the fact we are affecting a session whose state is idle in transaction, not one

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread David G Johnston
A long idle in transaction state pretty much always indicates a problematic interaction with postgres. True. Which makes me wonder whether we shouldn't default this to something non-zero -- even if it is 5 or 10 days. ​I guess it depends on how parental we want to be. But if we go that

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 9:20 AM, Vik Fearing [via PostgreSQL] ml-node+s1045698n5808882...@n5.nabble.com wrote: On 06/22/2014 05:11 PM, Kevin Grittner wrote: I found one substantive issue that had been missed in discussion, though. The patch modifies the postgres_fdw extension to make it

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 10:05 AM, Robert Haas [via PostgreSQL] ml-node+s1045698n580889...@n5.nabble.com wrote: On Tue, Jun 24, 2014 at 9:18 AM, Vik Fearing [hidden email] http://user/SendEmail.jtp?type=nodenode=5808893i=0 wrote: On 06/22/2014 05:11 PM, Kevin Grittner wrote: I found one

Re: [HACKERS] idle_in_transaction_timeout

2014-06-24 Thread David G Johnston
On Tue, Jun 24, 2014 at 11:11 AM, Robert Haas [via PostgreSQL] ml-node+s1045698n5808915...@n5.nabble.com wrote: On Tue, Jun 24, 2014 at 10:50 AM, Vik Fearing [hidden email] http://user/SendEmail.jtp?type=nodenode=5808915i=0 wrote: On 06/24/2014 04:04 PM, Robert Haas wrote: If the local

[HACKERS] Re: how can i prevent materialized views from refreshing during pg_restore

2014-06-26 Thread David G Johnston
bithead wrote I asked a question over on StackOverflow, and Craig Ringer told me to report it here. http://stackoverflow.com/questions/24413161/how-can-i-prevent-materialized-views-from-refreshing-during-pg-restore I have created a dump of the database using pg_dump in custom format

Re: [HACKERS] Can simplify 'limit 1' with slow function?

2014-07-01 Thread David G Johnston
Merlin Moncure-2 wrote On Tue, Jul 1, 2014 at 2:16 PM, Martijn van Oosterhout lt; kleptog@ gt; wrote: On Sun, Jun 29, 2014 at 10:05:50PM +0800, gotoschool6g wrote: The simplified scene: select slowfunction(s) from a order by b limit 1; is slow than select slowfunction(s) from (select s

Re: [HACKERS] Can simplify 'limit 1' with slow function?

2014-07-02 Thread David G Johnston
Martijn van Oosterhout wrote On Tue, Jul 01, 2014 at 02:36:55PM -0500, Merlin Moncure wrote: On Tue, Jul 1, 2014 at 2:16 PM, Martijn van Oosterhout lt; kleptog@ gt; wrote: On Sun, Jun 29, 2014 at 10:05:50PM +0800, gotoschool6g wrote: The simplified scene: select slowfunction(s) from a

[HACKERS] Re: how to find the order of joins from Explain command XML plan output in PostgreSQL

2014-07-09 Thread David G Johnston
csrajmohan wrote EXPLAIN (format XML) command in PostgreSQL9.3.4 gives the plan chosen by the optimizer in XML format. In my program, I have to extract certain data about optimizer plan from this XML output. I am using *LibXML2* library for parsing the XML. I had successfully extracted

Re: [HACKERS] Is there a way to temporarily disable a index

2014-07-11 Thread David G Johnston
Benedikt Grundmann wrote That is it possible to tell the planner that index is off limits i.e. don't ever generate a plan using it? Rationale: Schema changes on big tables. I might have convinced myself / strong beliefs that for all queries that I need to be fast the planner does not

Re: [HACKERS] Making joins involving ctid work for the benefit of UPSERT

2014-07-23 Thread David G Johnston
Peter Geoghegan-3 wrote with semantics like this: 1. Search the table, using any type of scan you like, for a row matching the given predicate. Perhaps I've misunderstood, but this is fundamentally different to what I'd always thought would need to happen. I always understood that the

[HACKERS] Re: Proposed changing the definition of decade for date_trunc and extract

2014-08-01 Thread David G Johnston
Mike Swanson wrote For a long time (since version 8.0), PostgreSQL has adopted the logical barriers for centuries and millenniums in these functions. The calendar starts millennium and century 1 on year 1, directly after 1 BC. Unfortunately decades are still reported rather simplistically by

Re: [HACKERS] Append to a GUC parameter ?

2014-08-05 Thread David G Johnston
Alvaro Herrera-9 wrote Bruce Momjian wrote: On Tue, Aug 5, 2014 at 12:52:51PM -0700, Josh Berkus wrote: On 08/05/2014 11:12 AM, Jerry Sievers wrote: shared_preload_libraries += auto_explain Would do the trick. I've never heard this mentioned before so presume not many have

Re: [HACKERS] select_common_type()'s behavior doesn't match the documentation

2014-08-06 Thread David G Johnston
Tom Lane-2 wrote In our fine manual, at http://www.postgresql.org/docs/devel/static/typeconv-union-case.html it's claimed that the nontrivial parts of UNION type resolution work like this: 4. Choose the first non-unknown input type which is a preferred type in that category, if there

Re: [HACKERS] Fixed redundant i18n strings in json

2014-08-07 Thread David G Johnston
Tom Lane-2 wrote Robert Haas lt; robertmhaas@ gt; writes: On Sat, Aug 2, 2014 at 9:15 AM, Daniele Varrazzo lt; daniele.varrazzo@ gt; wrote: I'd definitely replace /arg/argument/. Furthermore I'd avoid the form argument 1: something is wrong: the string is likely to end up in

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-08 Thread David G Johnston
akapila wrote On Sat, Aug 9, 2014 at 6:15 AM, Tom Lane lt; tgl@.pa gt; wrote: Stephen Frost lt; sfrost@ gt; writes: What about considering how large the object is when we are analyzing if it compresses well overall? Hmm, yeah, that's a possibility: we could redefine the limit at

Re: [HACKERS] 9.4 pg_restore --help changes

2014-08-08 Thread David G Johnston
Peter Eisentraut-2 wrote 9.3 pg_restore --help output: -I, --index=NAME restore named index -n, --schema=NAMErestore only objects in this schema -P, --function=NAME(args)restore named function -t, --table=NAME restore named table(s) -T,

Re: [HACKERS] Hardening pg_upgrade

2014-08-21 Thread David G Johnston
Bruce Momjian wrote I had to make an exception for temporary tables because pg_upgrade uses temporary tables to collect schema information. I tried writing the query to use CTEs (second patch), but I would then have to have one query for 8.3, which doesn't support CTEs, and another for 8.4+,

Re: [HACKERS] proposal: rounding up time value less than its unit.

2014-08-21 Thread David G Johnston
Peter Eisentraut-2 wrote On 8/21/14 11:16 AM, Tom Lane wrote: Heikki Linnakangas lt; hlinnakangas@ gt; writes: The patch also rounds a zero up to one. A naked zero with no unit is not affected, but e.g if you have log_rotation_age=0s, it will not disable the feature as you might expect,

Re: [HACKERS] proposal: rounding up time value less than its unit.

2014-08-23 Thread David G Johnston
Tom Lane-2 wrote Tomonari Katsumata lt; t.katsumata1122@ gt; writes: This patch rounds up the value when only it's less than required unit. .. Although my original complaint is fixed, I'm worried about this change will make users confusing. Indeed. I have not understood why you are

Re: [HACKERS] proposal: rounding up time value less than its unit.

2014-08-23 Thread David G Johnston
Tom Lane-2 wrote David G Johnston lt; david.g.johnston@ gt; writes: Tom Lane-2 wrote Indeed. I have not understood why you are insisting on round up semantics. Wouldn't it make more sense for the behavior to be round to nearest? That would get rid of any worries about treating zero

Re: [HACKERS] proposal: rounding up time value less than its unit.

2014-08-26 Thread David G Johnston
Tom Lane-2 wrote Robert Haas lt; robertmhaas@ gt; writes: I liked David Johnston's even stronger suggestion upthread: make it an error to specify a value requires rounding of any kind. In other words, if the minimum granularity is 1 minute, you can specify that as 60 seconds instead, but

  1   2   3   4   5   6   7   >