Re: [HACKERS] [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

2017-03-28 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > I would try something like this: > > @opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } > map { s/\Q$(top_builddir)\E/\"$topdir\"/; } > split(/\s+/, $1); That map is not going to work: it'll modify the values returned by

Re: [HACKERS] [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

2017-03-28 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > On 03/28/2017 05:23 AM, Dagfinn Ilmari Mannsåker wrote: >> +@opts = grep { !/\$\(/ && /^--/ } >> +map { (my $x = $_) =~ >> s/\Q$(top_builddir)\E/\"$topdir\"/; $x;} >> +split(/\s+/, $1);

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-28 Thread Michael Paquier
On Tue, Mar 28, 2017 at 1:57 PM, Vaishnavi Prabakaran wrote: > Thanks Craig and Michael for confirming that "PQsetSingleRowMode" should be > called right after "PQbatchQueueProcess". > > Michael Paquier wrote: > >> It seems to me that >>this should also be effective

Re: [HACKERS] [PATCH] Generic type subscripting

2017-03-28 Thread Arthur Zakirov
Hello, On 27.03.2017 23:28, Dmitry Dolgov wrote: Here is a new version of this patch. What was changed: * I rebased code against the latest version of master and adapted recent changes about the expression execution * Several names (functions and related pg_type column) were changed * A

Re: [HACKERS] Documentation improvements for partitioning

2017-03-28 Thread Amit Langote
On 2017/03/28 0:23, Robert Haas wrote: > On Thu, Mar 9, 2017 at 8:23 PM, Amit Langote wrote: >> Attached updated patches. > > Committed 0002, 0003. Thanks a lot for committing these and reviewing 0001. > I think the section on BRIN in 0001 is just silly. BRIN is a very > useful index type,

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Amit Kapila
On Mon, Mar 27, 2017 at 2:19 PM, Pavan Deolasee wrote: > > > On Fri, Mar 24, 2017 at 11:49 PM, Pavan Deolasee > wrote: >> >> >> >> On Fri, Mar 24, 2017 at 6:46 PM, Amit Kapila >> wrote: >>> >>> >>> >>> I was worried

Re: [HACKERS] [PATCH] Generic type subscripting

2017-03-28 Thread Dmitry Dolgov
On 28 March 2017 at 11:58, Arthur Zakirov wrote: > > Your patch reverts commits from 25-26 march. And therefore contains 15000 lines. Wow, I didn't notice that, sorry - will fix it shortly.

Re: [HACKERS] New CORRESPONDING clause design

2017-03-28 Thread Pavel Stehule
2017-03-28 13:58 GMT+02:00 Surafel Temesgen : > can you help with fixing it Pavel? > There must be some new preanalyze stage - you have to know result columns before you are starting a analyze Regards Pavel > > On Mon, Mar 27, 2017 at 11:48 AM, Pavel Stehule

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Amit Kapila
On Mon, Mar 27, 2017 at 2:19 PM, Pavan Deolasee wrote: > On Fri, Mar 24, 2017 at 11:49 PM, Pavan Deolasee > wrote: >> >> >> >> On Fri, Mar 24, 2017 at 6:46 PM, Amit Kapila >> wrote: >>> >>> >>> >>> I was worried for

Re: [HACKERS] New CORRESPONDING clause design

2017-03-28 Thread Surafel Temesgen
can you help with fixing it Pavel? On Mon, Mar 27, 2017 at 11:48 AM, Pavel Stehule wrote: > Hi > > fresh update - I enhanced Value node by location field as Tom proposal. > > Few more regress tests. > > But I found significant issue, that needs bigger fix - Surafel,

[HACKERS] extended stats not friendly towards ANALYZE with subset of columns

2017-03-28 Thread David Rowley
I'm just reviewing Tomas' code for the dependencies part of the stats when I saw something that looked a bit unusual. I tested with: CREATE TABLE ab1 (a INTEGER, b INTEGER); ALTER TABLE ab1 ALTER a SET STATISTICS 0; INSERT INTO ab1 SELECT a, a%23 FROM generate_series(1, 1000) a; CREATE

Re: [HACKERS] UPDATE of partition key

2017-03-28 Thread Amit Khandekar
On 27 March 2017 at 13:05, Amit Khandekar wrote: >> Also, there are a few places in the documentation mentioning that such >> updates cause error, >> which will need to be updated. Perhaps also add some explanatory notes >> about the mechanism (delete+insert), trigger

Re: [HACKERS] [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

2017-03-28 Thread Andrew Dunstan
On 03/28/2017 07:31 AM, Dagfinn Ilmari Mannsåker wrote: > Andrew Dunstan writes: > >> I would try something like this: >> >> @opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } >> map { s/\Q$(top_builddir)\E/\"$topdir\"/; } >> split(/\s+/, $1); > That

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-03-28 Thread Amit Langote
On 2017/03/27 23:30, Robert Haas wrote: > On Fri, Feb 17, 2017 at 3:23 AM, Amit Langote > wrote: >> In certain cases, pg_dump's dumpTableSchema() emits a separate ALTER TABLE >> command for those schema elements of a table that could not be included >> directly in

Re: [HACKERS] [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

2017-03-28 Thread Andrew Dunstan
On 03/27/2017 08:58 PM, Tom Lane wrote: > I wrote: >> Peter Eisentraut writes: >>> Clean up Perl code according to perlcritic >> This seems to have broken the regression tests (specifically, dblink) >> on at least some of the Windows buildfarm critters. > I'm hardly a Perl

Re: [HACKERS] [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

2017-03-28 Thread Andrew Dunstan
On 03/28/2017 05:23 AM, Dagfinn Ilmari Mannsåker wrote: > + @opts = grep { !/\$\(/ && /^--/ } > + map { (my $x = $_) =~ > s/\Q$(top_builddir)\E/\"$topdir\"/; $x;} > + split(/\s+/, $1); > The use of this lexical $x variable seems

Re: [HACKERS] Speedup twophase transactions

2017-03-28 Thread Nikhil Sontakke
> > > I don't have anything else to say about this patch, so should we mark > that as ready for committer? There are still a couple of days left > until the end of the CF, and quite a lot has happened, so this could > get on time into PG10. > Yes, let's mark it "ready for committer". This

Re: [HACKERS] Proposal for changes to recovery.conf API

2017-03-28 Thread Michael Paquier
On Mon, Mar 27, 2017 at 5:27 PM, Simon Riggs wrote: > I share your pain, but there are various things about this patch that > make me uncomfortable. I believe we are looking for an improved design > not just a different design. > > I think the best time to commit such a

[HACKERS] Feature suggestion: Database-Security-Modules (DSM)

2017-03-28 Thread Jan Kechel
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Hi PostgreSQL Hackers, I'm developing software using PostgreSQL for several years and want to propose a feature to improve security of (badly written?) Web-Apps. I call it 'Database Security Modules', derived from Linux-Security-Modules (aka

Re: [HACKERS] [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

2017-03-28 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > I wrote: >> Peter Eisentraut writes: >>> Clean up Perl code according to perlcritic > >> This seems to have broken the regression tests (specifically, dblink) >> on at least some of the Windows buildfarm critters. > > I'm hardly a Perl

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Pavan Deolasee
On Tue, Mar 28, 2017 at 1:32 AM, Alvaro Herrera wrote: > Is the WARM tap test suite supposed to work when applied without all the > other patches? I just tried applied that one and running "make check -C > src/test/modules", and it seems to hang after giving "ok 5" for

Re: [HACKERS] Speedup twophase transactions

2017-03-28 Thread Michael Paquier
On Tue, Mar 28, 2017 at 3:08 PM, Nikhil Sontakke wrote: >> >> I don't have anything else to say about this patch, so should we mark >> that as ready for committer? There are still a couple of days left >> until the end of the CF, and quite a lot has happened, so this

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

2017-03-28 Thread Kyotaro HORIGUCHI
This conflicts with 6912acc (replication lag tracker) so just rebased on a6f22e8. At Fri, 17 Mar 2017 16:48:27 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170317.164827.46663014.horiguchi.kyot...@lab.ntt.co.jp> > Hello, > > At Mon, 13 Mar 2017

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-28 Thread Amit Kapila
On Tue, Mar 28, 2017 at 10:43 AM, Mithun Cy wrote: > On Mon, Mar 27, 2017 at 11:21 AM, Amit Kapila wrote: > > > As you have said we can solve it if we allocate buckets always in > power-of-2 when we do hash index meta page init. But on other >

[HACKERS] xmltable doc fix and example for XMLNAMESPACES

2017-03-28 Thread Pavel Stehule
Hi I am sending a patch with changes in XMLTABLE documentation proposed by Arjen. Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index ba6f8dd8d2..857c56241b 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10504,7 +10504,7 @@ SELECT

Re: [HACKERS] On How To Shorten the Steep Learning Curve Towards PG Hacking...

2017-03-28 Thread Kang Yuzhe
Thanks Tsunakawa for such an informative reply. Almost all of the docs related to the internals of PG are of introductory concepts only. There is even more useful PG internals site entitled "The Internals of PostgreSQL" in http://www.interdb.jp/pg/ translation of the Japanese PG Internals. The

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-28 Thread Rushabh Lathia
On Tue, Mar 28, 2017 at 10:00 AM, Tomas Vondra wrote: > > > On 03/27/2017 01:40 PM, Rushabh Lathia wrote: > >> >> ... >> I was doing more testing with the patch and I found one more server >> crash with the patch around same area, when we forced the gather >> merge

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-03-28 Thread Amit Langote
Hi Stephen, On 2017/03/21 1:40, Stephen Frost wrote: > Amit, > > * Amit Langote (langote_amit...@lab.ntt.co.jp) wrote: >> On 2017/02/17 22:32, Stephen Frost wrote: >>> * Amit Langote (langote_amit...@lab.ntt.co.jp) wrote: In certain cases, pg_dump's dumpTableSchema() emits a separate ALTER

[HACKERS] walsender.c comments

2017-03-28 Thread Erik Rijkers
Small fry gathered wile reading walsender.c ... (to be applied to master) Thanks, Erik Rijkers --- src/backend/replication/walsender.c.orig 2017-03-28 08:34:56.787217522 +0200 +++ src/backend/replication/walsender.c 2017-03-28 08:44:56.486327700 +0200 @@ -14,11 +14,11 @@ * replication-mode

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-03-28 Thread Pavel Stehule
2017-03-27 13:59 GMT+02:00 Alexander Korotkov : > On Fri, Mar 10, 2017 at 6:06 PM, Pavel Stehule > wrote: > >> 2017-03-10 16:00 GMT+01:00 Alexander Korotkov >> : >> >>> On Fri, Mar 10, 2017 at 5:16 PM, Stephen Frost

Re: [HACKERS] Feature suggestion: Database-Security-Modules (DSM)

2017-03-28 Thread Pavel Stehule
2017-03-28 9:51 GMT+02:00 Jan Kechel : > -BEGIN PGP SIGNED MESSAGE- > Hash: RIPEMD160 > > > Hi PostgreSQL Hackers, > > > I'm developing software using PostgreSQL for several years and want to > propose a feature to improve security of (badly written?) Web-Apps. > > I call

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-28 Thread Mithun Cy
On Tue, Mar 28, 2017 at 12:21 PM, Amit Kapila wrote: > I think both way it can work. I feel there is no hard pressed need > that we should make the computation in sorting same as what you do > _hash_doinsert. In patch_B, I don't think new naming for variables is > good.

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-28 Thread Daniel Verite
Michael Paquier wrote: > # Running: testlibpqbatch dbname=postgres 1 copyfailure > dispatching SELECT query failed: cannot queue commands during COPY > > COPYBUF: 5 > > Error status and message got from server due to COPY command failure > are : PGRES_FATAL_ERROR ERROR: unexpected

Re: [HACKERS] [PATCH] Incremental sort

2017-03-28 Thread David Steele
Hi Alexander, On 3/20/17 10:19 AM, Heikki Linnakangas wrote: On 03/20/2017 11:33 AM, Alexander Korotkov wrote: Please, find rebased patch in the attachment. I had a quick look at this. <...> According to 'perf', 85% of the CPU time is spent in ExecCopySlot(). To alleviate that, it might

[HACKERS] Getting server crash after running sqlsmith

2017-03-28 Thread tushar
Hi, After runinng sqlsmith against latest sources of PG v10 , able to see a crash - here is the standalone testcase - Make sure 'logging_collector=on' in postgresql.conf file Connect to psql terminal ,run this query postgres=# select 80 as c0, pg_catalog.pg_backend_pid()

Re: [HACKERS] Index usage for elem-contained-by-const-range clauses

2017-03-28 Thread David Steele
On 3/24/17 10:50 AM, David Steele wrote: Hi Pritam, On 3/17/17 5:41 PM, Pritam Baral wrote: So sorry. I'm attaching the correct version of the original with this, in case you want to test the limited implementation, because I still have to go through Tom's list of suggestions. BTW, the patch

Re: [HACKERS] [COMMITTERS] pgsql: Clean up Perl code according to perlcritic

2017-03-28 Thread Peter Eisentraut
On 3/28/17 05:23, Dagfinn Ilmari Mannsåker wrote: > I suggest splitting the substitution and filtering part into separate > map and grep calls, for clarity. The substituion is crying out for the > /r regex modifier to avoid the local variable, but that's only available > since perl 5.14. > >

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Simon Riggs
On 23 March 2017 at 13:16, Dave Page wrote: > Thanks - updated patch attached. I've edited the comments and docs on this patch, so attach a new version with similar name. -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Simon Riggs
On 27 March 2017 at 13:54, Robert Haas wrote: > On Sat, Mar 25, 2017 at 12:30 PM, Dave Page wrote: >> Right - and if a user doesn't like it, they can easily just not use the >> default role and create their own alternative instead. > > OK, I see the

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Amit Kapila
On Tue, Mar 28, 2017 at 4:05 PM, Amit Kapila wrote: > On Mon, Mar 27, 2017 at 2:19 PM, Pavan Deolasee > wrote: >> On Fri, Mar 24, 2017 at 11:49 PM, Pavan Deolasee >> wrote: >>> >>> >>> >>> On Fri, Mar 24, 2017 at 6:46

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

2017-03-28 Thread Simon Riggs
On 28 March 2017 at 03:53, Craig Ringer wrote: > On 28 March 2017 at 09:25, Andres Freund wrote: > >> If you actually need separate decoding of 2PC, then you want to wait for >> the PREPARE to be replicated. If that replication has to wait for the >>

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

2017-03-28 Thread Andres Freund
On 2017-03-28 15:32:49 +0100, Simon Riggs wrote: > On 28 March 2017 at 03:53, Craig Ringer wrote: > > On 28 March 2017 at 09:25, Andres Freund wrote: > > > >> If you actually need separate decoding of 2PC, then you want to wait for > >> the PREPARE to

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

2017-03-28 Thread Simon Riggs
On 28 March 2017 at 15:38, Andres Freund wrote: > On 2017-03-28 15:32:49 +0100, Simon Riggs wrote: >> On 28 March 2017 at 03:53, Craig Ringer wrote: >> > On 28 March 2017 at 09:25, Andres Freund wrote: >> > >> >> If you actually

[HACKERS] Today's failures on buildfarm member longfin

2017-03-28 Thread Tom Lane
Last night I updated longfin's host to the latest macOS and XCode point releases. That brought with it a new clang version which is slightly pickier than the old: it's complaining about log.c:5047:16: error: implicit conversion from 'int' to 'char' changes value from 255 to -1

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Peter Eisentraut
On 3/28/17 10:24, Simon Riggs wrote: >> Let me make a modest proposal. > > +1 > > I aim to commit something today. If you have other viewpoints, so say > now. There aren't many days left to express views and do anything > about them, so lets do it. I don't even see an actual proposed patch

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Peter Eisentraut
On 3/27/17 08:54, Robert Haas wrote: > OK, I see the points that both of you are making and I admit that > they've got some validity to them. Let me make a modest proposal. > Suppose we define the pg_monitor role as strictly a bundle of > privileges that could be granted individually if desired,

Re: [HACKERS] WIP: [[Parallel] Shared] Hash

2017-03-28 Thread David Steele
Hi Thomas, On 3/28/17 1:41 AM, Rafia Sabih wrote: On Mon, Mar 27, 2017 at 12:20 PM, Thomas Munro I thought this last point about Windows might be fatal to my design, but it seems that Windows since at least version 2000 has support for Unixoid unlinkability via the special flag

Re: [HACKERS] [WIP] RE: DECLARE STATEMENT setting up a connection in ECPG

2017-03-28 Thread David Steele
Hi Takeshi, On 3/23/17 1:33 AM, Haribabu Kommi wrote: The test patch looks good to me. This thread has been idle for five days. Please respond with a new patch by 2017-03-30 00:00 AoE (UTC-12) or this submission will be marked "Returned with Feedback". -- -David da...@pgmasters.net --

Re: [HACKERS] Valgrind failures caused by multivariate stats patch

2017-03-28 Thread Alvaro Herrera
Tomas Vondra wrote: > OK, this did the trick. And just as I suspected, it seems to be due to doing > memcpy+offsetof when serializing the statistic into a bytea. The attached > patch fixes that for me. Can you test it on your build? Buildfarm member skink confirms that this is fixed. Thanks!

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-28 Thread Robert Haas
On Tue, Mar 28, 2017 at 5:00 AM, Mithun Cy wrote: >> This will go wrong for split point group zero. In general, I feel if >> you handle computation for split groups lesser than >> SPLITPOINT_GROUPS_WITH_ONLY_ONE_PHASE in the caller, then all your >> macros will become

Re: [HACKERS] Removing binaries

2017-03-28 Thread Peter Eisentraut
On 3/21/17 08:12, Robert Haas wrote: > I think a big part of the usability problem here comes from the fact > that the default database for connections is based on the username, > but the default databases that get created have fixed names (postgres, > template1). So the default configuration is

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Robert Haas
On Mon, Mar 27, 2017 at 10:25 PM, Pavan Deolasee wrote: > On Tue, Mar 28, 2017 at 1:59 AM, Robert Haas wrote: >> On Thu, Mar 23, 2017 at 2:47 PM, Pavan Deolasee >> wrote: >> > It's quite hard to say that until we see

[HACKERS] Re: PATCH: pageinspect / add page_checksum and bt_page_items(bytea)

2017-03-28 Thread David Steele
On 3/23/17 11:27 PM, Peter Eisentraut wrote: On 3/17/17 18:35, Tomas Vondra wrote: On 03/17/2017 05:23 PM, Peter Eisentraut wrote: I'm struggling to find a good way to share code between bt_page_items(text, int4) and bt_page_items(bytea). If we do it via the SQL route, as I had suggested, it

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

2017-03-28 Thread Andres Freund
On 2017-03-28 15:55:15 +0100, Simon Riggs wrote: > On 28 March 2017 at 15:38, Andres Freund wrote: > > On 2017-03-28 15:32:49 +0100, Simon Riggs wrote: > >> On 28 March 2017 at 03:53, Craig Ringer wrote: > >> > On 28 March 2017 at 09:25, Andres Freund

Re: [HACKERS] Today's failures on buildfarm member longfin

2017-03-28 Thread Robert Haas
On Tue, Mar 28, 2017 at 11:25 AM, Tom Lane wrote: > As noted in the other thread, we could either fix this in a > quick-and-dirty way by casting XLR_BLOCK_ID_DATA_SHORT and related > values to "char" explicitly, or we could run around and change the > target pointer variables

Re: [HACKERS] Today's failures on buildfarm member longfin

2017-03-28 Thread Andres Freund
On 2017-03-28 11:25:08 -0400, Tom Lane wrote: > Last night I updated longfin's host to the latest macOS and XCode point > releases. That brought with it a new clang version which is slightly > pickier than the old: it's complaining about > > log.c:5047:16: error: implicit conversion from 'int'

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Peter Eisentraut
This patch touches the pg_buffercache and pg_freespacemap extensions, but there appear to be some files missing. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [COMMITTERS] pgsql: Improve access to parallel query from procedural languages.

2017-03-28 Thread Robert Haas
On Mon, Mar 27, 2017 at 11:57 PM, Rafia Sabih wrote: > On Mon, Mar 27, 2017 at 5:54 PM, Robert Haas wrote: >> >> If it's just that they are relying on unsynchronized global variables, >> then it's sufficient to mark them parallel-restricted

Re: [HACKERS] New CORRESPONDING clause design

2017-03-28 Thread Pavel Stehule
2017-03-28 14:18 GMT+02:00 Pavel Stehule : > > > 2017-03-28 13:58 GMT+02:00 Surafel Temesgen : > >> can you help with fixing it Pavel? >> > > There must be some new preanalyze stage - you have to know result columns > before you are starting a

Re: [HACKERS] dblink module printing unnamed connection (with commit acaf7ccb94)

2017-03-28 Thread Peter Eisentraut
On 3/23/17 01:38, Rushabh Lathia wrote: > DBLINK contrib module started showing :"unnamed" connection name. > Before this, macro used to assign the conname local variable; I quickly > worked > on the fix and attached patch do fix the issues. Patch assign the conname > local variable, so that

Re: [HACKERS] Logical decoding on standby

2017-03-28 Thread Andres Freund
Hi, On 2017-03-27 16:03:48 +0800, Craig Ringer wrote: > On 27 March 2017 at 14:08, Craig Ringer wrote: > > > So this patch makes ReplicationSlotAcquire check that the slot > > database matches the current database and refuse to acquire the slot > > if it does not. > >

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Peter Eisentraut
On 3/28/17 11:34, Dave Page wrote: > On Tue, Mar 28, 2017 at 11:31 AM, Peter Eisentraut > wrote: >> This patch touches the pg_buffercache and pg_freespacemap extensions, >> but there appear to be some files missing. > > Are you looking at an old version? There

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-03-28 Thread Robert Haas
On Tue, Mar 28, 2017 at 6:50 AM, Amit Langote wrote: >> Isn't it bogus that this is generating ALTER TABLE .. SET NOT NULL >> columns at all? You didn't say anything like that when setting up the >> database, so why should it be there when dumping? > > So we should

Re: [HACKERS] Removing binaries

2017-03-28 Thread Robert Haas
On Tue, Mar 28, 2017 at 11:44 AM, Peter Eisentraut wrote: > On 3/21/17 08:12, Robert Haas wrote: >> I think a big part of the usability problem here comes from the fact >> that the default database for connections is based on the username, >> but the default

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-03-28 Thread David Steele
On 3/23/17 1:54 AM, Masahiko Sawada wrote: On Wed, Mar 15, 2017 at 7:51 AM, Peter Geoghegan wrote: On Tue, Mar 14, 2017 at 3:10 PM, Peter Geoghegan wrote: We already have BTPageOpaqueData.btpo, a union whose contained type varies based on the page being dead. We

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread David Steele
Hi Pavan, On 3/28/17 11:04 AM, Robert Haas wrote: On Mon, Mar 27, 2017 at 10:25 PM, Pavan Deolasee wrote: On Tue, Mar 28, 2017 at 1:59 AM, Robert Haas wrote: On Thu, Mar 23, 2017 at 2:47 PM, Pavan Deolasee wrote:

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Dave Page
On Tue, Mar 28, 2017 at 11:31 AM, Peter Eisentraut wrote: > This patch touches the pg_buffercache and pg_freespacemap extensions, > but there appear to be some files missing. Are you looking at an old version? There was one where I forgot to add some files, but

Fwd: [HACKERS] free space map and visibility map

2017-03-28 Thread Jeff Janes
I accidentally sent this off-list, sending to the list now: On Sun, Mar 26, 2017 at 10:38 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > At Sat, 25 Mar 2017 19:53:47 -0700, Jeff Janes > wrote in

Re: [HACKERS] O(1) DSM handle operations

2017-03-28 Thread Robert Haas
On Mon, Mar 27, 2017 at 11:47 PM, Thomas Munro wrote: > Couldn't cleanup code continue to work just the same way though? The > only extra structure is an intrusive freelist, but that could be > completely ignored by code that wants to scan the whole array after >

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-28 Thread Robert Haas
On Mon, Mar 27, 2017 at 11:20 PM, Petr Jelinek wrote: > On 28/03/17 04:46, Robert Haas wrote: >> On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund wrote: Btw now that I look at the code, I guess we'll want to get rid of bgw_main

Re: [HACKERS] Today's failures on buildfarm member longfin

2017-03-28 Thread Tom Lane
Andres Freund writes: > On 2017-03-28 11:25:08 -0400, Tom Lane wrote: >> Since, per previous agreement[1], longfin is running with -Werror, we >> either have to do something about this or revert the decision to make it >> use -Werror --- and I'm not too pleased about the

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-28 Thread Petr Jelinek
On 28/03/17 17:55, Robert Haas wrote: > On Mon, Mar 27, 2017 at 11:20 PM, Petr Jelinek > wrote: >> On 28/03/17 04:46, Robert Haas wrote: >>> On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund wrote: > Btw now that I look at the code, I guess

Re: [HACKERS] [COMMITTERS] pgsql: Allow vacuums to report oldestxmin

2017-03-28 Thread Fujii Masao
On Tue, Mar 28, 2017 at 1:06 AM, Masahiko Sawada wrote: > On Sun, Mar 26, 2017 at 2:26 AM, Masahiko Sawada > wrote: >> On Sun, Mar 26, 2017 at 1:37 AM, Fujii Masao wrote: >>> On Mon, Mar 6, 2017 at 9:37 PM, Masahiko Sawada

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Pavan Deolasee
On Tue, Mar 28, 2017 at 4:05 PM, Amit Kapila wrote: > > > As asked previously, can you explain me on what basis are you > considering it robust? The comments on top of datumIsEqual() clearly > indicates the danger of using it for toasted values (Also, it will > probably

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Pavan Deolasee
On Tue, Mar 28, 2017 at 7:04 PM, Amit Kapila wrote: > > > For such an heap insert, we will pass > the actual value of column to index_form_tuple during index insert. > However during recheck when we fetch the value of c2 from heap tuple > and pass it index tuple, the

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of find_all_inheritors()

2017-03-28 Thread Aleksander Alekseev
Hi, Robert. > I'm a little worried that this will be noticeably slower when the > number of partitions is small, like 4 or 8 or 16. In other places, > we've found it necessary to support both a list-based strategy and a > hash-based strategy to avoid regressing small cases (e.g. > join_rel_list

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Dave Page
On Tue, Mar 28, 2017 at 11:39 AM, Peter Eisentraut wrote: > On 3/28/17 11:34, Dave Page wrote: >> On Tue, Mar 28, 2017 at 11:31 AM, Peter Eisentraut >> wrote: >>> This patch touches the pg_buffercache and pg_freespacemap

Re: [HACKERS] On How To Shorten the Steep Learning Curve Towards PG Hacking...

2017-03-28 Thread Adrien Nayrat
On 03/27/2017 02:00 PM, Kang Yuzhe wrote: > 1. Prepare Hands-on with PG internals > > For example, a complete Hands-on with SELECT/INSERT SQL Standard PG > internals. > The point is the experts can pick one fairly complex feature and walk it from > Parser to Executor in a hands-on manner

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Dave Page
On Tue, Mar 28, 2017 at 12:55 PM, Robert Haas wrote: > On Tue, Mar 28, 2017 at 12:47 PM, Dave Page wrote: >>> I don't see any precedent in the code for having a hardcoded role, other >>> than >>> superuser, and allowing privileges based on a hardcoded

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Pavan Deolasee
On Tue, Mar 28, 2017 at 8:34 PM, Robert Haas wrote: > On Mon, Mar 27, 2017 at 10:25 PM, Pavan Deolasee > wrote: > > On Tue, Mar 28, 2017 at 1:59 AM, Robert Haas > wrote: > >> On Thu, Mar 23, 2017 at 2:47 PM, Pavan Deolasee

Re: [HACKERS] [COMMITTERS] pgsql: Allow vacuums to report oldestxmin

2017-03-28 Thread Alvaro Herrera
Fujii Masao wrote: > This is the evidence that no one cares about the details of VACUUM VERBOSE > output example. So I'm tempted to simplify the example (please see the > attached patch) instead of keeping updating the example. Agreed. > > If this patch is applied, it should back-patch to all

Re: [HACKERS] [COMMITTERS] pgsql: Allow vacuums to report oldestxmin

2017-03-28 Thread Fujii Masao
On Wed, Mar 29, 2017 at 1:32 AM, Fujii Masao wrote: > On Tue, Mar 28, 2017 at 1:06 AM, Masahiko Sawada > wrote: >> On Sun, Mar 26, 2017 at 2:26 AM, Masahiko Sawada >> wrote: >>> On Sun, Mar 26, 2017 at 1:37 AM, Fujii Masao

Re: [HACKERS] Removing binaries

2017-03-28 Thread Robert Haas
On Tue, Mar 28, 2017 at 12:18 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Mar 28, 2017 at 11:44 AM, Peter Eisentraut >> wrote: >>> On 3/21/17 08:12, Robert Haas wrote: I think a big part of the usability

Re: [HACKERS] [PATCH] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM

2017-03-28 Thread Nikolay Shaplov
В письме от 17 марта 2017 14:21:26 пользователь Alvaro Herrera написал: > Please make sure to mark functions as static (e.g. bringetreloptcatalog). I am a bit confused here: For brin and nbtree this is a good idea: brin.c and nbtree.c has AM-handler inside it, and there are other static

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Mark Dilger
> On Mar 28, 2017, at 8:34 AM, Dave Page wrote: > > On Tue, Mar 28, 2017 at 11:31 AM, Peter Eisentraut > wrote: >> This patch touches the pg_buffercache and pg_freespacemap extensions, >> but there appear to be some files missing. > > Are

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Dave Page
On Tue, Mar 28, 2017 at 12:04 PM, Mark Dilger wrote: > >> On Mar 28, 2017, at 8:34 AM, Dave Page wrote: >> >> On Tue, Mar 28, 2017 at 11:31 AM, Peter Eisentraut >> wrote: >>> This patch touches the pg_buffercache and

Re: [HACKERS] [PATCH] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM

2017-03-28 Thread Alvaro Herrera
Nikolay Shaplov wrote: > В письме от 17 марта 2017 14:21:26 пользователь Alvaro Herrera написал: > > > Please make sure to mark functions as static (e.g. bringetreloptcatalog). > I am a bit confused here: > > For brin and nbtree this is a good idea: brin.c and nbtree.c has AM-handler > inside

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Pavan Deolasee
On Tue, Mar 28, 2017 at 4:07 PM, Amit Kapila wrote: > > Noted few cosmetic issues in 0005_warm_updates_v21: > > 1. > pruneheap.c(939): warning C4098: 'heap_get_root_tuples' : 'void' > function returning a value > Thanks. Will fix. > > 2. > + * HCWC_WARM_UPDATED_TUPLE

Re: [HACKERS] [PATCH] ALTER DEFAULT PRIVILEGES with GRANT/REVOKE ON SCHEMAS

2017-03-28 Thread Teodor Sigaev
Thank you, pushed Matheus de Oliveira wrote: On Thu, Mar 2, 2017 at 10:27 AM, David Steele > wrote: It looks like this patch is still waiting on an update for tab completion in psql. Hi All, Sorry about the long delay... It was so

Re: [HACKERS] Removing binaries

2017-03-28 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 28, 2017 at 11:44 AM, Peter Eisentraut > wrote: >> On 3/21/17 08:12, Robert Haas wrote: >>> I think a big part of the usability problem here comes from the fact >>> that the default database for

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-03-28 Thread Robert Haas
On Mon, Mar 27, 2017 at 8:36 AM, Ashutosh Bapat wrote: > I have gone through the patch, and it looks good to me. Here's the set > of patches with this patch included. Fixed the testcase failures. > Rebased the patchset on de4da168d57de812bb30d359394b7913635d21a9.

Re: [HACKERS] Monitoring roles patch

2017-03-28 Thread Robert Haas
On Tue, Mar 28, 2017 at 12:47 PM, Dave Page wrote: >> I don't see any precedent in the code for having a hardcoded role, other than >> superuser, and allowing privileges based on a hardcoded test for membership >> in that role. I'm struggling to think of all the security

Re: [HACKERS] Removing binaries

2017-03-28 Thread Magnus Hagander
On Tue, Mar 28, 2017 at 6:44 PM, Robert Haas wrote: > On Tue, Mar 28, 2017 at 12:18 PM, Tom Lane wrote: > > Robert Haas writes: > >> On Tue, Mar 28, 2017 at 11:44 AM, Peter Eisentraut > >>

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-28 Thread Petr Jelinek
On 29/03/17 01:29, Petr Jelinek wrote: > On 28/03/17 18:05, Petr Jelinek wrote: >> On 28/03/17 17:55, Robert Haas wrote: >>> On Mon, Mar 27, 2017 at 11:20 PM, Petr Jelinek >>> wrote: On 28/03/17 04:46, Robert Haas wrote: > On Mon, Mar 27, 2017 at 10:04 PM,

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-28 Thread Alvaro Herrera
I pushed 0002 after some makeup, since it's just cosmetic and not controversial. Here's 0003 rebased on top of it. (Also, I took out the gin and gist changes: it would be wrong to change that unconditionally, because the 0x pattern appears in indexes that would be pg_upgraded. We need a

Re: [HACKERS] dsm.c API tweak

2017-03-28 Thread Alvaro Herrera
Thomas Munro wrote: > + if (CurrentResourceOwner) > + { > + seg->resowner = CurrentResourceOwner; > + ResourceOwnerRememberDSM(CurrentResourceOwner, seg); > + } > > You need to assign seg->resowner = CurrentResourceOwner > unconditionally here. Otherwise seg->resowner is

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-28 Thread Petr Jelinek
On 28/03/17 18:05, Petr Jelinek wrote: > On 28/03/17 17:55, Robert Haas wrote: >> On Mon, Mar 27, 2017 at 11:20 PM, Petr Jelinek >> wrote: >>> On 28/03/17 04:46, Robert Haas wrote: On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund wrote:

Re: [HACKERS] Logical decoding on standby

2017-03-28 Thread Craig Ringer
On 29 March 2017 at 08:01, Craig Ringer wrote: > I just notice that I failed to remove the docs changes regarding > dropping slots becoming db-specific, so I'll post a follow-up for that > in a sec. Attached. -- Craig Ringer

Re: [HACKERS] Supporting huge pages on Windows

2017-03-28 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of David Steele > It's not clear to me what state this patch should be in. Is there more > review that needs to be done or is it ready for a committer? I would most appreciate it if Magnus could

Re: [HACKERS] [PATCH] Reduce src/test/recovery verbosity

2017-03-28 Thread Peter Eisentraut
On 3/22/17 03:18, Craig Ringer wrote: > Trivial patch to change 'diag' to 'note' in TAP tests in > src/test/recovery attached. > > It'll reduce the test output a little. Committed, and also done the same in src/test/ssl/. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL

  1   2   >