Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2018-10-01 Thread Michael Paquier
On Wed, Sep 12, 2018 at 06:12:29PM +0300, Marina Polyakova wrote: > The discussion about this has become entangled from the beginning, because > as I wrote in [1] at first I misread your original proposal... The last emails are about the last reviews of Fabien, which has remained unanswered for

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2018-10-01 Thread Michael Paquier
On Wed, Jun 06, 2018 at 07:03:47PM +0530, Amit Kapila wrote: > I think Robert's chash stuff [1] might be helpful to reduce the contention > you are seeing. Latest patch available does not apply, so I moved it to next CF. The thread has died a bit as well... -- Michael signature.asc

Re: Query is over 2x slower with jit=on

2018-10-01 Thread Lukas Fittl
On Tue, Sep 25, 2018 at 1:17 PM, Andres Freund wrote: > > I've pushed the change without that bit - it's just a few additional > lines if we want to change that. > It seems that since this commit, JIT statistics are now only being printed for parallel query plans. This is due to ExplainPrintJIT

Re: libpq compression

2018-10-01 Thread Michael Paquier
On Mon, Aug 20, 2018 at 06:00:39PM +0300, Konstantin Knizhnik wrote: > New version of the patch is attached: I removed -Z options form pgbench and > psql and add checking that server and client are implementing the same > compression algorithm. The patch had no reviews, and does not apply

Re: Hash Joins vs. Bloom Filters / take 2

2018-10-01 Thread Michael Paquier
On Thu, Mar 01, 2018 at 07:04:41PM -0500, David Steele wrote: > After reviewing the thread I also agree that this should be pushed to > 2018-09, so I have done so. > > I'm very excited by this patch, though. In general I agree with Peter that > a higher rate of false positives is acceptable to

Re: [HACKERS] SERIALIZABLE with parallel query

2018-10-01 Thread Michael Paquier
On Wed, Sep 19, 2018 at 04:50:40PM -0500, Kevin Grittner wrote: > I will spend a few more days in testing and review, but figured I > should pass along "first impressions" now. Kevin, it seems that this patch is pending on your input. I have moved this patch to next CF for now. -- Michael

Re: partition tree inspection functions

2018-10-01 Thread Amit Langote
On 2018/10/01 15:27, Michael Paquier wrote: > On Mon, Oct 01, 2018 at 03:16:32PM +0900, Amit Langote wrote: >> I wasn't able to respond to some of issues that Jesper brought up with the >> approach taken by the latest patch whereby there is no separate >> pg_partition_level function. He said that

Re: hostorder and failover_timeout for libpq

2018-10-01 Thread Michael Paquier
On Wed, Sep 19, 2018 at 02:26:53PM +0200, Ildar Musin wrote: > Another approach would be to leave `pg_conn->connhost` as it is now (i.e. > not to create global addresses array) and just apply random permutations to > it if `hostorder=random` is specified. And probably apply permutations to >

Re: Relations being opened without any lock whatever

2018-10-01 Thread Amit Langote
On 2018/10/01 4:20, Tom Lane wrote: > Running the regression tests with the patch I showed in > https://www.postgresql.org/message-id/16565.1538327...@sss.pgh.pa.us > exposes two places where HEAD is opening relations without having > any lock at all on them: Maybe you've noticed but the

[PROPOSAL]a new data type 'bytea' for ECPG

2018-10-01 Thread Matsumura, Ryo
Hi, Hackers # This is my first post. I will try to implement a new data type 'bytea' for ECPG. I think that the implementation is not complicated. Does anyone need it ? * Why do I need bytea ? Currently, ECPG program can treat binary data for bytea column with 'char' type of C language, but

Re: [PROPOSAL] Shared Ispell dictionaries

2018-10-01 Thread Arthur Zakirov
On Thu, Jun 14, 2018 at 11:40:17AM +0300, Arthur Zakirov wrote: > I attached new version of the patch. The patch still applies to HEAD. I moved it to the next commitfest. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: partition tree inspection functions

2018-10-01 Thread Michael Paquier
On Thu, Aug 09, 2018 at 01:05:56PM +0900, Amit Langote wrote: > Attached updated patch. So, except if I am missing something, what we have here is a patch which has been debatted quite a bit and has semantics which look nice. Any objections if we move forward with this patch? +-- all tables in

Re: libpq should append auth failures, not overwrite

2018-10-01 Thread Michael Paquier
On Tue, Aug 14, 2018 at 02:17:09PM +0200, Fabien COELHO wrote: > I think that people would survive having the ip spelled out on localhost > errors when there are several ips associated to the name. > > You could also create an exception for "localhost" if you see it as a large > problem, but if

Re: executor relation handling

2018-10-01 Thread Amit Langote
On 2018/09/30 5:04, Tom Lane wrote: > David Rowley writes: >> I've attached v10 which fixes this and aligns the WARNING text in >> ExecInitRangeTable() and addRangeTableEntryForRelation(). > > I started poking at this. Thanks a lot for looking at this. > I thought that it would be a good

Re: pgbench - add pseudo-random permutation function

2018-10-01 Thread Michael Paquier
On Wed, Sep 26, 2018 at 01:20:49PM +0200, Fabien COELHO wrote: > So, am I right to deducing that you are satisfied with the current status of > the patch, with the nbits implementation either based on popcount (v4) or > clz (v5) compiler intrinsics? I think that the clz option is better. Fabien,

Re: Sample values for pg_stat_statements

2018-10-01 Thread Michael Paquier
On Tue, Apr 17, 2018 at 05:58:44PM +0200, Vik Fearing wrote: > I think I handle that well enough with permission checking, but I'm open > to more debate on it. The recent version bump in pg_stat_statements (Sorry my fault!) is causing this patch to not apply anymore. I have moved it to next CF

Re: partition tree inspection functions

2018-10-01 Thread Michael Paquier
On Mon, Oct 01, 2018 at 03:16:32PM +0900, Amit Langote wrote: > I wasn't able to respond to some of issues that Jesper brought up with the > approach taken by the latest patch whereby there is no separate > pg_partition_level function. He said that such a function would be useful > to get the

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

2018-10-01 Thread Michael Paquier
On Fri, Mar 23, 2018 at 02:18:09PM +0100, Daniel Verite wrote: > There's a batch mode for pgbench in a patch posted in [1], > with \beginbatch and \endbatch commands, but nothing > for psql AFAICS. > psql is more complicated because currently it uses a > blocking PQexec() call at its core. Craig

Re: Adding a note to protocol.sgml regarding CopyData

2018-10-01 Thread Michael Paquier
On Fri, Sep 28, 2018 at 08:16:46PM +0200, Peter Eisentraut wrote: > Yeah, I don't see why we need to document it three times in the same > chapter. > > Also, that chapter is specifically about version 3.0 of the protocol, so > documenting version 2.0 is out of scope. This has been marked as

Re: Multiple primary key on partition table?

2018-10-01 Thread Rajkumar Raghuwanshi
On Tue, Sep 18, 2018 at 11:20 AM amul sul wrote: > On Mon, Sep 17, 2018 at 9:06 PM amul sul wrote: > > > > Nice catch Rajkumar. > > > > In index_check_primary_key(), relationHasPrimaryKey() called only for > the an > > alter command but I think we need to call in this case as well, like > this:

Re: partition tree inspection functions

2018-10-01 Thread Amit Langote
Hi, On 2018/10/01 15:03, Michael Paquier wrote: > On Thu, Aug 09, 2018 at 01:05:56PM +0900, Amit Langote wrote: >> Attached updated patch. > > So, except if I am missing something, what we have here is a patch which > has been debatted quite a bit and has semantics which look nice. Thanks. >

Re: Odd 9.4, 9.3 buildfarm failure on s390x

2018-10-01 Thread Mark Wong
On Sun, Sep 30, 2018 at 12:38:46AM +0100, Andrew Gierth wrote: > > "Andrew" == Andrew Dunstan writes: > > >> What is the size of a C "int" on this platform? > > Andrew> 4. > > Hmm. > > Because int being more than 32 bits is the simplest explanation for this > difference. > > How about

Re: Odd 9.4, 9.3 buildfarm failure on s390x

2018-10-01 Thread Tom Lane
Mark Wong writes: > a | a > | uuid_cmp > --+--+- > ---- | ---- > |

Re: Odd 9.4, 9.3 buildfarm failure on s390x

2018-10-01 Thread Andres Freund
On 2018-10-01 12:13:57 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-10-01 11:58:51 -0400, Tom Lane wrote: > >> Oooh ... apparently, on that platform, memcmp() is willing to produce > >> INT_MIN in some cases. That's not a safe value for a sort comparator > >> to produce --- we

Re: Add SKIP LOCKED to VACUUM and ANALYZE

2018-10-01 Thread Bossart, Nathan
On 9/27/18, 2:52 AM, "Michael Paquier" wrote: > Thanks for the new patches. So I have begun looking at the full set, > beginning by 0001 which introduces a new common routine to get the > elevel associated to a skipped relation. I have been chewing on this > one, and I think that the patch

Re: pg_ls_tmpdir(); AND, Function for listing archive_status directory

2018-10-01 Thread Justin Pryzby
On Wed, Sep 26, 2018 at 10:36:03PM +0200, Laurenz Albe wrote: > Bossart, Nathan wrote: > > Attached is a patch to add a pg_ls_tmpdir() function that lists the > > contents of a specified tablespace's pgsql_tmp directory. This is > > very similar to the existing pg_ls_logdir() and pg_ls_waldir() >

Re: Proposal for Signal Detection Refactoring

2018-10-01 Thread Chris Travers
Moving this to documentation due to a general consensus that abstracting this is not necessarily worth it. If we don't want to refactor and abstract this, it is worth documenting the design as to how things work now so that others who face bugs can consult docs instead of trying to determine

Re: Odd 9.4, 9.3 buildfarm failure on s390x

2018-10-01 Thread Andres Freund
On 2018-10-01 11:58:51 -0400, Tom Lane wrote: > Mark Wong writes: > > a | a > > | uuid_cmp > > --+--+- > >

Re: Odd 9.4, 9.3 buildfarm failure on s390x

2018-10-01 Thread Tom Lane
Andres Freund writes: > On 2018-10-01 11:58:51 -0400, Tom Lane wrote: >> Oooh ... apparently, on that platform, memcmp() is willing to produce >> INT_MIN in some cases. That's not a safe value for a sort comparator >> to produce --- we explicitly say that somewhere, IIRC. > Hm, that'd be pretty

Re: pg_ls_tmpdir()

2018-10-01 Thread Andres Freund
Hi, On 2018-09-26 22:36:03 +0200, Laurenz Albe wrote: > 2. There already are functions "pg_ls_logdir" and "pg_ls_waldir", >and I can imagine new requests, e.g. pg_ls_datafiles() to list the >data files in a database directory. > >It may make sense to have a generic function like > >

Re: buildfarm and git pull

2018-10-01 Thread Justin Pryzby
On Thu, Sep 27, 2018 at 06:32:59PM +0300, Alexander Kuzmenkov wrote: > It just has to checkout the remote branch as-is. It doesn't clean files, but I would suggest: git checkout -B branch remote/branch Justin

Re: automatic restore point

2018-10-01 Thread Alvaro Herrera
On 2018-Oct-01, Peter Eisentraut wrote: > The following appears to work: > > CREATE FUNCTION evt_automatic_restart_point() RETURNS event_trigger > LANGUAGE plpgsql > AS $$ > BEGIN > PERFORM pg_create_restore_point(tg_tag); > END > $$; > > CREATE EVENT TRIGGER automatic_restart_point ON

Re: has_column_privilege behavior (was Re: Assert failed in snprintf.c)

2018-10-01 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Having said that, I'm fine with having it return NULL if the given >> attname matches an attisdropped column. > Ok, that's really all I was asking about. Ah, we were just talking past each other then :-(. That behavior existed

Re: SerializeParamList vs machines with strict alignment

2018-10-01 Thread Tom Lane
Thomas Munro writes: > On Tue, Oct 2, 2018 at 9:49 AM Tom Lane wrote: >> Apparently the only somewhat-modern architecture that is resolutely >> unaligned-unfriendly is MIPS. > It's been a few years now since I worked on that architecture, but > Sparc is somewhat-modern and resolutely

Re: Add SKIP LOCKED to VACUUM and ANALYZE

2018-10-01 Thread Michael Paquier
On Mon, Oct 01, 2018 at 03:37:01PM +, Bossart, Nathan wrote: > Good idea. This patch looks good to me. Thanks, I have pushed this one now. > Without the find_all_inheritors() stuff, I think we would just need to > modify the ANALYZE documentation patch to say something like > >

Re: snprintf.c hammering memset()

2018-10-01 Thread Andres Freund
Hi, On 2018-10-01 17:46:55 -0700, Andres Freund wrote: > On 2018-10-01 20:19:16 -0400, Tom Lane wrote: > > argtypes is only a small part of the stack-space issue, there's also > > argvalues which is (at least) twice as big. I don't think second-guessing > > the compiler about the most efficient

Re: TupleTableSlot abstraction

2018-10-01 Thread Kyotaro HORIGUCHI
At Tue, 25 Sep 2018 16:45:09 -0700, Andres Freund wrote in <20180925234509.3hrrf6tmvy5tf...@alap3.anarazel.de> > Hi, > > On 2018-09-04 18:35:34 +0530, Amit Khandekar wrote: > > Subject: [PATCH 05/14] Use tts_flags instead of previous bool members > > > > Pack the boolean members in

Re: Vacuum: allow usage of more than 1GB of work mem

2018-10-01 Thread Michael Paquier
On Mon, Jul 16, 2018 at 02:33:17PM -0400, Andrew Dunstan wrote: > Ah, ok. Thanks. ignore the email I just sent about that. So... This thread has basically died of inactivity, while there have been a couple of interesting things discussed, like the version from Heikki here:

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

2018-10-01 Thread Michael Paquier
On Mon, Jul 02, 2018 at 09:37:31AM +1200, David Rowley wrote: > Now that the September 'fest is open for new patches I'm going to move > this patch over there. This patch has become slightly less important > than some other stuff, but I'd still like to come back to it. Please note that the

Re: POC: GROUP BY optimization

2018-10-01 Thread Michael Paquier
On Sat, Jun 30, 2018 at 09:19:13AM +1200, Gavin Flower wrote: > Additionally put an upper limit threshold on the number of combinations to > check, fairly large by default? > > If first threshold is exceeded, could consider checking out a few more > selected at random from paths not yet checked,

Re: WIP: BRIN multi-range indexes

2018-10-01 Thread Michael Paquier
Hi Tomas, On Mon, Jun 25, 2018 at 02:14:20AM +0200, Tomas Vondra wrote: > OK, here is a version tweaked to use floor()/ceil() instead of round(). > Let's see if the Windows machine likes that more. The latest patch set does not apply cleanly. Could you rebase it? I have moved the patch to CF

Re: snprintf.c hammering memset()

2018-10-01 Thread Tom Lane
Andres Freund writes: > On 2018-10-01 19:52:40 -0400, Tom Lane wrote: >> Ouch indeed. Quite aside from cycles wasted, that's way more stack than >> we want this to consume. I'm good with forcing this to 16 or so ... >> any objections? > Especially after your performance patch, shouldn't we

Re: snprintf.c hammering memset()

2018-10-01 Thread Tom Lane
Andres Freund writes: > On 2018-10-01 20:19:16 -0400, Tom Lane wrote: >> That patch takes the memset out of the main line, but it'd still be >> a performance problem for formats using argument reordering; and the >> stack-space concern would remain the same. > What I mean is that it shouldn't be

Re: patch to allow disable of WAL recycling

2018-10-01 Thread Michael Paquier
On Thu, Sep 13, 2018 at 02:56:42PM -0600, Jerry Jelinek wrote: > I'll take a look at that. I had been trying to keep the patch as minimal as > possible, but I'm happy to work through this. (Please be careful with top-posting) Jerry, the last status was from three weeks ago with the patch waiting

Re: speeding up planning with partitions

2018-10-01 Thread Amit Langote
On 2018/10/02 10:20, Michael Paquier wrote: > On Sat, Sep 29, 2018 at 07:00:02PM +0530, Dilip Kumar wrote: >> I think we can delay allocating memory for rel->part_rels? And we can >> allocate in add_rel_partitions_to_query only >> for those partitions which survive pruning. > > This last review

Re: [HACKERS] Re: Improve OR conditions on joined columns (common star schema problem)

2018-10-01 Thread Tom Lane
Michael Paquier writes: > On Mon, Sep 03, 2018 at 06:59:10PM -0700, Noah Misch wrote: >> If you're going to keep this highly-simplified estimate, please expand the >> comment to say why it doesn't matter or what makes it hard to do better. The >> non-planunionor.c path for the same query

Re: [PATCH v18] GSSAPI encryption support

2018-10-01 Thread Michael Paquier
On Mon, Aug 06, 2018 at 05:23:28PM -0400, Robbie Harwood wrote: > If you're in a position where you're using Kerberos (or most other > things from the GSSAPI) for authentication, the encryption comes at > little to no additional setup cost. And then you get all the security > benefits outlined in

Re: jsonpath

2018-10-01 Thread Michael Paquier
On Sat, Sep 08, 2018 at 02:21:27AM +0300, Nikita Glukhov wrote: > Attached 18th version of the patches rebased onto the current master. Nikita, this version fails to apply, as 0004 has conflicts with some regression tests. Could you rebase? I am moving the patch to CF 2018-11, waiting for your

snprintf.c hammering memset()

2018-10-01 Thread Thomas Munro
Hello hackers, Mateusz Guzik was benchmarking PostgreSQL on FreeBSD investigating the kqueue thread and complained off-list about a lot of calls to memset() of size 256KB from dopr() in our snprintf.c code. Yeah, that says: PrintfArgType argtypes[NL_ARGMAX + 2]; ... MemSet(argtypes, 0,

Re: snprintf.c hammering memset()

2018-10-01 Thread Andres Freund
Hi, On 2018-10-01 19:52:40 -0400, Tom Lane wrote: > Thomas Munro writes: > > Mateusz Guzik was benchmarking PostgreSQL on FreeBSD investigating the > > kqueue thread and complained off-list about a lot of calls to memset() > > of size 256KB from dopr() in our snprintf.c code. > > > Yeah, that

Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru

2018-10-01 Thread Michael Paquier
On Fri, Sep 28, 2018 at 01:53:14PM +0900, Masahiko Sawada wrote: > I agree. Can we fix this simply by the attached patch? Thanks for sending a patch. +/* autovacuum cannot be anti-wraparound and not aggressive vacuum */ +Assert(aggressive); +msgfmt = _("automatic aggressive vacuum to

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2018-10-01 Thread Michael Paquier
On Mon, Oct 01, 2018 at 02:37:42PM +0200, Daniel Gustafsson wrote: >> On 1 Oct 2018, at 01:19, Michael Paquier wrote: >> Looking at the refactoring patch 0001, wouldn't signalfuncs.c make a >> better name for the new file? There are already multiple examples of >> this type, like logicalfuncs.c,

Re: [HACKERS] Re: Improve OR conditions on joined columns (common star schema problem)

2018-10-01 Thread Michael Paquier
On Mon, Sep 03, 2018 at 06:59:10PM -0700, Noah Misch wrote: > If you're going to keep this highly-simplified estimate, please expand the > comment to say why it doesn't matter or what makes it hard to do better. The > non-planunionor.c path for the same query computes its own estimate of the >

Re: SerializeParamList vs machines with strict alignment

2018-10-01 Thread Amit Kapila
On Tue, Oct 2, 2018 at 5:31 AM Tom Lane wrote: > > Thomas Munro writes: > > On Tue, Oct 2, 2018 at 9:49 AM Tom Lane wrote: > >> Apparently the only somewhat-modern architecture that is resolutely > >> unaligned-unfriendly is MIPS. > > > It's been a few years now since I worked on that

Re: SerializeParamList vs machines with strict alignment

2018-10-01 Thread Tom Lane
Amit Kapila writes: > I think if we do Analyze on the table after populating rows, it should > use just one worker and that should be sufficient to hit the case > being discussed. I would like to change the test so that it uses just > one worker. I thought that adding an ANALYZE would make the

Re: Push down Aggregates below joins

2018-10-01 Thread Michael Paquier
On Fri, Aug 03, 2018 at 04:50:11PM +0200, Antonin Houska wrote: > Antonin Houska wrote: > > > I didn't have enough time to separate "your functionality" and can do it > > when > > I'm back from vacation. > > So I've separated the code that does not use the 2-stage replication (and > therefore

Re: Subplan result caching

2018-10-01 Thread Michael Paquier
On Mon, Jul 09, 2018 at 09:08:07PM +1200, David Rowley wrote: > I'll mark as waiting on author in the meantime. > > It's great to see someone working on this. Not that actively unfortunately. The patch status has remained unchanged since, so I am marking it as returned with feedback. -- Michael

Re: Odd 9.4, 9.3 buildfarm failure on s390x

2018-10-01 Thread Thomas Munro
On Tue, Oct 2, 2018 at 10:55 AM Andrew Dunstan wrote: > On 10/01/2018 12:50 PM, Tom Lane wrote: > > Andres Freund writes: > >> On 2018-10-01 12:13:57 -0400, Tom Lane wrote: > >>> Yeah. So our choices are > >>> > >>> (1) Retain the current restriction on what sort comparators can > >>> produce.

Re: SerializeParamList vs machines with strict alignment

2018-10-01 Thread Lou Picciano
Wow, Tom. This is great stuff. Thanks for it. Lou Picciano > On Sep 9, 2018, at 11:27 PM, Tom Lane wrote: > > I wondered why buildfarm member chipmunk has been failing hard > for the last little while. Fortunately, it's supplying us with > a handy backtrace: > > Program terminated with

Re: SerializeParamList vs machines with strict alignment

2018-10-01 Thread Thomas Munro
On Tue, Oct 2, 2018 at 9:49 AM Tom Lane wrote: > Apparently the only somewhat-modern architecture that is resolutely > unaligned-unfriendly is MIPS. It's been a few years now since I worked on that architecture, but Sparc is somewhat-modern and resolutely unaligned-unfriendly. It's just that

Re: snprintf.c hammering memset()

2018-10-01 Thread Tom Lane
Thomas Munro writes: > Mateusz Guzik was benchmarking PostgreSQL on FreeBSD investigating the > kqueue thread and complained off-list about a lot of calls to memset() > of size 256KB from dopr() in our snprintf.c code. > Yeah, that says: > PrintfArgType argtypes[NL_ARGMAX + 2]; > ... >

Re: snprintf.c hammering memset()

2018-10-01 Thread Andres Freund
Hi, On 2018-10-01 20:19:16 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-10-01 19:52:40 -0400, Tom Lane wrote: > >> Ouch indeed. Quite aside from cycles wasted, that's way more stack than > >> we want this to consume. I'm good with forcing this to 16 or so ... > >> any objections?

Re: snprintf.c hammering memset()

2018-10-01 Thread Tom Lane
Thomas Munro writes: > PrintfArgType is an enum, and we define NL_ARGMAX as 16 if the OS > didn't already define it. On FreeBSD 11, NL_ARGMAX was defined as 99 > in . On FreeBSD 12, it is defined as 65536... ouch. On a > Debian box I see it is 4096. Some further research: * My Red Hat boxes

Re: GiST VACUUM

2018-10-01 Thread Michael Paquier
On Mon, Aug 06, 2018 at 11:12:00PM +0500, Andrey Borodin wrote: > Done. Added function bms_make_empty(int size) Andrey, your latest patch does not apply. I am moving this to the next CF, waiting for your input. -- Michael signature.asc Description: PGP signature

Re: speeding up planning with partitions

2018-10-01 Thread Michael Paquier
On Sat, Sep 29, 2018 at 07:00:02PM +0530, Dilip Kumar wrote: > I think we can delay allocating memory for rel->part_rels? And we can > allocate in add_rel_partitions_to_query only > for those partitions which survive pruning. This last review set has not been answered, and as it is recent I am

Re: [FEATURE PATCH] pg_stat_statements with plans (v02)

2018-10-01 Thread Michael Paquier
On Fri, Apr 06, 2018 at 03:03:30PM +0200, Julian Markwort wrote: > As I see it, planning duration, first date, and last update date would > be columns added to the pg_stat_statements view, i.e. they are tracked > for each kind of a (jumbled) query -- just as the good and bad plans, > their

Re: pg_dumpall --exclude-database option

2018-10-01 Thread Michael Paquier
On Fri, Aug 03, 2018 at 11:08:57PM +0200, Fabien COELHO wrote: > Patch applies cleanly, compiles, and works for me. Last review has not been addressed, so please note that this has been marked as returned with feedback. -- Michael signature.asc Description: PGP signature

Re: cost_sort() improvements

2018-10-01 Thread Michael Paquier
On Sun, Jul 22, 2018 at 10:22:10PM +0200, Tomas Vondra wrote: > Could you perhaps summarize the reasoning or at least point me to the > relevant parts of the sources, so that I know which parts to focus on? Teodor, this patch is waiting for some input from you. I have moved it to next CF for

Re: WIP Patch: Precalculate stable functions, infrastructure v1

2018-10-01 Thread Michael Paquier
Hi Marina, On Thu, May 24, 2018 at 04:00:33PM +0300, Marina Polyakova wrote: > Here there's a 9-th version of the patches for the precalculation of stable > or immutable functions, stable or immutable operators and other nonvolatile > expressions. This is a try to execute cached expressions as

Re: Subplan result caching

2018-10-01 Thread David Rowley
On 19 July 2018 at 06:27, Robert Haas wrote: > On Mon, Jul 9, 2018 at 5:08 AM, David Rowley >> "LazyMaterialize" seems like a good option for a name. It seems better >> than "LazyHash" since you may not want to restrict it to a hash table >> based cache in the future. A binary search tree may be

Re: TupleTableSlot abstraction

2018-10-01 Thread Tom Lane
Kyotaro HORIGUCHI writes: > At Tue, 25 Sep 2018 16:45:09 -0700, Andres Freund wrote > in <20180925234509.3hrrf6tmvy5tf...@alap3.anarazel.de> >> On 2018-09-04 18:35:34 +0530, Amit Khandekar wrote: >>> Pack the boolean members in TupleTableSlot into a 16 bit tts_flags. >>> This reduces the size

Re: [HACKERS] Small improvement to compactify_tuples

2018-10-01 Thread Michael Paquier
On Mon, Jul 02, 2018 at 05:49:06PM -0400, Andrew Dunstan wrote: > There doesn't seem to have been any progress since this email. Indeed, none. I am marking it as returned with feedback... The patch has rotten quite some time ago as well. -- Michael signature.asc Description: PGP signature

Re: Changing the autovacuum launcher scheduling; oldest table first algorithm

2018-10-01 Thread Michael Paquier
On Thu, Jun 28, 2018 at 04:20:53PM +0900, Masahiko Sawada wrote: > If there is an up-to-date information meaning either that there is no > tables needing vacuum or that there is only table needing vacuum but > being vacuumed by other worker, AV launcher can launches new one to > other database. I

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-10-01 Thread Michael Paquier
On Mon, Jul 23, 2018 at 02:17:38PM +0530, Ashutosh Bapat wrote: > I used perform instead of execute since the later is usually > associated with local operation. I added "foreign" in the name of the > function to indicate that it's executed on foreign server. I am happy > with "remote" as well. I

Re: Hint to set owner for tablespace directory

2018-10-01 Thread Peter Eisentraut
On 24/09/2018 14:50, Peter Eisentraut wrote: > On 11/09/2018 17:10, Peter Eisentraut wrote: >> On 07/09/2018 17:59, Maksim Milyutin wrote: >>> those directories was that user). The error message "could not set >>> permissions on directory ..." disoriented that user. The need to change >>> the

Re: Early WIP/PoC for inlining CTEs

2018-10-01 Thread Andreas Karlsson
On 07/27/2018 10:10 AM, David Fetter wrote: On Fri, Jul 27, 2018 at 02:55:26PM +1200, Thomas Munro wrote: On Thu, Jul 26, 2018 at 7:14 AM, David Fetter wrote: Please find attached the next version, which passes 'make check'. ... but not 'make check-world' (contrib/postgres_fdw's EXPLAIN is

New vacuum option to do only freezing

2018-10-01 Thread Masahiko Sawada
Hi, Attached patch adds a new option FREEZE_ONLY to VACUUM command. This option is same as FREEZE option except for it disables reclaiming dead tuples. That is, with this option vacuum does pruning HOT chain, freezing live tuples and maintaining both visibility map and freespace map but does not

Re: Hash Joins vs. Bloom Filters / take 2

2018-10-01 Thread Tomas Vondra
On 10/01/2018 09:15 AM, Michael Paquier wrote: On Thu, Mar 01, 2018 at 07:04:41PM -0500, David Steele wrote: After reviewing the thread I also agree that this should be pushed to 2018-09, so I have done so. I'm very excited by this patch, though. In general I agree with Peter that a higher

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-10-01 Thread Etsuro Fujita
(2018/10/01 19:42), Michael Paquier wrote: On Mon, Jul 23, 2018 at 02:17:38PM +0530, Ashutosh Bapat wrote: I used perform instead of execute since the later is usually associated with local operation. I added "foreign" in the name of the function to indicate that it's executed on foreign

Re: pgbench - add pseudo-random permutation function

2018-10-01 Thread Fabien COELHO
PostgreSQL Hackers Subject: Re: pgbench - add pseudo-random permutation function On Wed, Sep 26, 2018 at 01:20:49PM +0200, Fabien COELHO wrote: So, am I right to deducing that you are satisfied with the current status of the patch, with the nbits implementation either based on popcount

Re: Function for listing archive_status directory

2018-10-01 Thread Christoph Moench-Tegeder
## Michael Paquier (mich...@paquier.xyz): > Okay, could you add this patch to the next commit fest? Here it is: > https://commitfest.postgresql.org/20/ And here's the patch: https://commitfest.postgresql.org/20/1813/ Regards, Christoph -- Spare Space

Re: Proposal for Signal Detection Refactoring

2018-10-01 Thread Chris Travers
On Wed, Sep 26, 2018 at 9:54 AM Chris Travers wrote: > > > On Tue, Sep 25, 2018 at 3:23 PM Tom Lane wrote: > >> Chris Travers writes: >> > However, what I think one could do is use a struct of volatile >> > sig_atomic_t members and macros for checking/setting. Simply writing a >> > value is

Re: SSL tests failing with "ee key too small" error on Debian SID

2018-10-01 Thread Kyotaro HORIGUCHI
At Tue, 25 Sep 2018 14:26:42 +0900, Michael Paquier wrote in <20180925052642.gj1...@paquier.xyz> > On Tue, Sep 25, 2018 at 12:48:57PM +0900, Kyotaro HORIGUCHI wrote: > > Do you mean that cert/key files are generated on-the-fly while > > running 'make check'? It sounds reasonable as long as just

Re: SQL/JSON: documentation

2018-10-01 Thread Liudmila Mantrova
On 09/28/2018 08:29 PM, Peter Eisentraut wrote: On 28/06/2018 01:36, Nikita Glukhov wrote: Attached patch with draft of SQL/JSON documentation written by Liudmila Mantrova, Oleg Bartunov and me. Also it can be found in our sqljson repository on sqljson_doc branch:

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2018-10-01 Thread Daniel Gustafsson
> On 1 Oct 2018, at 01:19, Michael Paquier wrote: > > On Sun, Sep 30, 2018 at 10:51:44PM +0900, Michael Paquier wrote: >> You could have chosen something less complicated, like "ホゲ", which is >> the equivalent of "foo" in English. Anyway, non-ASCII characters should >> not be included in the

Re: executor relation handling

2018-10-01 Thread Amit Langote
On 2018/10/01 2:18, Tom Lane wrote: > I wrote: >> 1. You set up transformRuleStmt to insert AccessExclusiveLock into >> the "OLD" and "NEW" RTEs for a view. This is surely wrong; we do >> not want to take exclusive lock on a view just to run a query using >> the view. It should (usually, anyway)

Re: Hint to set owner for tablespace directory

2018-10-01 Thread Maksim Milyutin
01.10.2018 15:15, Peter Eisentraut wrote: On 24/09/2018 14:50, Peter Eisentraut wrote: On 11/09/2018 17:10, Peter Eisentraut wrote: On 07/09/2018 17:59, Maksim Milyutin wrote: those directories was that user). The error message "could not set permissions on directory ..." disoriented that

Re: Odd 9.4, 9.3 buildfarm failure on s390x

2018-10-01 Thread Tom Lane
Andres Freund writes: > On 2018-10-01 12:13:57 -0400, Tom Lane wrote: >> Yeah. So our choices are >> >> (1) Retain the current restriction on what sort comparators can >> produce. Find all the places where memcmp's result is returned >> directly, and fix them. (I wonder if strcmp has same

has_column_privilege behavior (was Re: Assert failed in snprintf.c)

2018-10-01 Thread Tom Lane
I wrote: > Jaime Casanova writes: >> sqlsmith made it again, attached is the query (run against regression >> database) that makes the assert fail and the backtrace. >> this happens in head only (or at least 11 is fine). > Ah. Looks like the has_column_privilege stuff is incautious about

Re: [HACKERS] kqueue

2018-10-01 Thread Andres Freund
On 2018-10-01 19:25:45 +0200, Matteo Beccati wrote: > On 01/10/2018 01:09, Thomas Munro wrote: > > I don't know why the existence of the kqueue should make recvfrom() > > slower on the pgbench side. That's probably something to look into > > off-line with some FreeBSD guru help. Degraded

Re: has_column_privilege behavior (was Re: Assert failed in snprintf.c)

2018-10-01 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > >> You can't have it both ways. Either you throw an error if the name's > >> not there, or you don't. > > > I'm not following why we couldn't handle a dropped column

Re: [HACKERS] SERIALIZABLE with parallel query

2018-10-01 Thread Thomas Munro
On Thu, Sep 20, 2018 at 9:50 AM Kevin Grittner wrote: > On Tue, Jul 10, 2018 at 8:58 PM Masahiko Sawada wrote: > > I looked at this patches. The latest patch can build without any > > errors and warnings and pass all regression tests. I don't see > > critical bugs but there are random comments.

Re: SerializeParamList vs machines with strict alignment

2018-10-01 Thread Tom Lane
Amit Kapila writes: > On Tue, Oct 2, 2018 at 7:08 AM Tom Lane wrote: >> Also, I believe >> that coding the test this way makes the leader send the param values to >> multiple workers, which would flush out any problems with serializing a >> value multiple times. As against that, there's a

Re: SerializeParamList vs machines with strict alignment

2018-10-01 Thread Amit Kapila
On Tue, Oct 2, 2018 at 9:22 AM Tom Lane wrote: > > Amit Kapila writes: > > On Tue, Oct 2, 2018 at 7:08 AM Tom Lane wrote: > >> Also, I believe > >> that coding the test this way makes the leader send the param values to > >> multiple workers, which would flush out any problems with serializing

Re: row filtering for logical replication

2018-10-01 Thread Michael Paquier
On Thu, Mar 01, 2018 at 06:16:17PM -0500, David Steele wrote: > That was the right thing to do, thank you! This patch has been waiting on author for a couple of months and does not apply anymore, so I am marking as returned with feedback. If you can rebase, please feel free to resubmit. --

Re: SerializeParamList vs machines with strict alignment

2018-10-01 Thread Amit Kapila
On Tue, Oct 2, 2018 at 10:07 AM Tom Lane wrote: > > Amit Kapila writes: > > On Tue, Oct 2, 2018 at 9:38 AM Tom Lane wrote: > >> (But it might be worth choosing slightly less > >> generic object names, to avoid a conflict against other sub-tests > >> later in that script.) > > > The function

Re: Postgres, fsync, and OSs (specifically linux)

2018-10-01 Thread Thomas Munro
On Fri, Sep 28, 2018 at 9:37 PM Thomas Munro wrote: > The other patches in this tarball are all as posted already, but are > now rebased and assembled in one place. Also pushed to > https://github.com/macdice/postgres/tree/fsyncgate . Here is a new version that fixes an assertion failure during

Re: [HACKERS][PATCH] Applying PMDK to WAL operations for persistent memory

2018-10-01 Thread Michael Paquier
On Mon, Aug 06, 2018 at 06:00:54PM +0900, Yoshimi Ichiyanagi wrote: > The libpmem's pmem_map_file() supported 2M/1G(the size of huge page) > alignment, since it could reduce the number of page faults. > In addition, libpmem's pmem_memcpy_nodrain() is the function > to copy data using single

Re: [HACKERS] Client Connection redirection support for PostgreSQL

2018-10-01 Thread Michael Paquier
On Fri, Jul 13, 2018 at 04:20:15PM -0400, Dave Cramer wrote: > However it would be far better to have a startup parameter which indicated > that we wanted to connect to a read only database. At that point > pools could redirect to a secondary. Given the proliferation of cloud based >

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2018-10-01 Thread Michael Paquier
On Fri, Jul 27, 2018 at 02:19:27PM +0530, Ashutosh Bapat wrote: > [ removal of latest arguments ] > +1, if we could do that. The patch seems to have stuck a bit, so I am marking it as returned with feedback because of no activity. -- Michael signature.asc Description: PGP signature

  1   2   >