Re: ALTER TABLE ADD COLUMN fast default

2018-03-28 Thread Andres Freund
Hi, On 2018-03-26 09:02:10 +1030, Andrew Dunstan wrote: > Thanks for this, all looks good. Here is the consolidate patch > rebased. If there are no further comments I propose to commit this in > a few days time. Here's a bit of post commit review: @@ -1310,13 +1679,11 @@

Re: Problem while setting the fpw with SIGHUP

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 03:40:59PM +0900, Kyotaro HORIGUCHI wrote: > The attached does that. I don't like that it uses ControlFileLock > to exlucde concurrent UpdateFullPageWrites and StartupXLOG but > WALInsertLock cannot be used since UpdateFullPageWrites may take > the same lock. You visibly

Re: Problem while setting the fpw with SIGHUP

2018-03-28 Thread Kyotaro HORIGUCHI
At Tue, 27 Mar 2018 22:02:26 +0900, Michael Paquier wrote in <20180327130226.ga1...@paquier.xyz> > On Tue, Mar 27, 2018 at 09:01:20PM +0900, Kyotaro HORIGUCHI wrote: > > The current UpdateFullPageWrites is safe on standby and promotion > > so what we should consider is only

Re: [HACKERS] [PATCH] Lockable views

2018-03-28 Thread Tatsuo Ishii
> On Tue, 27 Mar 2018 23:28:04 +0900 > Yugo Nagata wrote: > > I found the previous patch was broken and this can't handle > views that has subqueries as bellow; > >  CREATE VIEW lock_view6 AS SELECT * from (select * from lock_tbl1) sub; > > I fixed this and attached the

Re: PATCH: Configurable file mode mask

2018-03-28 Thread Michael Paquier
On Tue, Mar 27, 2018 at 04:21:09PM -0400, David Steele wrote: > These updates address Michael's latest review and implement group access > for pg_basebackup, pg_receivewal, and pg_recvlogical. A new internal > GUC, data_directory_group_access, allows remote processes to determine > the correct

Re: [HACKERS] [PATCH] Lockable views

2018-03-28 Thread Tatsuo Ishii
>> I found the previous patch was broken and this can't handle >> views that has subqueries as bellow; >> >>  CREATE VIEW lock_view6 AS SELECT * from (select * from lock_tbl1) sub; >> >> I fixed this and attached the updated version including additional tests. > > This patch gives a warning

Re: Enhance pg_stat_wal_receiver view to display connected host

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 03:41:33PM +1100, Haribabu Kommi wrote: > On Wed, Mar 28, 2018 at 12:54 PM, Michael Paquier > wrote: > Updated patch attached. Thanks, switched as ready for committer. -- Michael signature.asc Description: PGP signature

Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 02:13:19PM +1030, Andrew Dunstan wrote: > On Wed, Mar 28, 2018 at 12:57 PM, Michael Paquier wrote: >> Something that would address the issue would be to enforce a segment >> switch after each checkpoint, but that's a high price to pay on mostly >> idle

Re: [HACKERS] Surjective functional indexes

2018-03-28 Thread Konstantin Knizhnik
On 27.03.2018 22:08, Simon Riggs wrote: On 23 March 2018 at 15:54, Simon Riggs wrote: So please could you make the change? Committed, but I still think that change would be good. Thank you. But I still not sure whether replacement of bitmap with List or array of

Re: [HACKERS] why not parallel seq scan for slow functions

2018-03-28 Thread Amit Kapila
On Tue, Mar 27, 2018 at 10:59 PM, Robert Haas wrote: > On Tue, Mar 27, 2018 at 7:42 AM, Robert Haas wrote: >> On Tue, Mar 27, 2018 at 1:45 AM, Amit Kapila wrote: >>> If we don't want to go with the upperrel logic, then maybe

new buildfarm with gcc & clang "trunk" -Werror?

2018-03-28 Thread Fabien COELHO
Dear devs, I've been running buildfarm members moonjelly and seawasp which use gcc & clang weekly recompiled trunk versions to build postgres branch HEAD for about 6 months These helped uncover bugs in both gcc & clang, which were reported and fixed, so there is a benefit on this side.

Re: Proposal: http2 wire format

2018-03-28 Thread Craig Ringer
On 28 March 2018 at 16:02, Andres Freund wrote: > On 2018-03-26 22:44:09 +0200, Damir Simunic wrote: > > > *NONE* of the interesting problems are solved by HTTP2. You *still* > > > need a full blown protocol ontop of it. So no, this doesn't change > that. > > > > If you had

Re: Proposal: http2 wire format

2018-03-28 Thread Tatsuo Ishii
> A few random, very tired, points: > > - consolidated message for common tasks: > - (bind, [describe?,] execute) to reduce overhead of prepared > statement execution (both in messages, as well as branches) > - (anonymous parse, bind, describe, execute) to make it cheaper to > send

Re: Cast jsonb to numeric, int, float, bool

2018-03-28 Thread Teodor Sigaev
I think, it should support from/to numeric/bool/text only. If we want to have casts to from numeric to other numeric types then it should be full set (int2, int4, int8, float4, float8). I was too optimistic about casting to/from text. It already exists and it works by differ way from

Re: new function for tsquery creartion

2018-03-28 Thread Aleksander Alekseev
Hello Dmitry, > A few gotchas: > > I haven't touched gettoken_tsvector() yet. As a result, the following > queries produce errors: > > select websearch_to_tsquery('simple', ); > ERROR: syntax error in tsquery: "'" > > select websearch_to_tsquery('simple', '\'); > ERROR: there is no

Re: Proposal: http2 wire format

2018-03-28 Thread Craig Ringer
On 28 March 2018 at 00:42, Damir Simunic wrote: > > > I'm rapidly losing interest. Unless this goes back toward the concrete and > practical I think it's going nowhere. > > > > Your message is exactly what I was hoping for. Thanks for your guidance > and support,

Re: Proposal: http2 wire format

2018-03-28 Thread Andres Freund
On 2018-03-26 22:44:09 +0200, Damir Simunic wrote: > > *NONE* of the interesting problems are solved by HTTP2. You *still* > > need a full blown protocol ontop of it. So no, this doesn't change that. > > If you had to nominate only one of those problems, which one would you > consider the most

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

2018-03-28 Thread Ashutosh Bapat
On Wed, Mar 28, 2018 at 6:58 AM, Amit Langote wrote: >> which violates the constraint on the column b (ie, b > 0), so this >> should abort. The reason for that is because CopyFrom looks at the >> parent relation's constraints, not the partition's constraints, when

Re: [HACKERS] [PATCH] Lockable views

2018-03-28 Thread Yugo Nagata
On Wed, 28 Mar 2018 15:45:09 +0900 (JST) Tatsuo Ishii wrote: > >> I found the previous patch was broken and this can't handle > >> views that has subqueries as bellow; > >> > >>  CREATE VIEW lock_view6 AS SELECT * from (select * from lock_tbl1) sub; > >> > >> I fixed this

Re: [HACKERS] A design for amcheck heapam verification

2018-03-28 Thread Pavan Deolasee
On Wed, Mar 28, 2018 at 2:48 AM, Peter Geoghegan wrote: > On Tue, Mar 27, 2018 at 6:48 AM, Pavan Deolasee > wrote: > > + * When index-to-heap verification is requested, a Bloom filter is used > to > > + * fingerprint all tuples in the target index, as the

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

2018-03-28 Thread Etsuro Fujita
(2018/03/28 10:28), Amit Langote wrote: >> Attached is a patch for fixing this issue. > > That looks good to me. This one would need to be back-patched to v10. Thanks for the review! Best regards, Etsuro Fujita

Re: [HACKERS] [PATCH] Lockable views

2018-03-28 Thread Tatsuo Ishii
> On Wed, 28 Mar 2018 15:45:09 +0900 (JST) > Tatsuo Ishii wrote: > >> >> I found the previous patch was broken and this can't handle >> >> views that has subqueries as bellow; >> >> >> >>  CREATE VIEW lock_view6 AS SELECT * from (select * from lock_tbl1) sub; >> >> >> >> I

Re: [HACKERS] [PATCH] Incremental sort

2018-03-28 Thread Teodor Sigaev
BTW, patch had conflicts with master.  Please, find rebased version attached. Despite by patch conflist patch looks commitable, has anybody objections to commit it? Patch recieved several rounds of review during 2 years, and seems to me, keeping it out from sources may cause a lost it.

Re: Parallel Aggregates for string_agg and array_agg

2018-03-28 Thread Tomas Vondra
On 03/28/2018 05:28 AM, Tom Lane wrote: > Tomas Vondra writes: >> On 03/27/2018 04:51 AM, David Rowley wrote: >>> Seems I didn't mean "trans types". I should have said aggregate >>> function argument types. > >> I'm not sure that's better than the check proposed

Re: Jsonb transform for pl/python

2018-03-28 Thread Peter Eisentraut
On 3/21/18 18:50, Peter Eisentraut wrote: > On 3/12/18 11:26, Nikita Glukhov wrote: >> I have reviewed this patch. Attached new 6th version of the patch with >> v5-v6 delta-patch. > > Thanks for the update. I'm working on committing this. Committed. Everything seemed to work well. I just did

Re: [HACKERS] A design for amcheck heapam verification

2018-03-28 Thread Pavan Deolasee
On Wed, Mar 28, 2018 at 2:48 AM, Peter Geoghegan wrote: > > I don't think so. The transaction involved is still an ordinary user > transaction. > > Mostly a nitpick, but I guess we should leave a comment after IndexBuildHeapScan() saying heap_endscan() is not necessary since

Re: PL/pgSQL nested CALL with transactions

2018-03-28 Thread Tomas Vondra
On 03/28/2018 02:54 PM, Peter Eisentraut wrote: > On 3/27/18 20:43, Tomas Vondra wrote: 3) utility.c I find this condition rather confusing: (!(context == PROCESS_UTILITY_TOPLEVEL || context == PROCESS_UTILITY_QUERY_NONATOMIC) ||

Re: [HACKERS] [PATCH] Incremental sort

2018-03-28 Thread Teodor Sigaev
BTW, patch had conflicts with master.  Please, find rebased version attached. Sorry, but patch conflicts with master again. -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/

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

2018-03-28 Thread Etsuro Fujita
(2018/03/28 18:51), Ashutosh Bapat wrote: On Wed, Mar 28, 2018 at 6:58 AM, Amit Langote wrote: Attached is a patch for fixing this issue. That looks good to me. This one would need to be back-patched to v10. Thanks. Please add to the next commitfest so

Re: PL/pgSQL nested CALL with transactions

2018-03-28 Thread Peter Eisentraut
On 3/27/18 20:43, Tomas Vondra wrote: >>> 3) utility.c >>> >>> I find this condition rather confusing: >>> >>> (!(context == PROCESS_UTILITY_TOPLEVEL || >>>context == PROCESS_UTILITY_QUERY_NONATOMIC) || >>>IsTransactionBlock()) >>> >>> I mean, negated || with another || - it

Re: [HACKERS] logical decoding of two-phase transactions

2018-03-28 Thread Simon Riggs
On 28 March 2018 at 16:28, Nikhil Sontakke wrote: > Simon, 0003-Add-GID-and-replica-origin-to-two-phase-commit-abort.patch > is the exact patch that you had posted for an earlier commit. 0003 Pushed -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL

Re: Rangejoin rebased

2018-03-28 Thread David Steele
On 3/2/18 11:44 AM, Robert Haas wrote: > On Fri, Mar 2, 2018 at 11:12 AM, Alexander Kuzmenkov > wrote: >> On 16.01.2018 10:49, Jeff Davis wrote: >>> My proposed fix is to make an internal opfamily identical to the >>> external one, such that it's not recognized as part

Re: [bug fix] pg_rewind creates corrupt WAL files, and the standby cannot catch up the primary

2018-03-28 Thread Fujii Masao
On Wed, Mar 28, 2018 at 11:24 AM, Michael Paquier wrote: > On Wed, Mar 28, 2018 at 04:45:49AM +0900, Fujii Masao wrote: >> The patch looks good to me! Barring objection, I will commit it >> and back-patch to 9.5 where pg_rewind was added. > > Thanks in advance! I just

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 13:52:24 -0400, Tom Lane wrote: > Andres Freund writes: > > Given, as explained nearby, we already do store transient data in the > > ctid for speculative insertions (i.e. ON CONFLICT), and it hasn't caused > > even a whiff of trouble, I'm currently not

Re: Sample values for pg_stat_statements

2018-03-28 Thread David Steele
On 3/21/18 1:31 PM, David Steele wrote: > > On 3/10/18 9:02 AM, Tomas Vondra wrote: >> >> I've looked at this patch today. I like the idea / intent in general, as >> it helps with some investigation tasks. That being said, I have a couple >> of questions/comments based on read through the patch:

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Wednesday, March 28, 2018, Fabien COELHO wrote: > > > And if we introduce csv-specific fieldsep, then we multiply this wrong >> design. The fix in this direction is renaming fieldsep to fieldsep-unaliagn >> - but it is probably too big change too. So this design is

Re: Reopen logfile on SIGHUP

2018-03-28 Thread David Steele
On 2/27/18 8:54 PM, Michael Paquier wrote: > On Tue, Feb 27, 2018 at 05:52:20PM -0500, Tom Lane wrote: >> It already does treat SIGUSR1 as a log rotation request. Apparently >> the point of this patch is that some people don't find that easy enough >> to use, which is fair, because finding out

Re: Rangejoin rebased

2018-03-28 Thread David Steele
On 3/28/18 2:23 PM, Andres Freund wrote: > On 2018-03-28 14:18:42 -0400, David Steele wrote: >> It seems that a new patch is needed here but none has been presented. >> I've marked this Waiting on Author for the moment, but I really think it >> should be marked Returned with Feedback and submitted

Re: Function to track shmem reinit time

2018-03-28 Thread David Steele
On 3/4/18 11:17 AM, Tomas Vondra wrote: > > Furthermore, the patch is yet another victim of fd1a421fe - fixing the > pg_proc entries is trivial, but a new version is needed. > > I'd also like to see an example/explanation how this improves this > situation compared to only having

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Wednesday, March 28, 2018, David G. Johnston wrote: > On Wednesday, March 28, 2018, Pavel Stehule > wrote: > >> >> Are there some possible alternatives? >>> >>> Given the date and the fact that the cf end is 3 days away, the proposed

Re: csv format for psql

2018-03-28 Thread Joshua D. Drake
On 03/28/2018 12:35 PM, David G. Johnston wrote: On Monday, March 26, 2018, Daniel Verite > wrote: We could even support only the comma and make it non-configurable based on the fact it's Comma-Separated-Values, not

Re: Using base backup exclusion filters to reduce data transferred with pg_rewind

2018-03-28 Thread Fujii Masao
On Wed, Mar 28, 2018 at 7:54 AM, Michael Paquier wrote: > On Wed, Mar 28, 2018 at 04:13:25AM +0900, Fujii Masao wrote: >> This code is almost ok in practice, but using the check of >> "strstr(path, localpath) == path" is more robust here? > > No problems with that either. >

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-03-28 Thread Teodor Sigaev
Hi! I slightly modified test for clean demonstration of difference between fastupdate on and off. Also I added CheckForSerializableConflictIn() to fastupdate off codepath, but only in case of non-empty pending list. The next question what I see: why do not we lock entry leaf pages in some

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-03-28 Thread David Steele
On 2/27/18 2:21 AM, Masahiko Sawada wrote: > > Hmm, although I've thought concern in case where we don't consider > local xids of un-resolved fdwxact in GetOldestXmin, I could not find > problem. Could you share your concern if you have? I'll try to find a > possibility based on it. It appears

Re: PL/pgSQL nested CALL with transactions

2018-03-28 Thread Peter Eisentraut
On 3/28/18 09:00, Tomas Vondra wrote: > I see. I thought "fixed" means you adopted the #define, but that's not > the case. I don't think an extra comment is needed - the variable name > is descriptive enough IMHO. Committed as presented then. Thanks. -- Peter Eisentraut

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Monday, March 26, 2018, Daniel Verite wrote: > > We could even support only the comma and make it non-configurable > based on the fact it's Comma-Separated-Values, not > Whatever-Separated-Values, except that won't do much > to serve the users interests, as the

Re: PostgreSQL crashes with SIGSEGV

2018-03-28 Thread Tom Lane
Peter Geoghegan writes: > On Mon, Mar 26, 2018 at 5:14 AM, Kyotaro HORIGUCHI > wrote: >> If no one objects, I'll mark this as Ready for Commit in a couple >> of days. > Thank you for the review, Horiguchi-san. It's hard to decide how > important

Re: disable SSL compression?

2018-03-28 Thread Konstantin Knizhnik
On 28.03.2018 20:26, Konstantin Knizhnik wrote: On 17.03.2018 17:18, Peter Eisentraut wrote: On 3/11/18 13:28, Tom Lane wrote: My proposal is the attached patch that sets the default in libpq to off and adjusts the documentation a bit so it doesn't sound like we have missed the news

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-28 Thread Tom Lane
Andres Freund writes: > On 2018-03-08 13:46:53 -0500, Tom Lane wrote: >> ... Breaking fundamental invariants like >> "ctid points to this tuple or its update successor" is going to cause >> trouble. There's a lot of code that knows that; more than knows the >> details of

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Wednesday, March 28, 2018, Pavel Stehule wrote: > > Are there some possible alternatives? >>> >> >> Given the date and the fact that the cf end is 3 days away, the proposed >> short term alternative is Daniel's version, that I feel is reasonable. Ok, >> people have to

Re: disable SSL compression?

2018-03-28 Thread Konstantin Knizhnik
On 17.03.2018 17:18, Peter Eisentraut wrote: On 3/11/18 13:28, Tom Lane wrote: My proposal is the attached patch that sets the default in libpq to off and adjusts the documentation a bit so it doesn't sound like we have missed the news altogether. Seems reasonable as far as it goes, but do

Re: [HACKERS] why not parallel seq scan for slow functions

2018-03-28 Thread Amit Kapila
On Thu, Mar 29, 2018 at 2:31 AM, Robert Haas wrote: > On Wed, Mar 28, 2018 at 3:06 AM, Amit Kapila wrote: >> >> The above block takes 43700.0289 ms on Head and 45025.3779 ms with the >> patch which is approximately 3% regression. > > Thanks for the

Re: Problem while setting the fpw with SIGHUP

2018-03-28 Thread Kyotaro HORIGUCHI
At Wed, 28 Mar 2018 15:59:48 +0900, Michael Paquier wrote in <20180328065948.gm1...@paquier.xyz> > On Wed, Mar 28, 2018 at 03:40:59PM +0900, Kyotaro HORIGUCHI wrote: > > The attached does that. I don't like that it uses ControlFileLock > > to exlucde concurrent

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-03-28 Thread Thomas Munro
On Thu, Mar 29, 2018 at 6:00 PM, Justin Pryzby wrote: > The retries are the source of the problem ; the first fsync() can return EIO, > and also *clears the error* causing a 2nd fsync (of the same data) to return > success. What I'm failing to grok here is how that error

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-03-28 Thread Craig Ringer
On 29 March 2018 at 10:48, Thomas Munro wrote: > On Thu, Mar 29, 2018 at 3:30 PM, Michael Paquier > wrote: > > On Tue, Mar 27, 2018 at 11:53:08PM -0400, Tom Lane wrote: > >> Craig Ringer writes: > >>> TL;DR: Pg should

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-03-28 Thread Justin Pryzby
On Thu, Mar 29, 2018 at 11:30:59AM +0900, Michael Paquier wrote: > On Tue, Mar 27, 2018 at 11:53:08PM -0400, Tom Lane wrote: > > Craig Ringer writes: > >> TL;DR: Pg should PANIC on fsync() EIO return. > > > > Surely you jest. > > Any callers of pg_fsync in the backend

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-03-28 Thread Craig Ringer
On 29 March 2018 at 13:06, Thomas Munro wrote: > On Thu, Mar 29, 2018 at 6:00 PM, Justin Pryzby > wrote: > > The retries are the source of the problem ; the first fsync() can return > EIO, > > and also *clears the error* causing a 2nd fsync

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-03-28 Thread Craig Ringer
On 29 March 2018 at 10:30, Michael Paquier wrote: > On Tue, Mar 27, 2018 at 11:53:08PM -0400, Tom Lane wrote: > > Craig Ringer writes: > >> TL;DR: Pg should PANIC on fsync() EIO return. > > > > Surely you jest. > > Any callers of pg_fsync in the

Re: pg_class.reltuples of brin indexes

2018-03-28 Thread Masahiko Sawada
On Tue, Mar 27, 2018 at 11:28 PM, Alvaro Herrera wrote: > Tom Lane wrote: >> Tomas Vondra writes: >> > I think number of index tuples makes sense, as long as that's what the >> > costing needs. That is, it's up to the index AM to define it.

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-03-28 Thread Craig Ringer
On 28 March 2018 at 11:53, Tom Lane wrote: > Craig Ringer writes: > > TL;DR: Pg should PANIC on fsync() EIO return. > > Surely you jest. > No. I'm quite serious. Worse, we quite possibly have to do it for ENOSPC as well to avoid similar

Re: PQHost() undefined behavior if connecting string contains both host and hostaddr types

2018-03-28 Thread Kyotaro HORIGUCHI
At Wed, 28 Mar 2018 10:34:49 +0900, Michael Paquier wrote in <20180328013449.gc1...@paquier.xyz> > On Wed, Mar 28, 2018 at 11:06:23AM +1100, Haribabu Kommi wrote: > > On Wed, Mar 28, 2018 at 3:35 AM, Peter Eisentraut < > > peter.eisentr...@2ndquadrant.com> wrote: > >> > >>

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Wed, Mar 28, 2018 at 4:19 PM, Isaac Morland wrote: > On 28 March 2018 at 15:43, Joshua D. Drake wrote: > >> On 03/28/2018 12:35 PM, David G. Johnston wrote: >> >> I like to call it "Character Separated Values" now for just that reason. >> >>

Re: ALTER TABLE ADD COLUMN fast default

2018-03-28 Thread Andrew Dunstan
On Wed, Mar 28, 2018 at 5:30 PM, Andres Freund wrote: > Hi, > > On 2018-03-26 09:02:10 +1030, Andrew Dunstan wrote: >> Thanks for this, all looks good. Here is the consolidate patch >> rebased. If there are no further comments I propose to commit this in >> a few days time. >

Re: Using base backup exclusion filters to reduce data transferred with pg_rewind

2018-03-28 Thread Michael Paquier
On Thu, Mar 29, 2018 at 05:01:40AM +0900, Fujii Masao wrote: > Committed. Thanks! Thanks for including as well the documentation changes and committing it. The result looks good to me. -- Michael signature.asc Description: PGP signature

Re: Proposal: http2 wire format

2018-03-28 Thread Peter Eisentraut
On 3/28/18 12:09, Andres Freund wrote: > Yea, not the most descriptive... Returning multiple different resultsets > from a function / procedure. Inability to do so is a serious limitation > of postgres in comparison to some other language with procedures. This is already possible as far as the

Re: [HACKERS] A design for amcheck heapam verification

2018-03-28 Thread Peter Geoghegan
On Wed, Mar 28, 2018 at 5:04 AM, Pavan Deolasee wrote: > Hmm Ok. It still sounds backwards to me, but then English is not my first or > even second language. "A heap scan later verifies the presence in the heap > of all index tuples fingerprinted" sounds as if we expect

Re: [HACKERS] A design for amcheck heapam verification

2018-03-28 Thread Peter Geoghegan
On Wed, Mar 28, 2018 at 5:47 AM, Pavan Deolasee wrote: > Mostly a nitpick, but I guess we should leave a comment after > IndexBuildHeapScan() saying heap_endscan() is not necessary since > IndexBuildHeapScan() does that internally. I stumbled upon that while > looking

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-03-28 Thread Michael Paquier
On Tue, Mar 27, 2018 at 11:53:08PM -0400, Tom Lane wrote: > Craig Ringer writes: >> TL;DR: Pg should PANIC on fsync() EIO return. > > Surely you jest. Any callers of pg_fsync in the backend code are careful enough to check the returned status, sometimes doing retries like

Re: Rangejoin rebased

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 14:18:42 -0400, David Steele wrote: > It seems that a new patch is needed here but none has been presented. > I've marked this Waiting on Author for the moment, but I really think it > should be marked Returned with Feedback and submitted to the next CF > when a new patch is

Re: Trigger file behavior with the standby

2018-03-28 Thread Keiko Oda
Thanks a lot for the answer, Michael (and sorry for the slow response)! So, if I understand what you're saying correctly, I'm seeing this behavior because wal-e keeps fetching wal files from s3 regardless of this trigger_file, and these fetched wal files are in pg_wal (or pg_xlog), therefore

Re: JIT compiling with LLVM v12

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 06:24:53PM -0400, David Steele wrote: > On 3/28/18 6:09 PM, Andres Freund wrote: >> Hah! Happy to, if there's enough people interested. I've a talk about >> it too (state of jit, 2018 edition), but I wasn't planning to go into >> too low level details. More about what is

Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 08:50:21PM -0400, Robert Haas wrote: > On Tue, Mar 27, 2018 at 11:53 PM, Pavan Deolasee > wrote: >> Yeah, we should not do that. The patch surely does not intend to replay any >> more WAL than what we do today. The idea is to just use a different

Re: Flexible permissions for REFRESH MATERIALIZED VIEW

2018-03-28 Thread Isaac Morland
Thanks for taking the time to look at this. I think I was unclear in a couple of places so I think my proposal may have appeared worse than it is. Details below: On 18 March 2018 at 20:25, Tom Lane wrote: > Isaac Morland writes: > > The original

Re: Flexible permissions for REFRESH MATERIALIZED VIEW

2018-03-28 Thread David G. Johnston
On Wed, Mar 28, 2018 at 6:38 PM, Isaac Morland wrote: > ​​ > One question I would have is: what proposals exist or have existed for > additional privilege bits? How much pressure is there to use some of the > remaining bits? I actually looked into the history of the

Re: Parallel Aggregates for string_agg and array_agg

2018-03-28 Thread David Rowley
On 29 March 2018 at 03:05, Tomas Vondra wrote: > On 03/28/2018 03:54 PM, Tom Lane wrote: >> I had in mind to look at exprType() of the argument. > > Right, I'm fine with that. Attached is v9, which is based on Tom's v8 but includes the new tests and I think the

Re: ALTER TABLE ADD COLUMN fast default

2018-03-28 Thread Tom Lane
Andrew Dunstan writes: > On Wed, Mar 28, 2018 at 5:30 PM, Andres Freund wrote: >> + /* >> +* Missing value for added columns. This is a one element array >> which lets >> +* us store a value of the attribute type here. >>

Re: Trigger file behavior with the standby

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 12:23:31PM -0700, Keiko Oda wrote: > Thanks a lot for the answer, Michael (and sorry for the slow response)! No problem. > So, if I understand what you're saying correctly, I'm seeing this behavior > because wal-e keeps fetching wal files from s3 regardless of this >

Re: [bug fix] pg_rewind creates corrupt WAL files, and the standby cannot catch up the primary

2018-03-28 Thread Michael Paquier
On Thu, Mar 29, 2018 at 04:04:58AM +0900, Fujii Masao wrote: > Pushed. Thanks! Nice, thanks. -- Michael signature.asc Description: PGP signature

Re: Small proposal to improve out-of-memory messages

2018-03-28 Thread Craig Ringer
On 29 March 2018 at 09:07, Tom Lane wrote: > I was looking at > https://www.postgresql.org/message-id/CAG_=8kAYKjhQX3FmAWQBC95Evh3+ > qszoqxknmm1q4w1qo7+...@mail.gmail.com > > in which the most salient issue is > > > 2018-03-28 19:20:33.264 UTC [10580] cory@match ERROR: out

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-03-28 Thread Masahiko Sawada
On Thu, Mar 29, 2018 at 2:27 AM, David Steele wrote: > On 2/27/18 2:21 AM, Masahiko Sawada wrote: >> >> Hmm, although I've thought concern in case where we don't consider >> local xids of un-resolved fdwxact in GetOldestXmin, I could not find >> problem. Could you share your

Re: JIT compiling with LLVM v12

2018-03-28 Thread Amit Langote
On 2018/03/29 9:35, Michael Paquier wrote: > On Wed, Mar 28, 2018 at 06:24:53PM -0400, David Steele wrote: >> On 3/28/18 6:09 PM, Andres Freund wrote: >>> Hah! Happy to, if there's enough people interested. I've a talk about >>> it too (state of jit, 2018 edition), but I wasn't planning to go

Re: ALTER TABLE ADD COLUMN fast default

2018-03-28 Thread Andrew Dunstan
On Thu, Mar 29, 2018 at 10:19 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On Wed, Mar 28, 2018 at 5:30 PM, Andres Freund wrote: >>> + /* >>> +* Missing value for added columns. This is a one element array

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-03-28 Thread Thomas Munro
On Thu, Mar 29, 2018 at 3:30 PM, Michael Paquier wrote: > On Tue, Mar 27, 2018 at 11:53:08PM -0400, Tom Lane wrote: >> Craig Ringer writes: >>> TL;DR: Pg should PANIC on fsync() EIO return. >> >> Surely you jest. > > Any callers of pg_fsync in the

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-03-28 Thread Tom Lane
Claudio Freire writes: > v10 counted the number of blocks with updated free space to vacuum the > FSM only after a lot of changes to it were made. This will vacuum the > FSM after *scanning* a lot of pages, even if little modifications were > made to them. Yes, that's

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2018-03-28 Thread Dean Rasheed
On 28 March 2018 at 15:50, Tomas Vondra wrote: > After thinking about this a bit more, I'm not sure if updating the info > based on recursive calls makes sense. The fullmatch flag was supposed to > answer a simple question - can there be just a single matching item?

Re: Fix a typo in walsender.c

2018-03-28 Thread atorikoshi
On 2018/03/29 7:23, Bruce Momjian wrote: Thanks, patch applied. Thank you for committing!

Re: [HACKERS] Pluggable storage

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 12:23:56PM -0400, David Steele wrote: > I think this entry should be moved the the next CF. I'll do that > tomorrow unless there are objections. Instead of moving things to the next CF by default, perhaps it would make more sense to mark things as reviewed with feedback

Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()

2018-03-28 Thread Robert Haas
On Tue, Mar 27, 2018 at 11:53 PM, Pavan Deolasee wrote: > Yeah, we should not do that. The patch surely does not intend to replay any > more WAL than what we do today. The idea is to just use a different > mechanism to find the prior checkpoint. But we should surely find

Re: ALTER TABLE ADD COLUMN fast default

2018-03-28 Thread Haribabu Kommi
On Mon, Mar 26, 2018 at 9:32 AM, Andrew Dunstan wrote: > > > Thanks for this, all looks good. Here is the consolidate patch > rebased. If there are no further comments I propose to commit this in > a few days time. I have some comments with the committed patch.

Re: Small proposal to improve out-of-memory messages

2018-03-28 Thread Michael Paquier
On Thu, Mar 29, 2018 at 09:29:59AM +0800, Craig Ringer wrote: > This would have been significantly useful to me in the past, so +1 from me. As long as that does not cost more memory, +1. -- Michael signature.asc Description: PGP signature

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2018-03-28 Thread Dmitry Dolgov
> On 22 March 2018 at 14:18, Ashutosh Bapat > wrote: > On Thu, Mar 22, 2018 at 4:32 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: >>> On 12 March 2018 at 06:00, Ashutosh Bapat >>> wrote: >>> Thanks for the note. Here are

Re: JIT compiling with LLVM v12

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 14:27:51 -0700, Andres Freund wrote: > > 7/10 committed. Inlining, Explain, Docs remain. > > I've pushed these three. One tiny pending commit I have is to add a few pg_noinline annotations to slow-path functions, to avoid very common spurious inlines. I'll play a littlebit

Re: JIT compiling with LLVM v12

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 18:06:24 -0400, Peter Eisentraut wrote: > On 3/28/18 17:27, Andres Freund wrote: > > I've pushed these three. > > Great, now the only thing remaining is to prepare an unconference > session explaining all this to the rest of us. ;-) Hah! Happy to, if there's enough people

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-28 Thread Arthur Zakirov
Here is the new version of the patch. Now RemoveTSDictionaryById() and AlterTSDictionary() unpin the dictionary DSM segment. So if all attached backends disconnect allocated DSM segments will be released. lookup_ts_dictionary_cache() may unping DSM mapping for all invalid dictionary cache

Re: WIP: Covering + unique indexes.

2018-03-28 Thread Peter Eisentraut
On 1/25/18 23:19, Thomas Munro wrote: > + PRIMARY KEY ( class="parameter">column_name [, ... ] ) class="parameter">index_parameters INCLUDE > (column_name [, > ...]) | > > I hadn't seen that use of "" before. Almost everywhere else > we use explicit [ and ] characters, but I see that there

Re: JIT compiling with LLVM v12

2018-03-28 Thread David Steele
On 3/28/18 6:09 PM, Andres Freund wrote: On 2018-03-28 18:06:24 -0400, Peter Eisentraut wrote: On 3/28/18 17:27, Andres Freund wrote: I've pushed these three. Great, now the only thing remaining is to prepare an unconference session explaining all this to the rest of us. ;-) Hah! Happy

Re: csv format for psql

2018-03-28 Thread Isaac Morland
On 28 March 2018 at 15:43, Joshua D. Drake wrote: > On 03/28/2018 12:35 PM, David G. Johnston wrote: > > I like to call it "Character Separated Values" now for just that reason. > > > Isn't the actual wording Character Delimited Values? I may be picking at > hairs here

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-03-28 Thread Tom Lane
Claudio Freire writes: > Attached patches, rebased and modified as discussed: > 1 no longer does tree pruning, it just vacuums a range of the FSM > 2 reintroduces tree pruning for the initial FSM vacuum > 3 and 4 remain as they were, but rebased I reviewed and cleaned up

Re: new buildfarm with gcc & clang "trunk" -Werror?

2018-03-28 Thread Peter Eisentraut
On 3/28/18 04:06, Fabien COELHO wrote: > Would the project feel appropriate to: > > - fix these warnings (other than putting -Wno-format-truncation or > similar workarounds...). I've been tracking gcc-8, and I have a patch ready, but these things change a bit with every compiler snapshot,

Re: Fix a typo in walsender.c

2018-03-28 Thread Bruce Momjian
On Tue, Feb 27, 2018 at 07:22:20PM +0900, atorikoshi wrote: > Hi, > > Attached a minor patch for a typo: s/log/lag > > Regards, > > -- > Atsushi Torikoshi > NIPPON TELEGRAPH AND TELEPHONE CORPORATION > NTT Open Source Software Center > diff --git a/src/backend/replication/walsender.c >

  1   2   >