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 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. Regards, -

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

2015-07-09 Thread Pavel Stehule
2015-07-03 12:27 GMT+02:00 Heikki Linnakangas : > 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 >>> wrote: >>> Is it reasonable to add this patch to CommitFest now? >>> It's alw

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 pos

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 wrote: > Heikki Linnakangas 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

Re: [HACKERS] WAL logging problem in 9.4.3?

2015-07-09 Thread Tom Lane
Andres Freund 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 >> previousl

Re: [HACKERS] RLS fails to work with UPDATE ... WHERE CURRENT OF

2015-07-09 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/08/2015 02:08 AM, Dean Rasheed wrote: > Actually I think it is fixable just by allowing the CURRENT OF > expression to be pushed down into the subquery through the > security barrier view. The planner is then guaranteed to generate a > TID scan,

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

2015-07-09 Thread Peter Geoghegan
On Thu, Jul 9, 2015 at 7:49 AM, Andrew Dunstan wrote: > I am on vacation right now, but I might have some time tomorrow to deal with > it. If not, it will be Sunday or Monday when I get to it. Okay. Thanks. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.

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

2015-07-09 Thread Stephen Frost
Noah, Andres, * Andres Freund (and...@anarazel.de) wrote: > 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

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

2015-07-09 Thread Pavel Stehule
2015-07-09 22:57 GMT+02:00 Merlin Moncure : > On Thu, Jul 9, 2015 at 3:31 PM, Pavel Stehule > wrote: > > > > > > 2015-07-09 20:08 GMT+02:00 Merlin Moncure : > >> > >> On Thu, Jul 9, 2015 at 10:48 AM, Pavel Stehule > > >> wrote: > >> > > >> > 2015-07-09 15:17 GMT+02:00 Merlin Moncure : > >> >> >

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 wrote: > > > 2015-07-09 20:08 GMT+02:00 Merlin Moncure : >> >> On Thu, Jul 9, 2015 at 10:48 AM, Pavel Stehule >> wrote: >> > >> > 2015-07-09 15:17 GMT+02:00 Merlin Moncure : >> >> >> >> On Wed, Jul 8, 2015 at 11:28 PM, Pavel Stehule >> >> >> >> wrote

[HACKERS] ToDo list update for BRIN indexes

2015-07-09 Thread Jeff Janes
Is there anything in the below section which has been been implemented or rendered irrelevant by BRIN indexes? https://wiki.postgresql.org/wiki/Todo#Indexes "Consider smaller indexes that record a range of values per heap page, rather than having one index entry for every heap row" Cheers, Jeff

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-07-09 Thread Pavel Stehule
2015-07-08 5:36 GMT+02:00 Fujii Masao : > On Sat, May 23, 2015 at 1:41 AM, Pavel Stehule > wrote: > > > > > > 2015-05-22 18:34 GMT+02:00 Tom Lane : > >> > >> Oleksandr Shulgin writes: > >> > I think this is a bit over-engineered (apart from the fact that > >> > processSQLNamePattern is also used

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

2015-07-09 Thread Pavel Stehule
2015-07-09 20:08 GMT+02:00 Merlin Moncure : > On Thu, Jul 9, 2015 at 10:48 AM, Pavel Stehule > wrote: > > > > 2015-07-09 15:17 GMT+02:00 Merlin Moncure : > >> > >> On Wed, Jul 8, 2015 at 11:28 PM, Pavel Stehule > > >> wrote: > >> > Hi > >> > > >> > second version of this patch > >> > > >> > make

Re: [HACKERS] Waits monitoring

2015-07-09 Thread Alexander Korotkov
On Thu, Jul 9, 2015 at 6:00 PM, Ildus Kurbangaliev < i.kurbangal...@postgrespro.ru> wrote: > > On Jul 9, 2015, at 5:18 PM, Fujii Masao wrote: > > On Thu, Jul 9, 2015 at 2:12 PM, Haribabu Kommi > wrote: > > On Thu, Jul 9, 2015 at 1:52 AM, Ildus Kurbangaliev > wrote: > > Hello. > > Currently, Pos

Re: [HACKERS] Resource Owner reassign Locks

2015-07-09 Thread Andres Freund
On July 9, 2015 9:13:20 PM GMT+02:00, Jeff Janes wrote: >Unfortunately I don't know what that means about the API. Does it mean >that none of the functions declared in any .h file can have their >signatures changed? But new functions can be added? That's the safest way. Sometimes you can decid

Re: [HACKERS] Resource Owner reassign Locks

2015-07-09 Thread Jeff Janes
On Fri, Jul 3, 2015 at 12:59 AM, Andres Freund wrote: > On 2015-06-07 13:44:08 -0700, Jeff Janes wrote: > > I'd like to advocate for back-patching this to 9.0, 9.1, and 9.2. It has > > run without problems for a while now, and it can be considered a bug that > > systems with a very large number

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

2015-07-09 Thread Jeff Janes
On Wed, Jul 8, 2015 at 10:10 PM, Sawada Masahiko wrote: > On Thu, Jul 9, 2015 at 4:31 AM, Jeff Janes wrote: > > On Fri, Jul 3, 2015 at 1:25 AM, Sawada Masahiko > > wrote: > >> > >> It's impossible to have VM bits set to frozen but not visible. > >> These bit are controlled independently. But ev

Re: [HACKERS] 9.5 release notes

2015-07-09 Thread Peter Geoghegan
On Fri, Jun 26, 2015 at 3:39 PM, Peter Geoghegan 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 also like you

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 cab9a

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 wrote: > > 2015-07-09 15:17 GMT+02:00 Merlin Moncure : >> >> On Wed, Jul 8, 2015 at 11:28 PM, Pavel Stehule >> wrote: >> > Hi >> > >> > second version of this patch >> > >> > make check-world passed >> >> quickly scanning the patch, the implementatio

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 wrote: > On Thu, Jul 2, 2015 at 9:00 PM, Sawada Masahiko > wrote: >> >> >> Thank you for bug report, and comments. >> >> Fixed version is attached, and source code comment is also updated. >> Please review it. >> > > I am looking into this patch and wou

Re: [HACKERS] WAL logging problem in 9.4.3?

2015-07-09 Thread Tom Lane
Fujii Masao writes: > On Tue, Jul 7, 2015 at 12:49 AM, 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. > This seems not helpful for the case where TRUNCATE is executed > before COPY. No? Huh? T

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 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 > assumptions. I started t

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 wrote: > Andres Freund 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 INSERT+INIT WAL record, w

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 wrote: Hi, I am getting tired installing manually required extensions manually. I was wondering if we might want to add option to CREATE SEQUENCE that would

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

2015-07-09 Thread Pavel Stehule
2015-07-09 15:17 GMT+02:00 Merlin Moncure : > On Wed, Jul 8, 2015 at 11:28 PM, Pavel Stehule > 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, t

Re: [HACKERS] Waits monitoring

2015-07-09 Thread Ildus Kurbangaliev
> On Jul 9, 2015, at 5:18 PM, Fujii Masao wrote: > > On Thu, Jul 9, 2015 at 2:12 PM, Haribabu Kommi > wrote: >> On Thu, Jul 9, 2015 at 1:52 AM, Ildus Kurbangaliev >> wrote: >>> Hello. >>> >>> Currently, PostgreSQL offers many metrics for monitoring. However, d

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 wrote: On Wed, Jun 10, 2015 at 11:48 AM, Andrew Dunstan wrote: Please submit a patch to adjust the treatment of negative integers in the old functions to be consistent with their treatment in the

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 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 create a n

Re: [HACKERS] Waits monitoring

2015-07-09 Thread Fujii Masao
On Thu, Jul 9, 2015 at 2:12 PM, Haribabu Kommi wrote: > On Thu, Jul 9, 2015 at 1:52 AM, Ildus Kurbangaliev > wrote: >> Hello. >> >> Currently, PostgreSQL offers many metrics for monitoring. However, detailed >> monitoring of waits is still not supported yet. Such monitoring would >> let dba know

[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 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 cases we d

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

2015-07-09 Thread Andres Freund
On 2015-07-09 22:57:25 +0900, Michael Paquier wrote: > 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 exampl

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] 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 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 tests. > > Attached is

Re: [HACKERS] obsolete comment in elog.h

2015-07-09 Thread Fujii Masao
On Thu, Jul 9, 2015 at 1:36 PM, Pavel Stehule 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: http://www.postgresql.org

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

2015-07-09 Thread Tom Lane
Heikki Linnakangas 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. regar

Re: [HACKERS] Cube extension kNN support

2015-07-09 Thread Alexander Korotkov
Hi! On Sat, May 9, 2015 at 6:53 AM, Stas Kelvich 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 patch. Did forget to

[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 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 > > consistency you ne

Re: [HACKERS] Fillfactor for GIN indexes

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

Re: [HACKERS] FPW compression leaks information

2015-07-09 Thread Fujii Masao
On Thu, Jul 9, 2015 at 10:05 PM, Michael Paquier 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 objection, I will commit

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 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 already. Pushed, t

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 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 level comments need so

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 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. @Andrew: do you n

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. Tha

[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] 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. Thank

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 startup

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

2015-07-09 Thread David Rowley
On 15 June 2015 at 12:05, David Rowley 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 set which will > benefit

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] Further issues with jsonb semantics, documentation

2015-07-09 Thread Peter Geoghegan
On Mon, Jun 22, 2015 at 6:19 PM, Peter Geoghegan wrote: > On Wed, Jun 10, 2015 at 11:48 AM, Andrew Dunstan 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. >> i.e. in the range [-n,-1]

Re: [HACKERS] optimizing vacuum truncation scans

2015-07-09 Thread Haribabu Kommi
On Thu, Jul 9, 2015 at 4:37 PM, Jeff Janes wrote: > On Wed, Jul 8, 2015 at 9:46 PM, Haribabu Kommi > wrote: >> >> On Mon, Jun 29, 2015 at 3:54 PM, Jeff Janes wrote: >> > >> > There is still the case of pages which had their visibility bit set by a >> > prior vacuum and then were not inspected by