RE: Postgres 11 release notes

2018-05-14 Thread Huong Dangminh
Hi, > From: David Rowley [mailto:david.row...@2ndquadrant.com] > Sent: Tuesday, May 15, 2018 3:01 PM > To: Bruce Momjian > Cc: Đặng Minh Hướng ; PostgreSQL-development > > Subject: Re: Postgres 11 release notes > > On 15 May 2018 at 08:28, Bruce Momjian wrote: > > Consistently return N

Re: Postgres 11 release notes

2018-05-14 Thread David Rowley
On 12 May 2018 at 03:08, 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 torrent of feedback. ;-) I wonde

Re: Postgres 11 release notes

2018-05-14 Thread David Rowley
On 15 May 2018 at 08:28, Bruce Momjian wrote: > Consistently return NaN for > NaN inputs to power() > on older platforms (Dang Minh Huong) While I'm not in favour of removing Dang's credit here, technically this patch was Tom's. The code added in float.c by Dang's patch (6

Re: Postgres 11 release notes

2018-05-14 Thread Etsuro Fujita
(2018/05/12 0:08), 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 torrent of feedback. ;-) On a personal note, I

Re: Postgres 11 release notes

2018-05-14 Thread Amit Langote
On 2018/05/15 5:30, Bruce Momjian wrote: > On Sun, May 13, 2018 at 06:53:26PM +0900, Amit Langote wrote: >> The following item >> >> + >> + >> + >> +Have psql \d+ show a partition count of zero (Amit Langote) >> + >> >> missed mentioning Ashutosh Bapat as an author. > > Added

Re: Postgres 11 release notes

2018-05-14 Thread Amit Kapila
On Tue, May 15, 2018 at 2:05 AM, Bruce Momjian wrote: > On Sun, May 13, 2018 at 04:40:19PM +0530, Amit Kapila 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 >> > will add more markup soon. You can view th

Re: Postgres 11 release notes

2018-05-14 Thread Dang Minh Huong
Hi, 2018/05/15 5:28、Bruce Momjian のメール: > Added: > >Consistently return NaN for >NaN inputs to power() >on older platforms (Dang Minh Huong) Thank you. Regards, —- Dang Minh Huong

Re:Re: some question about _bt_getbuf

2018-05-14 Thread 自己
At 2018-05-15 01:49:41, "Tom Lane" wrote: >=?GBK?B?19S8ug==?= writes: >> i run test using pg10.0 on my machine, and the program crashed on _bt_getbuf. >> And i found the following code: >> the routine _bt_page_recyclable say maybe the page is all-zero page, if so >> then the code run (BTPageOpaqu

Re: Postgres 11 release notes

2018-05-14 Thread Tatsuo Ishii
>> I could not find this: >> >> $ git log -1 f8e5f15 >> commit f8e5f156b30efee5d0038b03e38735773abcb7ed >> Author: Andres Freund >> Date: Mon Sep 18 19:36:44 2017 -0700 >> >> Rearm statement_timeout after each executed query. >> >> Previously statement_timeout, in the extended pro

Re: Indexes on partitioned tables and foreign partitions

2018-05-14 Thread Amit Langote
On 2018/05/15 2:29, Alvaro Herrera wrote: > On 2018-May-10, Amit Langote wrote: > >> How about we error out even *before* calling DefineIndex for the 1st time? >> I see that ProcessUtilitySlow() gets a list of all partitions when >> locking them for index creation before calling DefineIndex. May

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Tue, May 15, 2018 at 09:19:04AM +0900, Tatsuo Ishii wrote: > Hi Bruce, > > > 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 exp

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Tue, May 15, 2018 at 08:10:20AM +0900, Michael Paquier wrote: > On Mon, May 14, 2018 at 04:04:58PM -0400, Bruce Momjian wrote: > > So, channel binding has had me confused since I first heard about it. I > > have done some research and reworded the commit with the attached > > first patch. > >

Re: Incorrect comment in get_partition_dispatch_recurse

2018-05-14 Thread Amit Langote
On 2018/05/14 20:29, David Rowley wrote: > On 14 May 2018 at 17:29, Amit Langote wrote: >> Hmm, while I agree that simply calling it "0-based index" might be better >> for readers, what's there now doesn't sound incorrect to me; in the >> adjacent code: >> >> if (get_rel_relkind(partrelid)

Re: Allow COPY's 'text' format to output a header

2018-05-14 Thread Michael Paquier
On Mon, May 14, 2018 at 04:08:47PM -0400, Isaac Morland wrote: > While we're discussing COPY options, what do people think of an option for > COPY FROM with header to require that the headers match the target column > names? This would help to ensure that the file is actually the right one. I am p

Re: Postgres 11 release notes

2018-05-14 Thread Tatsuo Ishii
Hi Bruce, > 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 torrent of feedback. ;-) I could not find this: $ git log -1 f8e5f1

Re: Postgres 11 release notes

2018-05-14 Thread Michael Paquier
On Mon, May 14, 2018 at 04:04:58PM -0400, Bruce Momjian wrote: > So, channel binding has had me confused since I first heard about it. I > have done some research and reworded the commit with the attached > first patch. pg11.diff looks roughly fine to me. > Also, I have created a second patch wh

Re: Cache lookup errors with functions manipulation object addresses

2018-05-14 Thread Alvaro Herrera
On 2018-May-15, Michael Paquier wrote: > On Mon, May 14, 2018 at 04:27:48PM -0400, Alvaro Herrera wrote: > > I think we're better off adding a new function and avoid changing the > > signature of GetForeignServer et al. Or maybe rename the function and > > keep the original name as a compatibilit

Re: Cache lookup errors with functions manipulation object addresses

2018-05-14 Thread Michael Paquier
On Mon, May 14, 2018 at 04:27:48PM -0400, Alvaro Herrera wrote: > I think we're better off adding a new function and avoid changing the > signature of GetForeignServer et al. Or maybe rename the function and > keep the original name as a compatibility wrapper macro. On the other hand, if we make

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
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 > will add more markup soon.  You can view the most current version here: > >         http

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Mon, May 14, 2018 at 07:47:54AM -0400, Andrew Dunstan wrote: > > > On 05/12/2018 08:47 PM, Bruce Momjian wrote: > > On Sat, May 12, 2018 at 01:22:55PM -0700, Peter Geoghegan wrote: > >> On Fri, May 11, 2018 at 2:06 PM, Bruce Momjian wrote: > >>> Done and URL updated. > >> I have some feedback

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Sun, May 13, 2018 at 04:55:35PM +0530, Amit Kapila wrote: > On Sun, May 13, 2018 at 4:40 PM, Amit Kapila 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 > >> will add more markup soon. You can view the

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Sun, May 13, 2018 at 04:40:19PM +0530, Amit Kapila 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 > > will add more markup soon. You can view the most current version here: > > > > http://momjian.

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Sun, May 13, 2018 at 06:53:26PM +0900, Amit Langote wrote: > On Sat, May 12, 2018 at 12: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://momjia

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Sun, May 13, 2018 at 05:43:25PM +0900, Đặng Minh Hướng wrote: > Hello Bruce, > > Thanks for the greate work! > > 2018-05-12 0:08 GMT+09:00 Bruce Momjian : > > I have committed the first draft of the Postgres 11 release notes.  I > will add more markup soon.  You can view the most curr

Re: Cache lookup errors with functions manipulation object addresses

2018-05-14 Thread Alvaro Herrera
On 2018-Mar-06, Michael Paquier wrote: > On Mon, Mar 05, 2018 at 12:57:38PM +, Aleksander Alekseev wrote: > > It looks like that this patch doesn't apply anymore: > > http://commitfest.cputube.org/ > > > > The new status of this patch is: Waiting on Author > > Yes, this happens because patc

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Mon, May 14, 2018 at 07:10:18AM -0400, David Steele wrote: > On 5/13/18 8:26 PM, Michael Paquier wrote: > > On Sun, May 13, 2018 at 03:43:08PM +0900, Michael Paquier wrote: > >> On Fri, May 11, 2018 at 11:08:52AM -0400, Bruce Momjian wrote: > >>> I have committed the first draft of the Postgres

Re: Allow COPY's 'text' format to output a header

2018-05-14 Thread Isaac Morland
While we're discussing COPY options, what do people think of an option for COPY FROM with header to require that the headers match the target column names? This would help to ensure that the file is actually the right one. On 14 May 2018 at 14:55, David G. Johnston wrote: > On Mon, May 14, 2018

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Mon, May 14, 2018 at 09:26:07AM +0900, Michael Paquier wrote: > On Sun, May 13, 2018 at 03:43:08PM +0900, Michael Paquier wrote: > > On Fri, May 11, 2018 at 11:08:52AM -0400, Bruce Momjian wrote: > > > I have committed the first draft of the Postgres 11 release notes. I > > > will add more mark

Re: Postgres 11 release notes

2018-05-14 Thread Bruce Momjian
On Sun, May 13, 2018 at 03:43:08PM +0900, Michael Paquier wrote: > On Fri, May 11, 2018 at 11:08:52AM -0400, 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: > > Thanks for

Re: Allow COPY's 'text' format to output a header

2018-05-14 Thread David G. Johnston
On Mon, May 14, 2018 at 11:44 AM, Garick Hamlin wrote: > I wonder if there was a way to let COPY FROM detect or ignore headers > as appropriate and rather than cause silently result in headers being > added as data. > ​ ​Not reliably​ > Maybe a blank line after the header line could prevent th

Re: Allow COPY's 'text' format to output a header

2018-05-14 Thread Garick Hamlin
On Mon, May 14, 2018 at 09:37:07AM +0900, Michael Paquier wrote: > On Sun, May 13, 2018 at 07:01:00PM -0400, David Steele wrote: > > This patch makes sense to me and looks reasonable. > > One "potential" problem is if a relation has a full set of column which > allows the input of text-like data:

Re: explain (verbose off, normalized) vs query planid

2018-05-14 Thread Robert Haas
On Sat, May 12, 2018 at 6:07 PM, legrand legrand wrote: > It seems natural (to me) to calculate a hash value based on the normalized > plan text > generated by > > explain (costs off, normalized) > or maybe > explain (costs off, verbose, normalized) I would think it would be preferable to do it b

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-14 Thread Tom Lane
Chapman Flack writes: > Where should I look to learn more about the capabilities of the type > inference done in planning? It's not terribly well documented outside the source code, I fear. > Not everything-there-is-to-know, but basics > like, can some simple query constructs reliably cause an i

Re: some question about _bt_getbuf

2018-05-14 Thread Tom Lane
=?GBK?B?19S8ug==?= writes: > i run test using pg10.0 on my machine, and the program crashed on _bt_getbuf. > And i found the following code: > the routine _bt_page_recyclable say maybe the page is all-zero page, if so > then the code run (BTPageOpaque) PageGetSpecialPointer(page); it will be > fa

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-14 Thread Chapman Flack
On 05/14/18 11:29, Tom Lane wrote: > Chapman Flack writes: >> The longer version of $subject is: how would one go about, in the >> backend using SPI (or SPI and maybe other server APIs as needed), >> obtaining the same inferred parameter information that a front-end >> client can get with the Desc

Re: Indexes on partitioned tables and foreign partitions

2018-05-14 Thread Alvaro Herrera
On 2018-May-10, Amit Langote wrote: > How about we error out even *before* calling DefineIndex for the 1st time? > I see that ProcessUtilitySlow() gets a list of all partitions when > locking them for index creation before calling DefineIndex. Maybe, just > go through the list and error out if o

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-14 Thread Pavel Stehule
2018-05-14 17:29 GMT+02:00 Tom Lane : > Chapman Flack writes: > > The longer version of $subject is: how would one go about, in the > > backend using SPI (or SPI and maybe other server APIs as needed), > > obtaining the same inferred parameter information that a front-end > > client can get with

Re: Incorrect path in header comment identification

2018-05-14 Thread Magnus Hagander
On Mon, May 14, 2018 at 11:45 AM, Daniel Gustafsson wrote: > Commit ba11258ccb which renamed inet_net_ntop.c in src/backend/utils/adt, > and > introduced inet_net_ntop.c in src/ports didn’t update the IDENTIFICATION > lines > in the header comments. Is there a reason to keep the old locations ra

Re: \d doesn't show partitioned table foreign keys

2018-05-14 Thread Amit Langote
On Tue, May 15, 2018 at 12:38 AM, Alvaro Herrera wrote: > On 2018-May-14, Amit Langote wrote: > >> Hi. >> >> I just noticed $subject, which attached seems to fix, although not sure if >> that's the correct fix for the issue. > > The fix looks good to me. Will push shortly. Thank you. > A relate

Re: \d doesn't show partitioned table foreign keys

2018-05-14 Thread Alvaro Herrera
On 2018-May-14, Amit Langote wrote: > Hi. > > I just noticed $subject, which attached seems to fix, although not sure if > that's the correct fix for the issue. The fix looks good to me. Will push shortly. A related issue is that \d of the referenced table shows both the partitioned table as w

Re: SPI/backend equivalent of extended-query Describe(statement)?

2018-05-14 Thread Tom Lane
Chapman Flack writes: > The longer version of $subject is: how would one go about, in the > backend using SPI (or SPI and maybe other server APIs as needed), > obtaining the same inferred parameter information that a front-end > client can get with the Describe (statement variant) extended-query >

some question about _bt_getbuf

2018-05-14 Thread 自己
Hi, i run test using pg10.0 on my machine, and the program crashed on _bt_getbuf. And i found the following code: the routine _bt_page_recyclable say maybe the page is all-zero page, if so then the code run (BTPageOpaque) PageGetSpecialPointer(page); it will be failed because it access invalid mem

Re: Global snapshots

2018-05-14 Thread Stas Kelvich
> On 11 May 2018, at 04:05, Masahiko Sawada wrote: > > If I understand correctly, simple writes with ordinary 2PC doesn't > block read who reads that writes. For example, an insertion on a node > doesn't block readers who reads the inserted tuple. But in this global > transaction, the read will

Re: Postgres 11 release notes

2018-05-14 Thread Dilip Kumar
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 > will add more markup soon. You can view the most current version here: > > http://momjian.us/pgsql_docs/release-11.html > > I expect a torrent of feedback. ;-)

Re: Postgres 11 release notes

2018-05-14 Thread Andrew Dunstan
On 05/12/2018 08:47 PM, Bruce Momjian wrote: > On Sat, May 12, 2018 at 01:22:55PM -0700, Peter Geoghegan wrote: >> On Fri, May 11, 2018 at 2:06 PM, Bruce Momjian wrote: >>> Done and URL updated. >> I have some feedback on "Allow NOT NULL to be added to columns without >> requiring a table rewrit

Re: Allow COPY's 'text' format to output a header

2018-05-14 Thread Andrew Dunstan
On 05/14/2018 02:35 AM, Simon Muller wrote: > Okay, I've added this to the next commitfest at > https://commitfest.postgresql.org/18/1629/. > > Thanks both Michael and David for the feedback so far. > > (Please don't top-post on PostgreSQL lists.) I'm not necessarily opposed to this, but I'm n

Re: Incorrect comment in get_partition_dispatch_recurse

2018-05-14 Thread David Rowley
On 14 May 2018 at 17:29, Amit Langote wrote: > On 2018/05/14 13:57, David Rowley wrote: >> I noticed that a comment in get_partition_dispatch_recurse claims that: >> >> "it contains the >> * leaf partition's position in the global list *leaf_part_oids minus 1" >> >> The "minus 1" part is incorrect

Re: Global snapshots

2018-05-14 Thread Stas Kelvich
> On 9 May 2018, at 17:51, Robert Haas wrote: > > Ouch. That's not so bad at READ COMMITTED, but at higher isolation > levels failure becomes extremely likely. Any multi-statement > transaction that lasts longer than global_snapshot_defer_time is > pretty much doomed. Ouch indeed. Current xm

Re: Postgres 11 release notes

2018-05-14 Thread David Steele
On 5/13/18 8:26 PM, Michael Paquier wrote: > On Sun, May 13, 2018 at 03:43:08PM +0900, Michael Paquier wrote: >> On Fri, May 11, 2018 at 11:08:52AM -0400, 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

Re: Considering signal handling in plpython again

2018-05-14 Thread Heikki Linnakangas
On 14/05/18 10:56, Hubert Zhang wrote: For nested SPI case, one option is to turn off the bool variable when entering the SPI function(PLy_spi_prepare, PLy_spi_execute, PLy_cursor etc.) and turn on the bool variable again when exiting the SPI function. Yeah, that seems reasonable. - Heikki

Incorrect path in header comment identification

2018-05-14 Thread Daniel Gustafsson
Commit ba11258ccb which renamed inet_net_ntop.c in src/backend/utils/adt, and introduced inet_net_ntop.c in src/ports didn’t update the IDENTIFICATION lines in the header comments. Is there a reason to keep the old locations rather than updating to the actual locations as per the below trivial dif

Re: Considering signal handling in plpython again

2018-05-14 Thread Hubert Zhang
For nested SPI case, one option is to turn off the bool variable when entering the SPI function(PLy_spi_prepare, PLy_spi_execute, PLy_cursor etc.) and turn on the bool variable again when exiting the SPI function. If it's OK, we could follow this way to update Heikki's patch. --Hubert On Fri, May

Re: PANIC during crash recovery of a recently promoted standby

2018-05-14 Thread Pavan Deolasee
On Fri, May 11, 2018 at 8:39 PM, Alvaro Herrera wrote: > Michael Paquier wrote: > > On Thu, May 10, 2018 at 10:52:12AM +0530, Pavan Deolasee wrote: > > > I propose that we should always clear the minRecoveryPoint after > promotion > > > to ensure that crash recovery always run to the end if a jus

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2018-05-14 Thread Kyotaro HORIGUCHI
Thank you for adding the detailed comment and commiting. At Sat, 5 May 2018 01:49:31 +0300, Heikki Linnakangas wrote in <47215279-228d-f30d-35d1-16af695e5...@iki.fi> > On 04/05/18 10:05, Heikki Linnakangas wrote: > > On 24/04/18 13:57, Kyotaro HORIGUCHI wrote: > >> At Mon, 23 Apr 2018 03:41:47 -