Re: Postgres, fsync, and OSs (specifically linux)

2018-05-18 Thread Thomas Munro
On Sat, May 19, 2018 at 9:03 AM, Andres Freund wrote: > I've written a patch series for this. Took me quite a bit longer than I > had hoped. Great. > I plan to switch to working on something else for a day or two next > week, and then polish this further. I'd greatly

Re: Should we add GUCs to allow partition pruning to be disabled?

2018-05-18 Thread Amit Langote
On Sat, May 19, 2018 at 5:02 AM, Robert Haas wrote: > On Fri, May 18, 2018 at 4:22 AM, Amit Langote > wrote: >> Yeah, I think it'd help to have Append be annotated as suggested by Robert >> above. I guess if "at executor startup" is shown,

Re: perl checking

2018-05-18 Thread Andrew Dunstan
On 05/18/2018 09:05 PM, Peter Eisentraut wrote: On 5/18/18 14:02, Andrew Dunstan wrote: These two small patches allow us to run "perl -cw" cleanly on all our perl code. It's not clear to me what that really means. My understanding is that perl "warnings" are primarily a run-time instrument,

Re: Should we add GUCs to allow partition pruning to be disabled?

2018-05-18 Thread Justin Pryzby
I reread this and have some more comments. https://www.postgresql.org/docs/devel/static/ddl-partitioning.html "however, it is not possible to use some of the inheritance features discussed in the previous section with partitioned tables and partitions" => The referenced section now follows

Re: perl checking

2018-05-18 Thread Peter Eisentraut
On 5/18/18 14:02, Andrew Dunstan wrote: > These two small patches allow us to run "perl -cw" cleanly on all our > perl code. It's not clear to me what that really means. My understanding is that perl "warnings" are primarily a run-time instrument, unlike 'use strict' and perl -c. I have been

Re: Postgres, fsync, and OSs (specifically linux)

2018-05-18 Thread Stephen Frost
Greetings, * Abhijit Menon-Sen (a...@2ndquadrant.com) wrote: > At 2018-05-18 20:27:57 -0400, sfr...@snowman.net wrote: > > > > I don't agree with the general notion that we can't have a function > > which handles the complicated bits about the kind of error because > > someone grep'ing the source

Re: Postgres, fsync, and OSs (specifically linux)

2018-05-18 Thread Stephen Frost
Greetings, * Ashutosh Bapat (ashutosh.ba...@enterprisedb.com) wrote: > On Thu, May 17, 2018 at 11:45 PM, Robert Haas wrote: > > On Thu, May 17, 2018 at 12:44 PM, Andres Freund wrote: > >> Hi, > >> > >> On 2018-05-10 09:50:03 +0800, Craig Ringer wrote:

Re: Flexible permissions for REFRESH MATERIALIZED VIEW

2018-05-18 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Tue, May 15, 2018 at 6:07 PM, Tom Lane wrote: > > That seems like an awful lot of work to handle what's still going to be > > a pretty small set of permissions. Every permission we add is going to > > have to be

Re: inconsistency and inefficiency in setup_conversion()

2018-05-18 Thread Thomas Munro
On Fri, May 18, 2018 at 10:53 PM, John Naylor wrote: > On 5/17/18, Thomas Munro wrote: >> Hi John, >> >> This failed for my patch testing robot on Windows, with this message[1]: > ... >> I see that you changed src/backend/catalog/Makefile to

Re: Postgres, fsync, and OSs (specifically linux)

2018-05-18 Thread Andres Freund
Hi, On 2018-04-27 15:28:42 -0700, Andres Freund wrote: > == Potential Postgres Changes == > > Several operating systems / file systems behave differently (See > e.g. [2], thanks Thomas) than we expected. Even the discussed changes to > e.g. linux don't get to where we thought we are. There's

Re: Incorrect comment in get_partition_dispatch_recurse

2018-05-18 Thread Robert Haas
On Thu, May 17, 2018 at 10:13 AM, Tom Lane wrote: > Maybe what you need is a redesign. This convention seems impossibly > confusing and hence error-prone. What about using a separate bool to > indicate which list the index refers to? I really don't think it's a big deal.

Re: Incorrect comment in get_partition_dispatch_recurse

2018-05-18 Thread Robert Haas
On Thu, May 17, 2018 at 9:56 PM, Amit Langote wrote: > On 2018/05/18 5:56, David Rowley wrote: >> On 18 May 2018 at 06:21, Robert Haas wrote: >>> All right, so let's just say that explicitly. Maybe something like >>> the attached. >> >> That

Re: Built-in connection pooling

2018-05-18 Thread Robert Haas
On Thu, May 17, 2018 at 9:09 PM, Bruce Momjian wrote: >> However, I think that's probably worrying about the wrong end of the >> problem first. IMHO, what we ought to start by doing is considering >> what a good architecture for this would be, and how to solve the >> general

Re: Should we add GUCs to allow partition pruning to be disabled?

2018-05-18 Thread Robert Haas
On Fri, May 18, 2018 at 4:22 AM, Amit Langote wrote: > Yeah, I think it'd help to have Append be annotated as suggested by Robert > above. I guess if "at executor startup" is shown, then the subnodes > listed under Append will consist of only those that survived >

Re: 'tuple concurrently updated' error w/o visible catalog updates

2018-05-18 Thread Robert Haas
On Thu, May 17, 2018 at 9:49 AM, Alex Kliukin wrote: > Earlier this week we have split our Postgres 9.6.8 shards, each having two > databases, into one database per shard setup. This was done by promoting > replicas and subsequently removing unused databases. > > Immediately

Re: Question about xmloption and pg_restore

2018-05-18 Thread Robert Haas
On Thu, May 17, 2018 at 9:37 AM, Stefan Fercot wrote: > When restoring a plain SQL dump, we got the message : > > ERROR: invalid XML content > DETAIL: line 1: StartTag: invalid element name > http://mrcc.com/qgis.dtd' 'SYSTEM'> > ^ > CONTEXT: COPY layer_styles, line

Re: Removing unneeded self joins

2018-05-18 Thread Robert Haas
On Wed, May 16, 2018 at 6:13 PM, Tom Lane wrote: > David Rowley writes: >> On 17 May 2018 at 08:44, Simon Riggs wrote: >>> What I was advocating was an approach that varies according to the >>> query cost, so we don't

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-05-18 Thread Robert Haas
On Fri, May 18, 2018 at 4:29 AM, Kyotaro HORIGUCHI wrote: > I have reached to the same thought. > > The point here is that it is a base relation, which is not > assumed to have additional columns not in its definition, > including nonsystem junk columns. I'm not

Re: Odd procedure resolution

2018-05-18 Thread Robert Haas
On Thu, May 17, 2018 at 4:10 PM, Peter Eisentraut wrote: > I think I have made a mistake here. I was reading in between the lines > of a competitor's documentation that they have functions and procedures > in different name spaces, which made me re-read the SQL

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-05-18 Thread Robert Haas
On Wed, May 16, 2018 at 11:30 PM, Etsuro Fujita wrote: >>> Attached is a patch for fixing this issue. >> This no longer applies. > The patch has already been committed by you [1]. Thanks for committing! Well, that's embarrassing. -- Robert Haas EnterpriseDB:

perl checking

2018-05-18 Thread Andrew Dunstan
These two small patches allow us to run "perl -cw" cleanly on all our perl code. One patch silences a warning from convutils.pl about the unportability of the literal 0x1. We've run for many years without this giving us a problem, so I think we can turn the warning off pretty

Re: Remove mention in docs that foreign keys on partitioned tables are not supported

2018-05-18 Thread Alvaro Herrera
On 2018-May-03, Robert Haas wrote: > The asymmetry doesn't seem horrible to me on its own merits, but it > would lead to some odd behavior: suppose you defined a BEFORE ROW > trigger and an AFTER ROW trigger on the parent, and then inserted one > row into the parent table and a second row

Re: PG 11 feature count

2018-05-18 Thread Simon Riggs
On 17 May 2018 at 18:29, Bruce Momjian wrote: > I regularly track the number of items documented in each major release. > I use the attached script. You might be surprised to learn that PG 11 > has the lowest feature count of any release back through 7.4: > > 7.4

Re: master fails to build on Windows

2018-05-18 Thread Sandeep Thakkar
On Fri, May 18, 2018 at 5:19 PM, John Naylor wrote: > On 5/18/18, Sandeep Thakkar wrote: > > Hi > > > > I was building the sources I got from https://www.postgresql.org/ > > ftp/snapshot/dev/ on Windows x64 and got the whole bunch of errors

Re: PG 11 feature count

2018-05-18 Thread Joshua D. Drake
On 05/17/2018 04:29 PM, Bruce Momjian wrote: I regularly track the number of items documented in each major release. I use the attached script. You might be surprised to learn that PG 11 has the lowest feature count of any release back through 7.4: 7.4 280 8.0 238

Re: PG 11 feature count

2018-05-18 Thread Jonathan S. Katz
> On May 18, 2018, at 10:41 AM, Alvaro Herrera wrote: > > On 2018-May-17, Bruce Momjian wrote: > >> 9.5 200 >> 9.6 220 >> 10 194 >> 11 167 > > Just yesterday Andres was telling us that pg11 has so much new stuff, > when compared

Re: [PROPOSAL] Shared Ispell dictionaries

2018-05-18 Thread Arthur Zakirov
On Thu, May 17, 2018 at 02:14:07PM -0400, Robert Haas wrote: > On Thu, May 17, 2018 at 1:52 PM, Tom Lane wrote: > > Do we actually need to worry about unmapping promptly on DROP TEXT > > DICTIONARY? It seems like the only downside of not doing that is that > > we'd leak some

Re: Postgres 11 release notes

2018-05-18 Thread Amit Langote
Hi Bruce. On Tue, May 15, 2018 at 12:46 PM, Amit Langote wrote: > On 2018/05/15 5:30, Bruce Momjian wrote: >> I like it, done. > > Thank you. I wonder what you think about including this little performance item:

Re: Postgres 11 release notes

2018-05-18 Thread Jonathan S. Katz
> On May 11, 2018, at 11:08 AM, Bruce Momjian wrote: > > I have committed the first draft of the Postgres 11 release notes. I > will add more markup soon. You can view the most current version here: > > http://momjian.us/pgsql_docs/release-11.html > > I expect a

Re: pg_control read error message

2018-05-18 Thread Magnus Hagander
On Fri, May 18, 2018 at 4:02 PM, Michael Paquier wrote: > On Fri, May 18, 2018 at 03:54:47PM +0300, Heikki Linnakangas wrote: > > Looks good to me. > > +1 for fixing that. get_controlfile() in controldata_utils.c also needs > to be fixed. > Pushed a fix including the

Re: [PROPOSAL] Shared Ispell dictionaries

2018-05-18 Thread Arthur Zakirov
On Thu, May 17, 2018 at 10:18:56AM -0400, Tom Lane wrote: > I think the point you've not addressed is that "syscache callback > occurred" does not equate to "object was dropped". Can the code > survive having this occur at any invalidation point? > (CLOBBER_CACHE_ALWAYS testing would soon expose

Re: PG 11 feature count

2018-05-18 Thread Bruce Momjian
On Fri, May 18, 2018 at 10:49:30AM -0400, Tom Lane wrote: > Alvaro Herrera writes: > > Just yesterday Andres was telling us that pg11 has so much new stuff, > > when compared to 9.5 and 9.6, that seemed to have not as much shiny > > things. I think it's all in the eye

Re: master fails to build on Windows

2018-05-18 Thread Tom Lane
John Naylor writes: > On 5/18/18, Sandeep Thakkar wrote: >> I was building the sources I got from https://www.postgresql.org/ >> ftp/snapshot/dev/ on Windows x64 and got the whole bunch of errors >> like "*Cannot >> open include file:

Re: pg_basebackup -k option

2018-05-18 Thread Magnus Hagander
On Fri, May 18, 2018 at 4:46 PM, Tom Lane wrote: > Peter Eisentraut writes: > > The new pg_basebackup -k option stands for --no-verify-checksums. That > > is nearly the opposite of initdb -k, which is for enabling checksums. I > > think it

Re: pg_basebackup -k option

2018-05-18 Thread Michael Banck
Hi, On Fri, May 18, 2018 at 10:46:37AM -0400, Tom Lane wrote: > Peter Eisentraut writes: > > The new pg_basebackup -k option stands for --no-verify-checksums. That > > is nearly the opposite of initdb -k, which is for enabling checksums. I > > think it could

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-05-18 Thread Masahiko Sawada
On Fri, May 11, 2018 at 9:56 AM, Masahiko Sawada wrote: > Thank you for the comment. > > On Fri, May 11, 2018 at 3:57 AM, Robert Haas wrote: >> On Tue, Feb 27, 2018 at 2:21 AM, Masahiko Sawada >> wrote: >>> I might be missing

Re: PG 11 feature count

2018-05-18 Thread Tom Lane
Alvaro Herrera writes: > Just yesterday Andres was telling us that pg11 has so much new stuff, > when compared to 9.5 and 9.6, that seemed to have not as much shiny > things. I think it's all in the eye of the beholder; our releases are > large, and getting larger every

Re: pg_basebackup -k option

2018-05-18 Thread Tom Lane
Peter Eisentraut writes: > The new pg_basebackup -k option stands for --no-verify-checksums. That > is nearly the opposite of initdb -k, which is for enabling checksums. I > think it could be confusing to have two related tools use the same > option letter for

Re: pg_basebackup -k option

2018-05-18 Thread Sergei Kornilov
Hi I think having only long option is enough regards, Sergei

Re: PG 11 feature count

2018-05-18 Thread Alvaro Herrera
On 2018-May-17, Bruce Momjian wrote: > 9.5 200 > 9.6 220 > 10 194 > 11 167 Just yesterday Andres was telling us that pg11 has so much new stuff, when compared to 9.5 and 9.6, that seemed to have not as much shiny things. I think it's all in the eye of

pg_basebackup -k option

2018-05-18 Thread Peter Eisentraut
The new pg_basebackup -k option stands for --no-verify-checksums. That is nearly the opposite of initdb -k, which is for enabling checksums. I think it could be confusing to have two related tools use the same option letter for nearly opposite purposes. How about using capital -K in

Re: Is a modern build system acceptable for older platforms

2018-05-18 Thread Bruce Momjian
On Thu, May 17, 2018 at 10:42:00PM -0700, Andres Freund wrote: > > We also have what seems like half an OS worth of tooling to support our > > shared-nothing-by-default multi-processing model. Custom spinlocks, our > > LWLocks, our latches, signal based IPC + ProcSignal signal multiplexing, > >

Re: Postgres 11 release notes

2018-05-18 Thread Tom Lane
While we're all griping about omissions from the release notes ... I think you should have documented that we fixed plpgsql to cope (or cope better, at least) with intrasession changes in the rowtypes of composite-type variables. See bug #15203 for the latest in a long line of user complaints

Re: pg_control read error message

2018-05-18 Thread Tom Lane
Heikki Linnakangas writes: > On 18/05/18 14:32, Magnus Hagander wrote: >> If pg_control is for some reason empty, we give an error messagfe like: >> 2018-05-18 13:24:03.342 CEST [19697] PANIC: could not read from control >> file: Success >> Which is, uh, wrong -- it's definitely

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-05-18 Thread Michael Paquier
On Fri, May 18, 2018 at 02:42:08PM +0800, Paul Guo wrote: > 2018-05-17 21:18 GMT+08:00 Michael Paquier : >> You should also add this patch to the next commit fest, development of >> v11 is done and it is a stabilization period now, so no new patches are >> merged. Here is

Re: pg_control read error message

2018-05-18 Thread Michael Paquier
On Fri, May 18, 2018 at 03:54:47PM +0300, Heikki Linnakangas wrote: > Looks good to me. +1 for fixing that. get_controlfile() in controldata_utils.c also needs to be fixed. -- Michael signature.asc Description: PGP signature

Re: Postgres 11 release notes

2018-05-18 Thread Bruce Momjian
On Fri, May 18, 2018 at 10:56:25AM +0500, Andrey Borodin wrote: > H, Bruce! > > > 11 мая 2018 г., в 20:08, Bruce Momjian написал(а): > > I expect a torrent of feedback. ;-) > > > I'm not sure it is usefull in release notes since it is more about API, and > not >

Re: SCRAM with channel binding downgrade attack

2018-05-18 Thread Bruce Momjian
On Fri, May 18, 2018 at 12:03:49PM +0900, Michael Paquier wrote: > On Fri, May 18, 2018 at 10:46:46AM +0900, Michael Paquier wrote: > > From a security point of view, 1) is important for libpq, but I am not > > much enthusiast about 2) as a whole. The backend has proper support for > > channel

Re: Postgres, fsync, and OSs (specifically linux)

2018-05-18 Thread Ashutosh Bapat
On Thu, May 17, 2018 at 11:45 PM, Robert Haas wrote: > On Thu, May 17, 2018 at 12:44 PM, Andres Freund wrote: >> Hi, >> >> On 2018-05-10 09:50:03 +0800, Craig Ringer wrote: >>> while ((src = (RewriteMappingFile *) hash_seq_search(_status)) != >>>

Re: pg_control read error message

2018-05-18 Thread Heikki Linnakangas
On 18/05/18 14:32, Magnus Hagander wrote: If pg_control is for some reason empty, we give an error messagfe like: 2018-05-18 13:24:03.342 CEST [19697] PANIC: could not read from control file: Success Which is, uh, wrong -- it's definitely not successful. Obviously this is a state where the

Re: master fails to build on Windows

2018-05-18 Thread John Naylor
On 5/18/18, Sandeep Thakkar wrote: > Hi > > I was building the sources I got from https://www.postgresql.org/ > ftp/snapshot/dev/ on Windows x64 and got the whole bunch of errors > like "*Cannot > open include file: 'catalog/pg_type_d.h"* , *"Cannot open include

pg_control read error message

2018-05-18 Thread Magnus Hagander
If pg_control is for some reason empty, we give an error messagfe like: 2018-05-18 13:24:03.342 CEST [19697] PANIC: could not read from control file: Success Which is, uh, wrong -- it's definitely not successful. Obviously this is a state where the user is fairly screwed anyway, but we should

Re: inconsistency and inefficiency in setup_conversion()

2018-05-18 Thread John Naylor
On 5/17/18, Thomas Munro wrote: > Hi John, > > This failed for my patch testing robot on Windows, with this message[1]: ... > I see that you changed src/backend/catalog/Makefile to pass the new -I > switch to genbki.pl. I think for Windows you might need to add it

Re: Postgres 11 release notes

2018-05-18 Thread Amit Kapila
On Tue, May 15, 2018 at 2:11 AM, Bruce Momjian wrote: > On Mon, May 14, 2018 at 05:34:54PM +0530, Dilip Kumar wrote: >> >> On Fri, May 11, 2018 at 8:38 PM, Bruce Momjian wrote: >> >> I have committed the first draft of the Postgres 11 release notes. I >>

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-05-18 Thread Kyotaro HORIGUCHI
At Fri, 18 May 2018 10:19:30 +0530, Ashutosh Bapat wrote in ashutosh.bapat> On Thu, May 17, 2018 at 11:56 PM, Robert Haas wrote: > > On Thu, May 17, 2018 at 2:10 AM,

Re: Should we add GUCs to allow partition pruning to be disabled?

2018-05-18 Thread Amit Langote
On 2018/05/17 23:24, Robert Haas wrote: > On Thu, May 17, 2018 at 12:04 AM, David Rowley wrote: >> I'm not really a fan of overloading properties with a bunch of text. >> Multiple int or text properties would be easier to deal with, >> especially so when you consider the other explain formats.

Re: postgres_fdw: Oddity in pushing down inherited UPDATE/DELETE joins to remote servers

2018-05-18 Thread Amit Langote
Fujita-san, On 2018/05/17 21:51, Etsuro Fujita wrote: > (2018/05/17 14:19), Amit Langote wrote: >> Looking at this for a bit, I wondered if this crash wouldn't have occurred >> if the "propagation" had also considered join relations in addition to >> simple relations.  For example, if I changed

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-05-18 Thread Etsuro Fujita
(2018/05/17 23:19), Ashutosh Bapat wrote: On Thu, May 17, 2018 at 4:50 PM, Etsuro Fujita wrote: (2018/05/16 22:49), Ashutosh Bapat wrote: On Wed, May 16, 2018 at 4:01 PM, Etsuro Fujita wrote: However, considering that

Re: [PATCH] Use access() to check file existence in GetNewRelFileNode().

2018-05-18 Thread Paul Guo
2018-05-17 21:18 GMT+08:00 Michael Paquier : > On Thu, May 17, 2018 at 05:23:28PM +0800, Paul Guo wrote: > > F_OK seems to be better than R_OK because we want to check file existence > > (not read permission) before creating the relation file with the path > > later. > >

[doc fix] Add operation of freeing output SQLDA

2018-05-18 Thread Kato, Sho
Hello I think it is better to add freeing operation of output SQLDA to the current PostgreSQL documentation. As far as I can see src/interfaces/ecpg/ecpglib/execute.c, if a previously existing sqlda is set to output SQLDA, then a previously existing sqlda is freed. But, the new output SQLDA's