Re: [HACKERS] Set of patch to address several Coverity issues

2015-07-09 Thread Michael Paquier
On Wed, Jul 8, 2015 at 6:16 PM, Andres Freund wrote: In any case, we are going to need at least (void) in front of those calls. We're needing nothing of the sort. I don't really understand your reluctance here. As one example, see c831593 where similar fixes are done and even back-patched. --

Re: [HACKERS] Waits monitoring

2015-07-09 Thread Fujii Masao
On Thu, Jul 9, 2015 at 2:12 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Thu, Jul 9, 2015 at 1:52 AM, Ildus Kurbangaliev i.kurbangal...@postgrespro.ru wrote: Hello. Currently, PostgreSQL offers many metrics for monitoring. However, detailed monitoring of waits is still not supported

Re: [HACKERS] Further issues with jsonb semantics, documentation

2015-07-09 Thread Andrew Dunstan
On 07/09/2015 04:10 AM, Peter Geoghegan wrote: On Mon, Jun 22, 2015 at 6:19 PM, Peter Geoghegan p...@heroku.com wrote: On Wed, Jun 10, 2015 at 11:48 AM, Andrew Dunstan and...@dunslane.net wrote: Please submit a patch to adjust the treatment of negative integers in the old functions to be

Re: [HACKERS] Waits monitoring

2015-07-09 Thread Ildus Kurbangaliev
On Jul 9, 2015, at 5:18 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jul 9, 2015 at 2:12 PM, Haribabu Kommi kommi.harib...@gmail.com mailto:kommi.harib...@gmail.com wrote: On Thu, Jul 9, 2015 at 1:52 AM, Ildus Kurbangaliev i.kurbangal...@postgrespro.ru wrote: Hello. Currently,

Re: [HACKERS] Re: [HACKERS] GSoC 2015 proposal: Improve the performance of “ALTER TABLE .. SET LOGGED / UNLOGGED” statement

2015-07-09 Thread Andres Freund
On 2015-07-09 10:39:35 -0300, Fabrízio de Royes Mello wrote: If the wal_level=minimal we don't need to force the wal log of the contents. If the wal_level != minimal we need just to xlog all the pages, but in both cases we don't need the extra job to create a new datafiles and copy the

Re: [HACKERS] Supporting TAP tests with MSVC and Windows

2015-07-09 Thread Michael Paquier
On Thu, Jun 25, 2015 at 1:40 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, May 26, 2015 at 3:39 PM, Michael Paquier wrote: Here is v6, a rebased version on HEAD (79f2b5d). There were some conflicts with the indentation and some other patches related to pg_rewind and initdb's

[HACKERS] Re: [HACKERS] Re: [HACKERS] GSoC 2015 proposal: Improve the performance of “ALTER TABLE .. SET LOGGED / UNLOGGED” statement

2015-07-09 Thread Fabrízio de Royes Mello
On Thu, Jul 9, 2015 at 10:56 AM, Andres Freund and...@anarazel.de wrote: On 2015-07-09 10:39:35 -0300, Fabrízio de Royes Mello wrote: If the wal_level=minimal we don't need to force the wal log of the contents. If the wal_level != minimal we need just to xlog all the pages, but in both

Re: [HACKERS] Re: [HACKERS] GSoC 2015 proposal: Improve the performance of “ALTER TABLE .. SET LOGGED / UNLOGGED” statement

2015-07-09 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-07-09 10:39:35 -0300, Fabrízio de Royes Mello wrote: If the wal_level=minimal we don't need to force the wal log of the contents. If the wal_level != minimal we need just to xlog all the pages, but in both cases we don't need the extra job to

Re: [HACKERS] creating extension including dependencies

2015-07-09 Thread Petr Jelinek
On 2015-07-07 15:41, Andres Freund wrote: On 2015-07-07 22:36:29 +0900, Fujii Masao wrote: On Mon, Jun 15, 2015 at 7:50 AM, Petr Jelinek p...@2ndquadrant.com wrote: Hi, I am getting tired installing manually required extensions manually. I was wondering if we might want to add option to

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-07-09 Thread Peter Geoghegan
On Wed, Jul 8, 2015 at 10:18 PM, Noah Misch n...@leadboat.com wrote: One function had a comment explaining its workaround for an OS bug, while another function ignored the same bug. That is always a defect in the comments at least; our code shall tell a uniform story about its API

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-09 Thread Pavel Stehule
2015-07-09 15:17 GMT+02:00 Merlin Moncure mmonc...@gmail.com: On Wed, Jul 8, 2015 at 11:28 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi second version of this patch make check-world passed quickly scanning the patch, the implementation is trivial (minus regression test

Re: [HACKERS] WAL logging problem in 9.4.3?

2015-07-09 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: On Tue, Jul 7, 2015 at 12:49 AM, Tom Lane t...@sss.pgh.pa.us wrote: One idea I had was to allow the COPY optimization only if the heap file is physically zero-length at the time the COPY starts. This seems not helpful for the case where TRUNCATE is

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-09 Thread Merlin Moncure
On Thu, Jul 9, 2015 at 10:48 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-07-09 15:17 GMT+02:00 Merlin Moncure mmonc...@gmail.com: On Wed, Jul 8, 2015 at 11:28 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi second version of this patch make check-world passed quickly

Re: [HACKERS] 9.5 release notes

2015-07-09 Thread Peter Geoghegan
On Fri, Jun 26, 2015 at 3:39 PM, Peter Geoghegan p...@heroku.com wrote: I attach a compatibility note that is clearly needed; adding this is an open item of mine for 9.5. This concerns foreign data wrappers and UPSERT. Are you going to review this, Bruce? It is an open item for 9.5. I would

Re: [HACKERS] Freeze avoidance of very large table.

2015-07-09 Thread Sawada Masahiko
On Tue, Jul 7, 2015 at 8:49 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jul 2, 2015 at 9:00 PM, Sawada Masahiko sawada.m...@gmail.com wrote: Thank you for bug report, and comments. Fixed version is attached, and source code comment is also updated. Please review it. I am

Re: [HACKERS] WAL logging problem in 9.4.3?

2015-07-09 Thread Andres Freund
On 2015-07-06 11:49:54 -0400, Tom Lane wrote: One idea I had was to allow the COPY optimization only if the heap file is physically zero-length at the time the COPY starts. That would still be able to optimize in all the cases we care about making COPY fast for. Rather than reverting

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-09 Thread Pavel Stehule
2015-07-03 12:27 GMT+02:00 Heikki Linnakangas hlinn...@iki.fi: On 05/27/2015 09:51 PM, Andrew Dunstan wrote: On 05/27/2015 02:37 PM, Robert Haas wrote: On Tue, May 26, 2015 at 2:50 AM, Shulgin, Oleksandr oleksandr.shul...@zalando.de wrote: Is it reasonable to add this patch to CommitFest

Re: [HACKERS] Freeze avoidance of very large table.

2015-07-09 Thread Sawada Masahiko
On Fri, Jul 10, 2015 at 3:05 AM, Sawada Masahiko sawada.m...@gmail.com wrote: Also something for pg_upgrade is also not yet. TODO - Test case for this feature - pg_upgrade support. I had forgotten to change the fork name of visibility map to vfm. Attached latest v7 patch. Please review it.

Re: [HACKERS] Fillfactor for GIN indexes

2015-07-09 Thread Michael Paquier
On Thu, Jul 9, 2015 at 10:33 PM, Alexander Korotkov wrote: [...] + /* Caclculate max data size on page according to fillfactor */ s/Caclculate/Calculate When creating a simple gin index, I am seeing that GinGetMaxDataSize gets called with ginEntryInsert: * frame #0: 0x00010a49d72e

Re: [HACKERS] Implementation of global temporary tables?

2015-07-09 Thread Zhaomo Yang
I am not sure, if it is not useless work. I don't understand why an implementation taking approach 2.a would be useless. As I said, its performance will be no worse than current temp tables and it will provide a lot of convenience to users who need to create temp tables in every session.

Re: [HACKERS] Fix to expose a GUC variable, Log_disconnections, to outside of postgres.c

2015-07-09 Thread Satoshi Nagayasu
On 2015/07/09 15:30, Heikki Linnakangas wrote: On 07/09/2015 07:19 AM, Satoshi Nagayasu wrote: On 2015/07/09 13:06, Tom Lane wrote: Satoshi Nagayasu sn...@uptime.jp writes: I just found that Log_disconnections value has not been exposed to outside of postgres.c. Despite that,

Re: [HACKERS] optimizing vacuum truncation scans

2015-07-09 Thread Haribabu Kommi
On Thu, Jul 9, 2015 at 4:37 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Wed, Jul 8, 2015 at 9:46 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Mon, Jun 29, 2015 at 3:54 PM, Jeff Janes jeff.ja...@gmail.com wrote: There is still the case of pages which had their visibility bit set

Re: [HACKERS] copy.c handling for RLS is insecure

2015-07-09 Thread Andres Freund
On 2015-07-09 01:28:28 -0400, Noah Misch wrote: - Keep the OID check, shouldn't hurt to have it What benefit is left? A bit of defense in depth. We execute user defined code in COPY (e.g. BEFORE triggers). That user defined code could very well replace the relation. Now I think right now

Re: [HACKERS] Fix to expose a GUC variable, Log_disconnections, to outside of postgres.c

2015-07-09 Thread Heikki Linnakangas
On 07/09/2015 07:19 AM, Satoshi Nagayasu wrote: On 2015/07/09 13:06, Tom Lane wrote: Satoshi Nagayasu sn...@uptime.jp writes: I just found that Log_disconnections value has not been exposed to outside of postgres.c. Despite that, Log_connections has already been exposed. Why would an

Re: [HACKERS] optimizing vacuum truncation scans

2015-07-09 Thread Jeff Janes
On Wed, Jul 8, 2015 at 9:46 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Mon, Jun 29, 2015 at 3:54 PM, Jeff Janes jeff.ja...@gmail.com wrote: Attached is a patch that implements the vm scan for truncation. It introduces a variable to hold the last blkno which was skipped during

Re: [HACKERS] Further issues with jsonb semantics, documentation

2015-07-09 Thread Peter Geoghegan
On Mon, Jun 22, 2015 at 6:19 PM, Peter Geoghegan p...@heroku.com wrote: On Wed, Jun 10, 2015 at 11:48 AM, Andrew Dunstan and...@dunslane.net wrote: Please submit a patch to adjust the treatment of negative integers in the old functions to be consistent with their treatment in the new functions.

[HACKERS] [ANNOUNCE] PGDay.IT 2015 - Call for Papers

2015-07-09 Thread desmodemone
The 9th edition of the Italian PostgreSQL Day ( PGDay.it 2015 ) will be held on Friday , 23th October 2015 in Prato, Italy. The International Call for Papers has opened and will close on 8th August 2015. For more information about the conference and the International Call for Paper, please visit

Re: [HACKERS] Sharing aggregate states between different aggregate functions

2015-07-09 Thread David Rowley
On 15 June 2015 at 12:05, David Rowley david.row...@2ndquadrant.com wrote: This basically allows an aggregate's state to be shared between other aggregate functions when both aggregate's transition functions (and a few other things) match There's quite a number of aggregates in our standard

Re: [HACKERS] Improving log capture of TAP tests with IPC::Run

2015-07-09 Thread Heikki Linnakangas
On 07/09/2015 04:50 AM, Michael Paquier wrote: On Thu, Jul 9, 2015 at 12:49 AM, Heikki Linnakangas wrote: Looking at the manual page of Test::More, it looks like you could change where the perl script's STDOUT and STDERR point to, because Test::More takes a copy of them (when? at program

Re: [HACKERS] FPW compression leaks information

2015-07-09 Thread Michael Paquier
On Wed, Jul 8, 2015 at 11:33 AM, Fujii Masao wrote: ISTM that one our consensus is to make wal_compression SUSET as the first step whatever approach we adopt for the risk in question later. So, barring any objection, I will commit the attached patch and change the context to PGC_SUSET. That's

Re: [HACKERS] Improving log capture of TAP tests with IPC::Run

2015-07-09 Thread Michael Paquier
On Thu, Jul 9, 2015 at 7:29 PM, Heikki Linnakangas hlinn...@iki.fi wrote: Thanks, fixed the parenthesis and committed. Thanks. I imagine that this is going to need some tuning with the buildfarm before this becomes really useful. I will re-enable the TAP tests of hamster once that's the case.

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-09 Thread Merlin Moncure
On Wed, Jul 8, 2015 at 11:28 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi second version of this patch make check-world passed quickly scanning the patch, the implementation is trivial (minus regression test adjustments), and is, IMSNSHO, the right solution. Several of the source

Re: [HACKERS] Improving log capture of TAP tests with IPC::Run

2015-07-09 Thread Heikki Linnakangas
On 07/09/2015 04:09 PM, Michael Paquier wrote: On Thu, Jul 9, 2015 at 7:29 PM, Heikki Linnakangas hlinn...@iki.fi wrote: The missing --debug is a separate issue. I won't argue against that, but is it worth creating a new thread just for this one-liner? The local mode of pg_rewind uses it

Re: [HACKERS] FPW compression leaks information

2015-07-09 Thread Fujii Masao
On Thu, Jul 9, 2015 at 10:05 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Jul 8, 2015 at 11:33 AM, Fujii Masao wrote: ISTM that one our consensus is to make wal_compression SUSET as the first step whatever approach we adopt for the risk in question later. So, barring any

Re: [HACKERS] Fillfactor for GIN indexes

2015-07-09 Thread Alexander Korotkov
Hi! On Wed, Jul 8, 2015 at 10:27 PM, Heikki Linnakangas hlinn...@iki.fi wrote: In dataPlaceToPageLeaf-function: if (append) { /* * Even when appending, trying to append more items than will fit is * not completely free,

[HACKERS] Re: [HACKERS] Re: [HACKERS] GSoC 2015 proposal: Improve the performance of “ALTER TABLE .. SET LOGGED / UNLOGGED” statement

2015-07-09 Thread Fabrízio de Royes Mello
On Wed, Jul 8, 2015 at 11:37 AM, Andres Freund and...@anarazel.de wrote: On 2015-07-08 10:58:51 -0300, Fabrízio de Royes Mello wrote: Think in an ETL job that can be use an unlogged table to improve the load performance, but this job create a large table and to guarantee the data

Re: [HACKERS] Cube extension kNN support

2015-07-09 Thread Alexander Korotkov
Hi! On Sat, May 9, 2015 at 6:53 AM, Stas Kelvich stas.kelv...@gmail.com wrote: Patch is pretty ready, last issue was about changed extension interface, so there should be migration script and version bump. Attaching a version with all migration stuff. I can't see cube--1.0--1.1.sql in the

Re: [HACKERS] Improving log capture of TAP tests with IPC::Run

2015-07-09 Thread Tom Lane
Heikki Linnakangas hlinn...@iki.fi writes: Pushed, thanks. Shouldn't we consider back-patching these improvements into 9.5 and 9.4? ISTM the main point is to help debug buildfarm failures, and we won't be getting much benefit if only one-third of such reports have decent logging.

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-09 Thread Pavel Stehule
2015-07-09 22:57 GMT+02:00 Merlin Moncure mmonc...@gmail.com: On Thu, Jul 9, 2015 at 3:31 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-07-09 20:08 GMT+02:00 Merlin Moncure mmonc...@gmail.com: On Thu, Jul 9, 2015 at 10:48 AM, Pavel Stehule pavel.steh...@gmail.com wrote:

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-07-09 Thread Merlin Moncure
On Thu, Jul 9, 2015 at 3:31 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-07-09 20:08 GMT+02:00 Merlin Moncure mmonc...@gmail.com: On Thu, Jul 9, 2015 at 10:48 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-07-09 15:17 GMT+02:00 Merlin Moncure mmonc...@gmail.com: On

Re: [HACKERS] WAL logging problem in 9.4.3?

2015-07-09 Thread Fujii Masao
On Tue, Jul 7, 2015 at 12:49 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@anarazel.de writes: On 2015-07-06 11:14:40 -0400, Tom Lane wrote: The COUNT() correctly says 11 rows, but after crash-and-recover, only the row with -1 is there. This is because the INSERT writes out an

Re: [HACKERS] WAL logging problem in 9.4.3?

2015-07-09 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-07-06 11:49:54 -0400, Tom Lane wrote: Rather than reverting cab9a0656c36739f, which would re-introduce a different performance problem, perhaps we could have COPY create a new relfilenode when it does this. That should be safe if the table was

Re: [HACKERS] obsolete comment in elog.h

2015-07-09 Thread Fujii Masao
On Thu, Jul 9, 2015 at 1:36 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi the comment about NOTICE level in elog.h is obsolete Committed. Thanks! Regards, -- Fujii Masao -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Improving log capture of TAP tests with IPC::Run

2015-07-09 Thread Michael Paquier
On Thu, Jul 9, 2015 at 10:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: Heikki Linnakangas hlinn...@iki.fi writes: Pushed, thanks. Shouldn't we consider back-patching these improvements into 9.5 and 9.4? ISTM the main point is to help debug buildfarm failures, and we won't be getting much