Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits

2019-06-26 Thread Pavan Deolasee
Hi Andres, On Wed, May 29, 2019 at 1:50 PM Pavan Deolasee wrote: > > > On Tue, 28 May 2019 at 4:36 PM, Andres Freund wrote: > >> Hi, >> >> On 2019-04-07 18:04:27 -0700, Andres Freund wrote: >> > Here's a *prototype* patch for this. It only implements what I >> > described for

Run-time pruning for ModifyTable

2019-06-26 Thread David Rowley
Deja vu from this time last year when despite everyone's best efforts (mostly Alvaro) we missed getting run-time pruning in for MergeAppend into the PG11 release. This year it was ModifyTable, which is now possible thanks to Amit and Tom's modifications to the inheritance planner. I've attached

Re: mcvstats serialization code is still shy of a load

2019-06-26 Thread Tom Lane
Tomas Vondra writes: > OK. Attached is a patch ditching the alignment in serialized data. I've > ditched the macros to access parts of serialized data, and everything > gets copied. I lack energy to actually read this patch right now, and I don't currently have an opinion about whether it's

Re: Cost and execution plan

2019-06-26 Thread Tom Lane
AminPG Jaffer writes: > We are facing an issue where the cost shows up "cost=100.00" so > trying to find where that is set. That means you've turned off enable_seqscan (or one of its siblings) but the planner is choosing a seqscan plan (or other plan type you tried to disable) anyway

Cost and execution plan

2019-06-26 Thread AminPG Jaffer
Hi We are facing an issue where the cost shows up "cost=100.00" so trying to find where that is set. Could anyone point me to the code where the cost "cost=100.00" is set? It doesn't show up when searching through find. find . -type f -print | xargs grep 100 | grep -v

Re: GiST "choose subtree" support function to inline penalty

2019-06-26 Thread Tom Lane
=?UTF-8?Q?Darafei_=22Kom=D1=8Fpa=22_Praliaskouski?= writes: > I'm looking at PostGIS geometry GiST index build times and try to optimize > withing the current GiST framework. The function that shows a lot on my > flame graphs is penalty. > I spent weekend rewriting PostGIS penalty to be as fast

Re: Problem with default partition pruning

2019-06-26 Thread yuzuko
Hello, On Tue, Jun 25, 2019 at 1:45 PM yuzuko wrote: > > Hello Shawn, Alvaro, > > Thank you for testing patches and comments. > Yes, there are two patches: > (1) v4_default_partition_pruning.patch fixes problems with default > partition pruning > and (2)

Re: subscriptionCheck failures on nightjar

2019-06-26 Thread Tom Lane
Andres Freund writes: > On 2019-02-14 09:52:33 +1300, Thomas Munro wrote: >> Just to make sure I understand: it's OK for the file not to be there >> when we try to fsync it by name, because a concurrent checkpoint can >> remove it, having determined that we don't need it anymore? In other >>

RE: Speed up transaction completion faster after many relations are accessed in a transaction

2019-06-26 Thread Tsunakawa, Takayuki
From: David Rowley [mailto:david.row...@2ndquadrant.com] v5 is attached. Thank you, looks good. I find it ready for committer (I noticed the status is already set so.) Regards Takayuki Tsunakawa

Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

2019-06-26 Thread Stephen Frost
Greetings, * Daniel Gustafsson (dan...@yesql.se) wrote: > > On 27 Jun 2019, at 00:48, Andrew Gierth wrote: > > > Tom> In general, the point I'm trying to make is that our policy should > > Tom> be "Ties are broken arbitrarily, and if you don't like the choice > > Tom> that initdb makes, here's

Re: Useless configure checks for RAND_OpenSSL (HAVE_RAND_OPENSSL)

2019-06-26 Thread Michael Paquier
On Wed, Jun 26, 2019 at 04:35:43PM +0200, Daniel Gustafsson wrote: > None, LGTM. Thanks, committed. -- Michael signature.asc Description: PGP signature

Re: JOIN_SEMI planning question

2019-06-26 Thread Tom Lane
Thomas Munro writes: > While looking at bug #15857[1], I wondered why the following two > queries get different plans, given the schema and data from the bug > report: > ... > Here's my question: how could it ever be OK to sort/unique something > and put it in a hash table, but not OK to put

Re: Speed up transaction completion faster after many relations are accessed in a transaction

2019-06-26 Thread David Rowley
On Mon, 17 Jun 2019 at 15:05, Tsunakawa, Takayuki wrote: > (1) > +#define LOCKMETHODLOCALHASH_SHRINK_SIZE 64 > > How about LOCKMETHODLOCALHASH_SHRINK_THRESHOLD, because this determines the > threshold value to trigger shrinkage? Code in PostgreSQL seems to use the > term threshold. That's

Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

2019-06-26 Thread Daniel Gustafsson
> On 27 Jun 2019, at 00:48, Andrew Gierth wrote: > Tom> In general, the point I'm trying to make is that our policy should > Tom> be "Ties are broken arbitrarily, and if you don't like the choice > Tom> that initdb makes, here's how to fix it". > > Yes, you've repeated that point at some

Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

2019-06-26 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> No zone1970.tab. zone.tab is an adequate substitute - a fact which I thought was sufficiently obvious as to not be worth mentioning. (also see https://reviews.freebsd.org/D20646 ) Tom> I do not think we can rely on that file being there, since zic Tom>

Re: mcvstats serialization code is still shy of a load

2019-06-26 Thread Tomas Vondra
On Wed, Jun 26, 2019 at 12:31:13PM -0400, Tom Lane wrote: Tomas Vondra writes: On Wed, Jun 26, 2019 at 11:26:21AM -0400, Tom Lane wrote: #define SizeOfMCVList(ndims,nitems) \ is both woefully underdocumented and completely at variance with reality. It doesn't seem to be accounting for

Re: [PATCH] src/test/modules/dummy_index -- way to test reloptions from inside of access method

2019-06-26 Thread Dent John
Hi Nikolay, > On 3 Apr 2019, at 20:54, Nikolay Shaplov wrote: > > В письме от вторник, 19 марта 2019 г. 16:09:13 MSK пользователь Michael > Paquier написал: > >> Thanks for doing the effort to split that stuff. This looks like an >> interesting base template for anybody willing to look after

RE: psql - add SHOW_ALL_RESULTS option

2019-06-26 Thread Fabien COELHO
Here is a v3 which fixes \errverbose, hopefully. V5 is a rebase and an slightly improved documentation. It was really v4. v5 is a rebase. -- Fabien.diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index c6c20de243..a7557af0fe 100644 ---

Re: Improve handling of pg_stat_statements handling of bind "IN" variables

2019-06-26 Thread Tom Lane
Greg Stark writes: > Actually thinking about this for two more seconds the question is what it > would do with a query like > WHERE col = ANY '1,2,3'::integer[] > Or > WHERE col = ANY ARRAY[1,2,3] > Whichever the language binding that is failing to do parameterized queries > is doing to emulate

Re: dropdb --force

2019-06-26 Thread Pavel Stehule
Hi po 24. 6. 2019 v 10:28 odesílatel Anthony Nowocien napsal: > Hi, > patch no longer applies (as of 12beta2). > > postgres@ubuntudev:~/pg_testing/source/postgresql-12beta2$ patch -p1 < > drop-database-force-20190310_01.patch > patching file doc/src/sgml/ref/drop_database.sgml > patching file

Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

2019-06-26 Thread Tom Lane
Further on this --- I now remember that the reason we used to want to reject the "Factory" timezone is that it used to report this as the zone abbreviation: Local time zone must be set--see zic manual page which (a) resulted in syntactically invalid timestamp output from the timeofday()

Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

2019-06-26 Thread Tom Lane
Andrew Gierth writes: > "Thomas" == Thomas Munro writes: > Thomas> Right. On a FreeBSD system here in New Zealand you get "NZ" > Thomas> with default configure options (ie using PostgreSQL's tzdata). > Thomas> But if you build with --with-system-tzdata=/usr/share/zoneinfo > Thomas> you get

Re: mcvstats serialization code is still shy of a load

2019-06-26 Thread Tom Lane
Tomas Vondra writes: > On Wed, Jun 26, 2019 at 11:26:21AM -0400, Tom Lane wrote: >> #define SizeOfMCVList(ndims,nitems) \ >> is both woefully underdocumented and completely at variance with >> reality. It doesn't seem to be accounting for the actual data values. > I agree about the macro being

Re: mcvstats serialization code is still shy of a load

2019-06-26 Thread Tomas Vondra
On Wed, Jun 26, 2019 at 11:26:21AM -0400, Tom Lane wrote: Tomas Vondra writes: Attached is a patch that should (hopefully) fix this. It essentially treats the item as (char *) and does all pointer arithmetics without any additional casts. So there are no intermediate casts. This passes the

Re: Index Skip Scan - attempting to evalutate patch

2019-06-26 Thread pguser
‐‐‐ Original Message ‐‐‐ On Wednesday, June 26, 2019 4:07 PM, Tomas Vondra wrote: > That might be dangerous, if there may be differences in contents of > catalogs. I don't think the patch does that though, and for me it works > just fine. I can initdb database using current master,

Re: mcvstats serialization code is still shy of a load

2019-06-26 Thread Tom Lane
Tomas Vondra writes: > Attached is a patch that should (hopefully) fix this. It essentially > treats the item as (char *) and does all pointer arithmetics without any > additional casts. So there are no intermediate casts. This passes the eyeball test, and it also allows my OpenBSD/hppa

Re: Index Skip Scan - attempting to evalutate patch

2019-06-26 Thread Tomas Vondra
On Wed, Jun 26, 2019 at 02:12:55PM +, pguser wrote: ‐‐‐ Original Message ‐‐‐ On Wednesday, June 26, 2019 2:55 PM, pguser wrote: ‐‐‐ Original Message ‐‐‐ On Wednesday, June 26, 2019 1:07 PM, Dmitry Dolgov 9erthali...@gmail.com wrote: > > On Wed, Jun 26, 2019 at 1:53 PM

Re: Useless configure checks for RAND_OpenSSL (HAVE_RAND_OPENSSL)

2019-06-26 Thread Tom Lane
Michael Paquier writes: > We have been using RAND_OpenSSL(), a function new as of OpenSSL 1.1.0 > in pgcrypto until fe0a0b5 which has removed the last traces of the > function in the tree. We still have a configure check for it and the > related compilation flag in pg_config.h.in, and both are

Re: Useless configure checks for RAND_OpenSSL (HAVE_RAND_OPENSSL)

2019-06-26 Thread Daniel Gustafsson
> On 26 Jun 2019, at 16:25, Michael Paquier wrote: > Any objections to the cleanup done in the attached patch? None, LGTM. cheers ./daniel

Useless configure checks for RAND_OpenSSL (HAVE_RAND_OPENSSL)

2019-06-26 Thread Michael Paquier
Hi all, We have been using RAND_OpenSSL(), a function new as of OpenSSL 1.1.0 in pgcrypto until fe0a0b5 which has removed the last traces of the function in the tree. We still have a configure check for it and the related compilation flag in pg_config.h.in, and both are now useless. Any

Re: Index Skip Scan - attempting to evalutate patch

2019-06-26 Thread pguser
‐‐‐ Original Message ‐‐‐ On Wednesday, June 26, 2019 2:55 PM, pguser wrote: > ‐‐‐ Original Message ‐‐‐ > On Wednesday, June 26, 2019 1:07 PM, Dmitry Dolgov 9erthali...@gmail.com > wrote: > > > > On Wed, Jun 26, 2019 at 1:53 PM pguser pgu...@diorite.uk wrote: > > > If I apply

Re: Index Skip Scan - attempting to evalutate patch

2019-06-26 Thread pguser
‐‐‐ Original Message ‐‐‐ On Wednesday, June 26, 2019 1:07 PM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On Wed, Jun 26, 2019 at 1:53 PM pguser pgu...@diorite.uk wrote: > > If I apply the latest patch (which says 1 of 2? - maybe I'm missing a part > > of the patch?), I apply

Re: mcvstats serialization code is still shy of a load

2019-06-26 Thread Tomas Vondra
On Wed, Jun 26, 2019 at 09:49:46AM +0200, Tomas Vondra wrote: On Tue, Jun 25, 2019 at 11:52:28PM -0400, Tom Lane wrote: I'm seeing a reproducible bus error here: #0 0x00417420 in statext_mcv_serialize (mcvlist=0x62223450, stats=Variable "stats" is not available. ) at mcv.c:785 785

Re: mcvstats serialization code is still shy of a load

2019-06-26 Thread Tom Lane
Tomas Vondra writes: > On Tue, Jun 25, 2019 at 11:52:28PM -0400, Tom Lane wrote: >> You can *not* cast something to an aligned pointer type if it's not >> actually certain to be aligned suitably for that type. > OK. So the solution is to ditch the casts altogether, and then do plain > pointer

Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3

2019-06-26 Thread Peter Eisentraut
On 2019-06-25 15:39, Robert Haas wrote: > On Tue, Jun 25, 2019 at 8:28 AM Peter Eisentraut > wrote: >> How are the requirements here different from ssl_passphrase_command? >> Why do we need a new mechanism? > > I don't think that the requirements are different, and I don't think > we need a new

Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

2019-06-26 Thread Andrew Gierth
> "Thomas" == Thomas Munro writes: >> Pacific/Auckland -> NZ Thomas> Right. On a FreeBSD system here in New Zealand you get "NZ" Thomas> with default configure options (ie using PostgreSQL's tzdata). Thomas> But if you build with --with-system-tzdata=/usr/share/zoneinfo Thomas> you get

Re: MSVC Build support with visual studio 2019

2019-06-26 Thread Haribabu Kommi
On Wed, 5 Jun 2019 at 17:22, Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: > > On Wed, May 29, 2019 at 10:30 AM Haribabu Kommi > wrote: > >> >> Updated patches are attached. >> >> > All patches apply, build and pass tests. The patch >

Re: Index Skip Scan - attempting to evalutate patch

2019-06-26 Thread Dmitry Dolgov
> On Wed, Jun 26, 2019 at 1:53 PM pguser wrote: > > If I apply the latest patch (which says 1 of 2? - maybe I'm missing a part of > the patch?), I apply with Hi, First of all, thanks for evaluation! > psql (12beta2) > Type "help" for help. > > db1=> show enable_indexskipscan; >

Index Skip Scan - attempting to evalutate patch

2019-06-26 Thread pguser
Hello This is my first posting to hackers so sorry if I'm taking up valuable time. I'm currently migrating a packaged application which supported oracle and sql server to PostgreSQL. Something that I've identified as hurting the performance a lot is loose index scanning. I don't have access

GSoD Introductory Tutorial

2019-06-26 Thread Elif Ak
Dear GSoD PostgreSQL Organization Administrators, I am a PhD Student in Istanbul Technical University, Computer Engineering. Before the being full-time researcher in the laboratory, I was full-stack software developer. Therefore, I am strongly familiar the SQL queries. Also, specially, I used

Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

2019-06-26 Thread Thomas Munro
On Wed, Jun 26, 2019 at 6:32 PM Andrew Gierth wrote: > Pacific/Auckland -> NZ Right. On a FreeBSD system here in New Zealand you get "NZ" with default configure options (ie using PostgreSQL's tzdata). But if you build with --with-system-tzdata=/usr/share/zoneinfo you get "Pacific/Auckland",

Re: [PATCH] Speedup truncates of relation forks

2019-06-26 Thread Adrien Nayrat
On 6/12/19 10:29 AM, Jamison, Kirk wrote: > >> From a user POW, the main issue with relation truncation is that it can block >> queries on standby server during truncation replay. >> >> It could be interesting if you can test this case and give results of your >> path. >> Maybe by performing read

[patch]socket_timeout in interfaces/libpq

2019-06-26 Thread nagaura.ryo...@fujitsu.com
Hello all. First, I'd like to appreciate with all your reviewing and discussion in the last CommitFest[1]. I don't think that the rest one of my proposals has been rejected completely, so I want to restart discussion. It is a timeout parameter in interfaces/libpq. Consider some situations

inheritance of connection paramters when using \c

2019-06-26 Thread nagaura.ryo...@fujitsu.com
Hello! \c is followed by [-reuse-previous=on/off] positional syntax | conninfo Using \c -reuse-previous=on positional syntax or \c positional syntax without -reuse-previous option, some parameters which were omitted or notated as "-" will be reused in the new connection. The target is only

Re: mcvstats serialization code is still shy of a load

2019-06-26 Thread Tomas Vondra
On Tue, Jun 25, 2019 at 11:52:28PM -0400, Tom Lane wrote: I'm seeing a reproducible bus error here: #0 0x00417420 in statext_mcv_serialize (mcvlist=0x62223450, stats=Variable "stats" is not available. ) at mcv.c:785 785 memcpy(ITEM_BASE_FREQUENCY(item, ndims),

Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

2019-06-26 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> TBH, I find this borderline insane: it's taking a problem we did Tom> not have and moving the goalposts to the next county. Not just any Tom> old county, either, but one where there's a shooting war going on. Tom> As soon as you do something like putting

RE: Global shared meta cache

2019-06-26 Thread Ideriha, Takeshi
Hi, everyone. >From: Ideriha, Takeshi [mailto:ideriha.take...@jp.fujitsu.com] >My current thoughts: >- Each catcache has (maybe partial) HeapTupleHeader >- put every catcache on shared memory and no local catcache >- but catcache for aborted tuple is not put on shared memory >- Hash table exists