Re: [HACKERS] why not parallel seq scan for slow functions

2018-02-18 Thread Ashutosh Bapat
On Mon, Feb 19, 2018 at 9:35 AM, Ashutosh Bapat wrote: > On Sat, Feb 17, 2018 at 8:17 AM, Amit Kapila wrote: >> On Fri, Feb 16, 2018 at 9:29 AM, Ashutosh Bapat >> wrote: >>> On Thu, Feb 15, 2018 at 7:47

Re: [PATCH] Add missing type conversion functions for PL/Python

2018-02-18 Thread Anthony Bykov
On Wed, 31 Jan 2018 11:57:12 +0800 Haozhou Wang wrote: > Hi All, > > PL/Python already has different type conversion functions to > convert PostgreSQL datum to Python object. However, the conversion > functions from Python object to PostgreSQL datum only has Boolean, > Bytea

Re: Server Crash while executing pg_replication_slot_advance (second time)

2018-02-18 Thread Masahiko Sawada
On Sat, Feb 17, 2018 at 11:26 AM, Arseny Sher wrote: > > Hello, > > I confirm this bug. The idea is that while usually we start decoding > from safe data.restart_lsn point, here we don't care about consistent > snapshots and rush into decoding right away from

Re: [HACKERS] path toward faster partition pruning

2018-02-18 Thread Amit Langote
Hi David. On 2018/02/17 18:24, David Rowley wrote: > On 2 February 2018 at 23:03, Amit Langote > wrote: >> I started wondering if it's not such a good idea to make >> PartitionClauseInfo a Node at all? I went back to your earlier message >> [1] where you said

Re: [HACKERS] Removing [Merge]Append nodes which contain a single subpath

2018-02-18 Thread David Rowley
On 19 February 2018 at 15:11, Tomas Vondra wrote: > 1) I can confirm that it indeed eliminates the Append overhead, using > the example from [1], modified to use table with a single partition. Of > course, this is a pretty formal check, because the patch simply

Re: spelling of enable_partition_wise_join

2018-02-18 Thread Ashutosh Bapat
On Mon, Feb 19, 2018 at 9:08 AM, Ashutosh Bapat wrote: > > Thanks. There are functions like try_partition_wise_join(), > generate_partition_wise_join_paths() which use partition_wise > spelling. Should we update those as well? I see that the commit already did

Re: [HACKERS] Partition-wise aggregation/grouping

2018-02-18 Thread Ashutosh Bapat
Commit 2fb1abaeb016aeb45b9e6d0b81b7a7e92bb251b9, changed enable_partition_wise_join to enable_partitionwise_join. This patch too should use enable_partitionwise_agg instead of enable_partition_wise_agg.

[doc fix] Correct calculation of vm.nr_hugepages

2018-02-18 Thread Tsunakawa, Takayuki
Hello, The current PostgreSQL documentation overestimates the number of huge pages (vm.nr_hugepages) because the calculation uses the maximum virtual address space. In practice, huge pages are only used for the anonymous shared memory segment. The attached patch fixes the documentation.

Re: pgbench - allow to specify scale as a size

2018-02-18 Thread Fabien COELHO
Hello Alvaro & Tom, Why not then insert a "few" rows, measure size, truncate the table, compute the formula and then insert to the desired user requested size? (or insert what should be the minimum, scale 1, measure, and extrapolate what's missing). It doesn't sound too complicated to me,

Re: TODO item: WAL replay of CREATE TABLESPACE with differing directory structure

2018-02-18 Thread Michael Paquier
On Sun, Feb 18, 2018 at 04:43:38PM -0800, Patrick Krecker wrote: > On Tue, Feb 13, 2018 at 8:24 PM, Michael Paquier wrote: >> Let's be clear here. There is no hard restriction with tablespace paths >> within the data directory, though you should not do that, and you get a >>

Re: Creation of wiki page for open items of v11

2018-02-18 Thread Michael Paquier
On Fri, Feb 09, 2018 at 11:37:52AM +0530, Ashutosh Bapat wrote: > On Fri, Feb 9, 2018 at 9:14 AM, Michael Paquier wrote: >> Are there any objections in creating a wiki page to track all those bugs >> and issues? We don't want to lose track of all that. > > +1. Okay, I have

Re: [HACKERS] why not parallel seq scan for slow functions

2018-02-18 Thread Ashutosh Bapat
On Sat, Feb 17, 2018 at 8:17 AM, Amit Kapila wrote: > On Fri, Feb 16, 2018 at 9:29 AM, Ashutosh Bapat > wrote: >> On Thu, Feb 15, 2018 at 7:47 PM, Amit Kapila wrote: >>> On Thu, Feb 15, 2018 at 4:18 PM, Ashutosh

Re: [HACKERS] Cache lookup errors with functions manipulation object addresses

2018-02-18 Thread Michael Paquier
On Sat, Feb 17, 2018 at 07:17:24PM -0300, Alvaro Herrera wrote: > Pushed 0003. Thanks. > Maybe we can get rid of format_type_be_qualified too, but I didn't > care too much about it either; it's not a big deal I think. Agreed. There are 16 callers spread in objectaddress.c and regproc.c, this

Re: non-bulk inserts and tuple routing

2018-02-18 Thread Amit Langote
Fujita-san, On 2018/02/16 19:50, Etsuro Fujita wrote: > (2018/02/16 18:23), Amit Langote wrote: >> Good idea. Done. > Thanks.  I fixed a typo (s/Converti/Convert/) and adjusted these comments > a bit further to match the preceding code/comments.  Attached is the > updated version. Thank you for

Re: TODO item: WAL replay of CREATE TABLESPACE with differing directory structure

2018-02-18 Thread Patrick Krecker
On Tue, Feb 13, 2018 at 8:24 PM, Michael Paquier wrote: > On Tue, Feb 13, 2018 at 01:44:34PM -0800, Patrick Krecker wrote: >> I am searching for a way to make a contribution to Postgres and I came >> across this TODO item (I realize there has been some controversy >> around

Re: [HACKERS] Removing [Merge]Append nodes which contain a single subpath

2018-02-18 Thread Tomas Vondra
Hi, On 01/25/2018 01:55 PM, David Rowley wrote: > I've attached an updated patch which takes care of the build failure > caused by the new call to create_append_path added in bb94ce4. > I've been looking at the patch over the past few days. I haven't found any obvious issues with it, but I do

Re: ALTER TABLE ADD COLUMN fast default

2018-02-18 Thread Andrew Dunstan
On Sun, Feb 18, 2018 at 2:52 PM, David Rowley wrote: > On 17 February 2018 at 10:46, Andrew Dunstan > wrote: >> The attached version largely fixes with the performance degradation >> that Tomas Vondra reported, replacing an O(N^2)

RE: [bug fix] Cascaded standby cannot start after a clean shutdown

2018-02-18 Thread Tsunakawa, Takayuki
Thank you for reviewing. From: Michael Paquier [mailto:mich...@paquier.xyz] > It seems to me that the consolidation of the page read should happen directly > in xlogreader.c and not even in one of its callbacks so as no garbage data > is presented back to the caller using its own XLogReader. > I

Re: Documenting PROVE_TESTS in section of TAP tests

2018-02-18 Thread Craig Ringer
On 17 February 2018 at 22:03, Michael Paquier wrote: > Hi all, > > The section of the documentation dedicated to TAP tests mentions > PROVE_FLAGS: > https://www.postgresql.org/docs/devel/static/regress-tap.html > > I think that it would be a good idea to mention PROVE_TESTS

Re: ALTER TABLE ADD COLUMN fast default

2018-02-18 Thread David Rowley
On 19 February 2018 at 13:48, Andrew Dunstan wrote: > On Sun, Feb 18, 2018 at 2:52 PM, David Rowley > wrote: >> I'll try to spend some time reviewing the code in detail soon. >> > > Thanks. I'll fix the typos in the next version of

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-18 Thread Andreas Seltenreich
Pavan Deolasee writes: > Thanks for doing those tests. I've just sent v16a version of the patch and > I think it fixes the issues reported so far. Can you please recheck? Please > let me know if there are other issues detected by sqlsmith or otherwise. I re-did the testing with merge_v16a

Re: [HACKERS] Bug in to_timestamp().

2018-02-18 Thread Dmitry Dolgov
> On 17 February 2018 at 10:02, Arthur Zakirov wrote: > > I think it could be fixed by another patch. But I'm not sure that it > will be accepted as well as this patch :). Why do you think there should be another patch for it?

Re: missing toast table for pg_policy

2018-02-18 Thread Joe Conway
On 02/18/2018 11:18 AM, Tom Lane wrote: > Joe Conway writes: >> Is there really a compelling reason to not just create toast tables for >> all system catalogs as in the attached? > > What happens when you VACUUM FULL pg_class? (The associated toast table > would have to be

Re: different results from plpgsql functions related to last changes in master

2018-02-18 Thread Tom Lane
Pavel Stehule writes: > I did update of plpgsql_check and I see, so some functions returns > different result than on older posgresql. Probably this is wanted behave, > but It should be mentioned as partial compatibility break, because some > regress test can be broken

Re: missing toast table for pg_policy

2018-02-18 Thread Joe Conway
On 02/17/2018 11:39 AM, Tom Lane wrote: > Joe Conway writes: >> Yes, exactly. I'm fine with not backpatching, just wanted to raise the >> possibility. I will push later today to HEAD (with a catalog version bump). > > BTW, I was wondering if it'd be a good idea to try to

Re: missing toast table for pg_policy

2018-02-18 Thread Tom Lane
Joe Conway writes: > Is there really a compelling reason to not just create toast tables for > all system catalogs as in the attached? What happens when you VACUUM FULL pg_class? (The associated toast table would have to be nonempty for the test to prove much.) I'm fairly

Re: different results from plpgsql functions related to last changes in master

2018-02-18 Thread Pavel Stehule
2018-02-18 17:48 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > I did update of plpgsql_check and I see, so some functions returns > > different result than on older posgresql. Probably this is wanted behave, > > but It should be mentioned as

Re: [HACKERS] Can ICU be used for a database's default sort order?

2018-02-18 Thread Michail Nikolaev
Hello. Just want to inform: I have run check,installcheck,plcheck,contribcheck,modulescheck,ecpgcheck,isolationcheck,upgradecheck tests on Windows 10, VC2017 with patch applied on top of 2a41507dab0f293ff241fe8ae326065998668af8 as Andrey asked me. Everything is passing with and without