Re: [HACKERS] Patch: make behavior of all versions of the "isinf" function be similar

2016-01-31 Thread Michael Paquier
On Mon, Feb 1, 2016 at 4:04 PM, Tom Lane wrote: > 1. I don't think the buildfarm is sufficient evidence to conclude that > isinf.c is required nowhere. It was in use as late as 2004, judging > by the git history, and I don't know of good reason to assume we do not > need it now. > This was 12 y

Re: [HACKERS] pgbench stats per script & other stuff

2016-01-31 Thread Michael Paquier
On Fri, Jan 29, 2016 at 11:28 PM, Fabien COELHO wrote: > Here is a rebase of the 3 remaining parts: > - 15-c: per script stats > - 15-d: weighted scripts > - 15-e: prefix selection for -b Regarding patch d. + /* compute total_weight */ + for (i = 0; i < num_scripts; i++) +

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-01-31 Thread Amit Kapila
On Sat, Jan 30, 2016 at 2:15 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > > On Sat, Jan 30, 2016 at 10:58 AM, Amit Kapila wrote: >> >> On Fri, Jan 29, 2016 at 6:47 PM, Robert Haas wrote: >> > >> > On Fri, Jan 29, 2016 at 6:59 AM, Alexander Korotkov >> > wrote: >> > > On Thu, Jan

Re: [HACKERS] Patch: make behavior of all versions of the "isinf" function be similar

2016-01-31 Thread Tom Lane
Michael Paquier writes: > On Mon, Feb 1, 2016 at 2:38 PM, Michael Paquier > wrote: >> Actually, is there actually a reason to keep this file in the code >> tree? Are there platforms that do not have isinf()? Even for Windows >> environments using MSVC < 1800 this is emulated using _fpclass. > Lo

Re: [HACKERS] extend pgbench expressions with functions

2016-01-31 Thread Michael Paquier
On Fri, Jan 29, 2016 at 5:16 AM, Fabien COELHO < fabien.coe...@mines-paristech.fr> wrote: > v22 compared to previous: Thanks for the new patch! > - remove the short macros (although IMO it is a code degradation) FWIW, I like this suggestion from Robert. > - check for INT64_MIN / -1 (although

Re: [HACKERS] Several problems in tab-completions for SET/RESET

2016-01-31 Thread Michael Paquier
On Mon, Feb 1, 2016 at 1:21 PM, Fujii Masao wrote: > On Fri, Jan 29, 2016 at 1:02 PM, Michael Paquier > wrote: >> On Fri, Jan 29, 2016 at 11:53 AM, Fujii Masao wrote: >>> I removed the above and added the following for that case. >>> >>> +/* Complete ALTER DATABASE|FUNCTION|ROLE|USER ... SET

Re: [HACKERS] Patch: make behavior of all versions of the "isinf" function be similar

2016-01-31 Thread Michael Paquier
On Mon, Feb 1, 2016 at 2:38 PM, Michael Paquier wrote: > Actually, is there actually a reason to keep this file in the code > tree? Are there platforms that do not have isinf()? Even for Windows > environments using MSVC < 1800 this is emulated using _fpclass. Looking at what is in the buildfarm,

Re: [HACKERS] Patch: make behavior of all versions of the "isinf" function be similar

2016-01-31 Thread Michael Paquier
On Mon, Feb 1, 2016 at 8:13 AM, Vitaly Burovoy wrote: > While I was searching for a function which checks doubles for > infinity, I discovered a function "isinf" in a file src/port/isinf.c > where one of three versions returns different value for "-inf" ("1" > instead of "-1") comparing to the oth

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-01-31 Thread Amit Kapila
On Sat, Jan 30, 2016 at 12:23 PM, Amit Kapila wrote: > On Fri, Jan 29, 2016 at 6:55 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: >> >> Also couple of minor comments from me. >> >> I think this >> >> + StrNCpy(LWLockTrancheRequestArray[LWLockTrancheRequestsCount].tranche_name, >>>

Re: [HACKERS] pglogical_output - a general purpose logical decoding output plugin

2016-01-31 Thread Michael Paquier
On Thu, Jan 7, 2016 at 4:50 PM, Craig Ringer wrote: > On 7 January 2016 at 01:17, Peter Eisentraut wrote: >> On 12/22/15 4:55 AM, Craig Ringer wrote: >> and we could probably go through them >> one by one and ask, why do we need this bit? So that kind of system >> will be very hard to review as

Re: [HACKERS] Several problems in tab-completions for SET/RESET

2016-01-31 Thread Fujii Masao
On Fri, Jan 29, 2016 at 1:02 PM, Michael Paquier wrote: > On Fri, Jan 29, 2016 at 11:53 AM, Fujii Masao wrote: >> I removed the above and added the following for that case. >> >> +/* Complete ALTER DATABASE|FUNCTION|ROLE|USER ... SET */ >> +else if (Matches2("ALTER", "DATABASE|FUNCTION|R

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-01-31 Thread Dilip Kumar
On Sun, Jan 31, 2016 at 11:44 AM, Dilip Kumar wrote: > By looking at the results with scale factor 1000 and 100 i don't see any > reason why it will regress with scale factor 300. > > So I will run the test again with scale factor 300 and this time i am > planning to run 2 cases. > 1. when data f

Re: [HACKERS] Generalizing SortSupport for text to work with char(n), bytea, and alternative opclasses

2016-01-31 Thread Andreas Karlsson
Hi, I have reviewed this now and I think this is a useful addition even though these indexes are less common. Consistent behavior is worth a lot in my mind and this patch is reasonably small. The patch no longer applies due to 1) oid collisions and 2) a trivial conflict. When I fixed those t

Re: [HACKERS] How can I build OSSP UUID support on Windows to avoid duplicate UUIDs?

2016-01-31 Thread 高增琦
: ( still don't know how to build ossp-uuid on windows with MSVC. Saito san's patch doesn't fix all errors during compiling... I will try to combine this patch and the win32build on sf.net Same questions again: How was the dll file in the community binary built? How to avoid duplicate UUIDs then

Re: [HACKERS] Template for commit messages

2016-01-31 Thread Sachin Kotwal
Sorry for little late. Can we add Severity level of patch? with only three levels as (High, Moderate, Low) Many of our customers might not understand overall important of patch. If we add this people/customers can choose patch is important for them or not. Other than Author and hackers can not ea

[HACKERS] Way to check whether a particular block is on the shared_buffer?

2016-01-31 Thread Kouhei Kaigai
Hello, Do we have a reliable way to check whether a particular heap block is already on the shared buffer, but not modify? Right now, ReadBuffer and ReadBufferExtended are entrypoint of the buffer manager for extensions. However, it tries to acquire an available buffer pool instead of the victim

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2016-01-31 Thread Amit Langote
On 2016/01/29 21:02, Rahila Syed wrote: >> Okay, I agree that reporting just the current blkno is simple and good >> enough. How about numbers of what we're going to report as the "Vacuuming >> Index and Heap" phase? I guess we can still keep the scanned_index_pages >> and index_scan_count So we ha

Re: [HACKERS] Template for commit messages

2016-01-31 Thread Joshua D. Drake
On 01/31/2016 04:34 PM, Michael Paquier wrote: On Mon, Feb 1, 2016 at 2:44 AM, Joshua D. Drake wrote: On 01/29/2016 03:05 PM, Alvaro Herrera wrote: Joshua D. Drake wrote: One of the offers is to credit them (I'm not exactly clear on what is the group to benefit from this, but the phrasing used

Re: [HACKERS] Template for commit messages

2016-01-31 Thread Michael Paquier
On Mon, Feb 1, 2016 at 2:44 AM, Joshua D. Drake wrote: > On 01/29/2016 03:05 PM, Alvaro Herrera wrote: >> Joshua D. Drake wrote: >> One of the offers is to credit them (I'm not exactly clear >> on what is the group to benefit from this, but the phrasing used in the >> meeting was "contributors to t

[HACKERS] Patch: make behavior of all versions of the "isinf" function be similar

2016-01-31 Thread Vitaly Burovoy
Hello, hackers! While I was searching for a function which checks doubles for infinity, I discovered a function "isinf" in a file src/port/isinf.c where one of three versions returns different value for "-inf" ("1" instead of "-1") comparing to the other two. It seems concrete values (not just "i

Re: [HACKERS] Template for commit messages

2016-01-31 Thread Alvaro Herrera
Joshua D. Drake wrote: > On 01/29/2016 03:05 PM, Alvaro Herrera wrote: > >Joshua D. Drake wrote: > > > >>I think the best question to ask is: > >> > >>"What is the problem we are trying to solve?" > > > >The problem is alluring more patch reviewers, beta testers and bug > >reporters. > > Do we rea

[HACKERS] WIP: Detecting SSI conflicts before reporting constraint violations

2016-01-31 Thread Thomas Munro
Hi hackers, As described in a recent Reddit discussion[1] and bug report 9301[2], there are scenarios where overlapping concurrent read-write sequences produce serialization failures without constraints, but produce constraint violations when there is a unique constraint. A simple example is deci

Re: [HACKERS] PostgreSQL Audit Extension

2016-01-31 Thread Alvaro Herrera
Joshua D. Drake wrote: > On 01/31/2016 05:07 AM, Alvaro Herrera wrote: > >David Steele wrote: > >>The attached patch implements audit logging for PostgreSQL as an > >>extension. I believe I have addressed the concerns that were raised at > >>the end of the 9.5 development cycle. > > > >This patch

Re: [HACKERS] PATCH: index-only scans with partial indexes

2016-01-31 Thread Alvaro Herrera
Konstantin Knizhnik wrote: > I am very interested in this patch because it allows to use partial indexes > to ... speed up inserts. > I have implemented "ALTER INDEX ... WHERE ..." construction which allows to > change predicate of partial index without necessity to fully rebuild it. > So it is n

Re: [HACKERS] WAL Re-Writes

2016-01-31 Thread Jan Wieck
On 01/27/2016 08:30 AM, Amit Kapila wrote: operation. Now why OS couldn't find the corresponding block in memory is that, while closing the WAL file, we use POSIX_FADV_DONTNEED if wal_level is less than 'archive' which lead to this problem. So with this experiment, the conclusion is that though

Re: [HACKERS] Template for commit messages

2016-01-31 Thread Joshua D. Drake
On 01/29/2016 03:05 PM, Alvaro Herrera wrote: Joshua D. Drake wrote: I think the best question to ask is: "What is the problem we are trying to solve?" The problem is alluring more patch reviewers, beta testers and bug reporters. Do we really want patch reviewers, beta testers and bug repo

Re: [HACKERS] PostgreSQL Audit Extension

2016-01-31 Thread Joshua D. Drake
On 01/31/2016 05:07 AM, Alvaro Herrera wrote: David Steele wrote: The attached patch implements audit logging for PostgreSQL as an extension. I believe I have addressed the concerns that were raised at the end of the 9.5 development cycle. This patch got no feedback at all during the commitfe

Re: [HACKERS] extend pgbench expressions with functions

2016-01-31 Thread Fabien COELHO
v22 compared to previous: - remove the short macros (although IMO it is a code degradation) - try not to remove/add blanks lines - let some assert "as is" - still exit on float to int overflow, see arguments in other mails - check for INT64_MIN / -1 (although I think it is useless) -- Fabie

Re: [HACKERS] Fwd: Core dump with nested CREATE TEMP TABLE

2016-01-31 Thread Tom Lane
Noah Misch writes: > On Sat, Jan 30, 2016 at 04:28:47PM -0500, Robert Haas wrote: >> I think I've >> pretty much said what I have to say about this; if nothing I wrote up >> until now swayed you, it's unlikely that anything else I say after >> this point will either. > Say I drop the parts that c

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2016-01-31 Thread Tom Lane
Piotr Stefaniak writes: > These changes from 65abaab547a5758b0d6d92df4af1663bb47d545f > - result = sign * cosd_q1(arg1) / sind_q1(arg1); > + result = sign * ((cosd_q1(arg1) / sind_q1(arg1)) / cot_45); > and > - result = sign * sind_q1(arg1) / cosd_q1(arg1); > + result = sign * ((sind_q1(arg1) /

Re: [HACKERS] Fwd: Core dump with nested CREATE TEMP TABLE

2016-01-31 Thread Noah Misch
On Sat, Jan 30, 2016 at 04:28:47PM -0500, Robert Haas wrote: > I think I've > pretty much said what I have to say about this; if nothing I wrote up > until now swayed you, it's unlikely that anything else I say after > this point will either. Say I drop the parts that change the binary. Does the

Re: [HACKERS] PATCH: index-only scans with partial indexes

2016-01-31 Thread Konstantin Knizhnik
I am very interested in this patch because it allows to use partial indexes to ... speed up inserts. I have implemented "ALTER INDEX ... WHERE ..." construction which allows to change predicate of partial index without necessity to fully rebuild it. So it is not necessary to insert new records i

[HACKERS] Idle In Transaction Session Timeout, revived

2016-01-31 Thread Vik Fearing
Attached is a rebased and revised version of my idle_in_transaction_session_timeout patch from last year. This version does not suffer the problems the old one did where it would jump out of SSL code thanks to Andres' patch in commit 4f85fde8eb860f263384fffdca660e16e77c7f76. The basic idea is if

Re: [HACKERS] On columnar storage (2)

2016-01-31 Thread Alvaro Herrera
So we discussed some of this stuff during the developer meeting in Brussels and the main conclusion is that we're going to split this up in multiple independently useful pieces, and write up the general roadmap in the wiki so that we can discuss in detail on-list. I'm marking this as Returned with

Re: [HACKERS] PostgreSQL Audit Extension

2016-01-31 Thread Alvaro Herrera
David Steele wrote: > The attached patch implements audit logging for PostgreSQL as an > extension. I believe I have addressed the concerns that were raised at > the end of the 9.5 development cycle. This patch got no feedback at all during the commitfest. I think there is some interest on audit

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2016-01-31 Thread Piotr Stefaniak
On 01/31/2016 01:23 PM, Michael Paquier wrote: Per IEEE 754, division by 0 for a double results in Nan or +/-Inf, so that's actually correct. I didn't know that. I guess that in practice that is OK and the case is closed. Interestingly to me, that assumption appears to rely on the C impleme

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2016-01-31 Thread Alvaro Herrera
Ashutosh Bapat wrote: > Here's updated patch. I didn't use version numbers in file names in my > previous patches. I am starting from this onwards. Um, I tried this patch and it doesn't apply at all. There's a large number of conflicts. Please update it and resubmit to the next commitfest. --

Re: [HACKERS] PATCH: track last known XLOG segment in control file

2016-01-31 Thread Tomas Vondra
Hi, On 01/31/2016 01:25 PM, Alvaro Herrera wrote: This hasn't been updated in a long time; I should have closed it earlier. Chatting with Tomas about it, he seemed inclined to just have the patch rejected because it's not terribly useful anyway. we've discussed that some time ago and my memor

Re: [HACKERS] PATCH: use foreign keys to improve join estimates v1

2016-01-31 Thread Alvaro Herrera
David Rowley wrote: > I'm not sure that I agree with this being set to "Needs review". The last > progress that I see made on this was me hacking at the patch to remove some > equivalence class limitations. I think the logical next step would be for > you to look at these changes and either accep

Re: [HACKERS] PATCH: index-only scans with partial indexes

2016-01-31 Thread Alvaro Herrera
Tomas Vondra wrote: > On 12/24/2015 04:05 AM, Michael Paquier wrote: > >Tomas, are you still working on that? This thread is stalling for 3 weeks. > > I haven't discovered anything interesting during the testing, so I guess the > "needs review" state is appropriate. Let's move the patch to the n

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-01-31 Thread Michael Paquier
On Thu, Jan 21, 2016 at 1:08 PM, Michael Paquier wrote: > On Wed, Jan 20, 2016 at 2:32 AM, Joe Conway wrote: >> The only things I know of still lacking is: >> 1) Documentation >> 2) Decision on REVOKE ... FROM PUBLIC > > Yep, regarding 2) I am the only one actually making noise to protect > this

Re: [HACKERS] Additional role attributes && superuser review

2016-01-31 Thread Michael Paquier
On Sun, Jan 31, 2016 at 7:55 AM, Michael Paquier wrote: > On Sun, Jan 31, 2016 at 5:32 AM, Craig Ringer wrote: >> On 29 January 2016 at 22:41, Stephen Frost wrote: >>> >>> Michael, >>> >>> * Michael Paquier (michael.paqu...@gmail.com) wrote: >>> > On Fri, Jan 29, 2016 at 6:37 AM, Stephen Frost

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-01-31 Thread Michael Paquier
On Sat, Jan 30, 2016 at 11:08 PM, Michael Paquier wrote: > On Fri, Jan 29, 2016 at 9:13 PM, Michael Paquier wrote: >> Well, to put it short, I am just trying to find a way to make the >> backend skip unnecessary checkpoints on an idle system, which results >> in the following WAL pattern if system

Re: [HACKERS] PATCH: track last known XLOG segment in control file

2016-01-31 Thread Alvaro Herrera
This hasn't been updated in a long time; I should have closed it earlier. Chatting with Tomas about it, he seemed inclined to just have the patch rejected because it's not terribly useful anyway. I'm marking it as rejected. Unless someone has a compelling use case for this feature that hasn't be

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2016-01-31 Thread Michael Paquier
On Sun, Jan 31, 2016 at 9:01 PM, Piotr Stefaniak wrote: > - result = sign * cosd_q1(arg1) / sind_q1(arg1); > + result = sign * ((cosd_q1(arg1) / sind_q1(arg1)) / cot_45); > > and > > - result = sign * sind_q1(arg1) / cosd_q1(arg1); > + result = sign * ((sind_q1(arg1) / cosd_q1(arg1)) / tan_45); >

Re: [HACKERS] New gist vacuum.

2016-01-31 Thread Alvaro Herrera
Костя Кузнецов wrote: > Thank you, Jeff.I reworking patch now. All // warning will be > deleted.About memory consumption new version will control size of > stack and will operate with map of little size because i want delete old > style vacuum(now if maintenance_work_mem less than needed to buil

Re: [HACKERS] PoC: Partial sort

2016-01-31 Thread Alvaro Herrera
Alexander Korotkov wrote: > I'm sorry that I didn't found time for this yet. I'm certainly planning to > get back to this in near future. The attached version is just rebased > without any optimization. Great to have a new version -- there seems to be a lot of interest in this patch. I'm moving

Re: [HACKERS] Proposal: Trigonometric functions in degrees

2016-01-31 Thread Piotr Stefaniak
These changes from 65abaab547a5758b0d6d92df4af1663bb47d545f - result = sign * cosd_q1(arg1) / sind_q1(arg1); + result = sign * ((cosd_q1(arg1) / sind_q1(arg1)) / cot_45); and - result = sign * sind_q1(arg1) / cosd_q1(arg1); + result = sign * ((sind_q1(arg1) / cosd_q1(arg1)) / tan_45); both int

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-01-31 Thread Michael Paquier
On Sun, Jan 31, 2016 at 5:28 PM, Masahiko Sawada wrote: > On Sun, Jan 31, 2016 at 5:18 PM, Michael Paquier > wrote: >> On Sun, Jan 31, 2016 at 5:08 PM, Masahiko Sawada >> wrote: >>> On Sun, Jan 31, 2016 at 1:17 PM, Michael Paquier >>> wrote: On Thu, Jan 28, 2016 at 10:10 PM, Masahiko Sawa

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-01-31 Thread Masahiko Sawada
On Sun, Jan 31, 2016 at 5:18 PM, Michael Paquier wrote: > On Sun, Jan 31, 2016 at 5:08 PM, Masahiko Sawada > wrote: >> On Sun, Jan 31, 2016 at 1:17 PM, Michael Paquier >> wrote: >>> On Thu, Jan 28, 2016 at 10:10 PM, Masahiko Sawada wrote: By the discussions so far, I'm planning to have sev

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-01-31 Thread Michael Paquier
On Sun, Jan 31, 2016 at 5:08 PM, Masahiko Sawada wrote: > On Sun, Jan 31, 2016 at 1:17 PM, Michael Paquier > wrote: >> On Thu, Jan 28, 2016 at 10:10 PM, Masahiko Sawada wrote: >>> By the discussions so far, I'm planning to have several replication >>> methods such as 'quorum', 'complex' in the fe

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-01-31 Thread Masahiko Sawada
On Sun, Jan 31, 2016 at 1:17 PM, Michael Paquier wrote: > On Thu, Jan 28, 2016 at 10:10 PM, Masahiko Sawada wrote: >> By the discussions so far, I'm planning to have several replication >> methods such as 'quorum', 'complex' in the feature, and the each >> replication method specifies the syntax o

Re: [HACKERS] custom function for converting human readable sizes to bytes

2016-01-31 Thread Tom Lane
Vitaly Burovoy writes: > On 1/30/16, Pavel Stehule wrote: >> I though about it, but it is not possible. Every PG_TRY/CATCH must be >> finished by RETHROW. > No, src/include/utils/elog.h tells different (emphasizes are mine): > "The error recovery code can _optionally_ do PG_RE_THROW() to > propa

Re: [HACKERS]WIP: Covering + unique indexes.

2016-01-31 Thread David Rowley
On 27 January 2016 at 03:35, Anastasia Lubennikova wrote: > including_columns_3.0 is the latest version of patch. > And changes regarding the previous version are attached in a separate patch. > Just to ease the review and debug. Hi, I've made another pass over the patch. There's still a couple