[HACKERS] How to run PG TAP tests on windows?

2017-08-01 Thread Abbas Butt
Hi, Can anyone point out to a tutorial or a list of steps required to run PG TAP tests on windows? Regards -- -- *Abbas* Architect Ph: 92.334.5100153 Skype ID: gabbasb www.enterprisedb.co m *Follow us on Twitter* @EnterpriseDB

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-01 Thread Amit Langote
On 2017/08/01 15:22, Simon Riggs wrote: > On 1 August 2017 at 07:16, Amit Langote wrote: >> In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints >> declared NOT VALID valid if created with table." In retrospect, >> constraints on foreign tables

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-01 Thread Simon Riggs
On 1 August 2017 at 08:37, Amit Langote wrote: > On 2017/08/01 15:22, Simon Riggs wrote: >> On 1 August 2017 at 07:16, Amit Langote >> wrote: >>> In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints >>> declared NOT

Re: [HACKERS] Red-Black tree traversal tests

2017-08-01 Thread Aleksander Alekseev
Hi Victor, > If it's not too much trouble perhaps you could write a few more test so > we would have 100% test coverage for rbtree, could modify it safely and > be sure that it actually works when someone will need the rest of its > functionality? Also I would recommend to add your patch to the

Re: [HACKERS] Pluggable storage

2017-08-01 Thread Haribabu Kommi
On Sun, Jul 23, 2017 at 4:10 PM, Amit Kapila wrote: > On Wed, Jul 19, 2017 at 11:33 AM, Haribabu Kommi > wrote: > > > > I am finding out that eliminating the HeapTuple usage in the upper layers > > needs some major changes, How about not

Re: [HACKERS] Update description of \d[S+] in \?

2017-08-01 Thread Amit Langote
On 2017/08/01 11:44, David G. Johnston wrote: > On Mon, Jul 31, 2017 at 7:06 PM, Robert Haas wrote: > >> On Thu, Jul 13, 2017 at 8:40 PM, Amit Langote >> wrote: >>> On 2017/07/13 19:57, Ashutosh Bapat wrote: On Thu, Jul 13, 2017 at

Re: [HACKERS] Minor comment update in partition.c

2017-08-01 Thread Dean Rasheed
On 31 July 2017 at 12:53, Beena Emerson wrote: > The commit d363d42bb9a4399a0207bd3b371c966e22e06bd3 changed > RangeDatumContent *content to PartitionRangeDatumKind *kind but a > comment on function partition_rbound_cmp was left unedited and it > still mentions content1

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-01 Thread Amit Langote
On 2017/08/01 17:54, Simon Riggs wrote: > On 1 August 2017 at 08:37, Amit Langote wrote: >> On 2017/08/01 15:22, Simon Riggs wrote: >>> On 1 August 2017 at 07:16, Amit Langote >>> wrote: In f27a6b15e656 (9.6 & later), we decided

Re: [HACKERS] Incorrect comment of XLByteToSeg() and XLByteToPrevSeg()

2017-08-01 Thread Yugo Nagata
On Tue, 01 Aug 2017 08:11:23 +0900 (JST) Tatsuo Ishii wrote: > > Thanks for the patch. Looks good to me. I will commit/push into all > > supported branches if there's no objection. > > Done. Thanks! > > Best regards, > -- > Tatsuo Ishii > SRA OSS, Inc. Japan > English:

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-08-01 Thread Amit Langote
On 2017/08/02 4:02, Robert Haas wrote: > On Tue, Aug 1, 2017 at 12:26 AM, Amit Langote > wrote: >> So is the latest patch posted upthread to process ON CONFLICT DO NOTHING >> using locally-defined unique indexes on leaf partitions something to >> consider? > >

[HACKERS] Confusing error message in pgbench

2017-08-01 Thread Tatsuo Ishii
I found an error message in pgbench is quite confusing. pgbench -S -M extended -c 1 -T 30 test query mode (-M) should be specified before any transaction scripts (-f or -b) Since there's no -f or -b option is specified, users will be confused. Actually the error occurs because pgbench implicitly

Re: [HACKERS] On Complex Source Code Reading Strategy

2017-08-01 Thread Zeray Kalayu
On Fri, Jul 28, 2017 at 2:45 AM, Tom Lane wrote: > Peter Geoghegan writes: >> 2. Start somewhere. I have no idea where that should be, but it has to >> be some particular place that seems interesting to you. > > Don't forget to start with the available

[HACKERS] Gettting warning message during PostgreSQL-9.5 installation on Windows

2017-08-01 Thread Ashutosh Sharma
Hi, I am getting this warning message when trying to install PostgreSQL-v9.5 on Windows with Perl-5.22 and above, Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/Project\("{ <-- HERE 8BC9CEB8-8B4A-11D0-8D11 00A0C91BC942}"\) = "([^"]+)"/ at Install.pm

[HACKERS] INSERT ON CONFLICT and partitioned tables

2017-08-01 Thread Amit Langote
Starting a new thread for a patch I posted earlier [1] to handle ON CONFLICT DO NOTHING when inserting into a partitioned table. It's intended for PG 11 and so registered in the upcoming CF. Summary of the previous discussion and the patch for anyone interested: Currently, if an INSERT

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-01 Thread Rushabh Lathia
On Wed, Aug 2, 2017 at 3:55 AM, Robert Haas wrote: > On Tue, Aug 1, 2017 at 5:34 AM, Rushabh Lathia > wrote: > > My colleague Robert and I had doubt about the order in of TABLE > > and TABLE_DATA. We thought earlier that reload-thought-root might

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-01 Thread Gavin Flower
On 02/08/17 11:03, Andres Freund wrote: Hi, On 2017-08-02 10:58:32 +1200, Thomas Munro wrote: When I shut down a cluster that isn't using logical replication, it always logs a line like the following. So do the build farm members I looked at. I didn't see anything about this in the open

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-08-01 Thread Amit Langote
Thanks for reviewing. On 2017/08/02 2:54, Robert Haas wrote: > On Mon, Jul 31, 2017 at 11:10 PM, Amit Langote > wrote: >> OK, these cosmetic changes are now in attached patch 0001. > > Regarding 0001: > > -List *childrels; > +List

Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

2017-08-01 Thread Tom Lane
Shay Rojansky writes: > Once again, I manged to make the error go away simply by setting the > session id context, which seems to be a mandatory server-side step for > properly support session tickets. The fact that you made the error go away doesn't make this a good solution. In

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 7:03 PM, Andres Freund wrote: > On 2017-08-02 10:58:32 +1200, Thomas Munro wrote: >> When I shut down a cluster that isn't using logical replication, it >> always logs a line like the following. So do the build farm members I >> looked at. I didn't see

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-01 Thread Andres Freund
Hi, On 2017-08-02 10:58:32 +1200, Thomas Munro wrote: > When I shut down a cluster that isn't using logical replication, it > always logs a line like the following. So do the build farm members I > looked at. I didn't see anything about this in the open items list -- > isn't it a bug? > >

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-01 Thread Andres Freund
On 2017-08-02 12:14:18 +1200, Thomas Munro wrote: > On Wed, Aug 2, 2017 at 11:03 AM, Andres Freund wrote: > > On 2017-08-02 10:58:32 +1200, Thomas Munro wrote: > >> When I shut down a cluster that isn't using logical replication, it > >> always logs a line like the following.

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-08-01 Thread Noah Misch
On Thu, Jul 27, 2017 at 10:27:36AM -0400, Stephen Frost wrote: > Noah, all, > > * Noah Misch (n...@leadboat.com) wrote: > > This PostgreSQL 10 open item is past due for your status update. Kindly > > send > > a status update within 24 hours, and include a date for your subsequent > > status >

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 9:23 PM, Amit Langote wrote: > Since ATExecAttachPartition() deals with the possibility that the table > being attached itself might be partitioned, someone reading the code might > find it helpful to get some clue about whose

[HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-08-01 Thread Masahiko Sawada
Hi all, I'd like to propose a new option -I for pgbench command which skips the creating primary keys after initialized tables. This option is useful for users who want to do bench marking with no index or indexes other than btree primary index. If we initialize pgbench tables at a large number

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-08-01 Thread Amit Langote
On 2017/08/02 10:27, Robert Haas wrote: > On Tue, Aug 1, 2017 at 9:23 PM, Amit Langote > wrote: >> Since ATExecAttachPartition() deals with the possibility that the table >> being attached itself might be partitioned, someone reading the code might >> find it

Re: [HACKERS] Proposal for CSN based snapshots

2017-08-01 Thread Amit Kapila
On Tue, Aug 1, 2017 at 7:41 PM, Alexander Kuzmenkov wrote: > Hi all, > > So I did some more experiments on this patch. > > * I fixed the bug with duplicate tuples I mentioned in the previous letter. > Indeed, the oldestActiveXid could be advanced past the transaction's

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-08-01 Thread Noah Misch
On Tue, Jul 25, 2017 at 07:02:28PM +0200, Tomas Vondra wrote: > On 7/25/17 5:04 PM, Tom Lane wrote: > >Tomas Vondra writes: > >>Attached is a patch that (I think) does just that. The disagreement > >>was caused by VACUUM treating recently dead tuples as live, while >

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-01 Thread Andres Freund
On 2017-08-02 11:19:39 +1200, Gavin Flower wrote: > Returning zero to indicate success is a holdover to the time computers could > only run one program at a time. At the end of the code there was a jump > table of 4 byte entries. The first entry with a displacement of zero was > the location to

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-01 Thread Thomas Munro
On Wed, Aug 2, 2017 at 11:03 AM, Andres Freund wrote: > On 2017-08-02 10:58:32 +1200, Thomas Munro wrote: >> When I shut down a cluster that isn't using logical replication, it >> always logs a line like the following. So do the build farm members I >> looked at. I didn't

Re: [HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-01 Thread Andres Freund
On 2017-08-01 20:37:07 -0400, Robert Haas wrote: > On Tue, Aug 1, 2017 at 7:03 PM, Andres Freund wrote: > > On 2017-08-02 10:58:32 +1200, Thomas Munro wrote: > >> When I shut down a cluster that isn't using logical replication, it > >> always logs a line like the following.

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-08-01 Thread Amit Langote
On 2017/08/02 9:31, Amit Langote wrote: > On 2017/08/02 4:02, Robert Haas wrote: >> On Tue, Aug 1, 2017 at 12:26 AM, Amit Langote >> wrote: >>> So is the latest patch posted upthread to process ON CONFLICT DO NOTHING >>> using locally-defined unique indexes on leaf

Re: [HACKERS] Faster methods for getting SPI results

2017-08-01 Thread Chapman Flack
On 12/20/16 23:14, Jim Nasby wrote: > I'm guessing one issue might be that > we don't want to call an external interpreter while potentially holding page > pins, but even then couldn't we just copy a single tuple at a time and save > a huge amount of palloc overhead? On 04/06/17 03:38, Craig

Re: [HACKERS] Better way to handle suppression of CASCADE detail messages

2017-08-01 Thread Alvaro Herrera
Andres Freund wrote: > On 2017-08-01 13:48:34 -0400, Robert Haas wrote: > > On Tue, Aug 1, 2017 at 1:39 PM, Andres Freund wrote: > > > Oid is probably not good enough - with parallel tests and such it's not > > > necessarily predicable. Even less so when the tests are run

Re: [HACKERS] asynchronous execution

2017-08-01 Thread Robert Haas
On Mon, Jul 31, 2017 at 5:42 AM, Kyotaro HORIGUCHI wrote: > Another is getting rid of recursive call to run an execution > tree. That happens to be exactly what Andres did for expression evaluation in commit b8d7f053c5c2bf2a7e8734fe3327f6a8bc711755, and I think

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Pavel Stehule
2017-08-01 18:35 GMT+02:00 Remi Colinet : > I did it in version 2 of the patch. > The patch could yield TEXT, JSON, and XML ouput. > > For below query, it gives: > > => Terminal 1 > test=# select * from t_10m, t_1m where t_10m.md5 like '%cb%'; > > => Terminal 2 > test=#

[HACKERS] Why does logical replication launcher exit with exit code 1?

2017-08-01 Thread Thomas Munro
Hi, When I shut down a cluster that isn't using logical replication, it always logs a line like the following. So do the build farm members I looked at. I didn't see anything about this in the open items list -- isn't it a bug? 2017-08-02 10:39:25.007 NZST [34781] LOG: worker process: logical

Re: [HACKERS] parallel documentation improvements

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 3:15 PM, Erik Rijkers wrote: > On 2017-08-01 20:43, Robert Haas wrote: >> In commit 054637d2e08cda6a096f48cc99696136a06f4ef5, I updated the >> parallel query documentation to reflect recently-committed parallel >> >> Barring objections, I'd like to commit

Re: [HACKERS] Adding support for Default partition in partitioning

2017-08-01 Thread Robert Haas
On Wed, Jul 12, 2017 at 3:31 PM, Jeevan Ladhe wrote: > 0001: > Refactoring existing ATExecAttachPartition code so that it can be used for > default partitioning as well Boring refactoring. Seems fine. > 0002: > This patch teaches the partitioning code to handle

Re: [HACKERS] [PATCH] A hook for session start

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 3:37 PM, Peter Eisentraut wrote: > On 7/21/17 12:59, Robert Haas wrote: >> That's an exceedingly-weak argument for rejecting this patch. The >> fact that you can probably hack around the lack of a hook for most >> reasonable use cases is

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 5:34 AM, Rushabh Lathia wrote: > My colleague Robert and I had doubt about the order in of TABLE > and TABLE_DATA. We thought earlier that reload-thought-root might > might not solve the purpose which has been discussed in the above > mentioned

Re: [HACKERS] Remove 1MB size limit in tsvector

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 3:10 PM, Ildus K wrote: >> So this would break pg_upgrade for tsvector columns? > > I added a function that will convert old tsvectors on the fly. It's the > approach used in hstore before. Does that mean the answer to the question that I

Re: [HACKERS] [PATCH] A hook for session start

2017-08-01 Thread Andres Freund
On 2017-08-01 15:37:40 -0400, Peter Eisentraut wrote: > On 7/21/17 12:59, Robert Haas wrote: > > That's an exceedingly-weak argument for rejecting this patch. The > > fact that you can probably hack around the lack of a hook for most > > reasonable use cases is not an argument for having a hook

Re: [HACKERS] Remove 1MB size limit in tsvector

2017-08-01 Thread Ildus K
On Tue, 1 Aug 2017 15:33:08 -0400 Robert Haas wrote: > On Tue, Aug 1, 2017 at 3:10 PM, Ildus K > wrote: > >> So this would break pg_upgrade for tsvector columns? > > > > I added a function that will convert old tsvectors on the fly. It's >

Re: [HACKERS] [PATCH] A hook for session start

2017-08-01 Thread Peter Eisentraut
On 7/21/17 12:59, Robert Haas wrote: > That's an exceedingly-weak argument for rejecting this patch. The > fact that you can probably hack around the lack of a hook for most > reasonable use cases is not an argument for having a hook that does > what people actually want to do. Still nobody has

Re: [HACKERS] [PATCH] A hook for session start

2017-08-01 Thread Peter Eisentraut
On 7/21/17 13:14, Jim Mlodgenski wrote: > When I first saw this thread, my initial thought of a use case is to > prepare some key application queries so they are there and ready to go. > That would need to be before the ExecutorStart_hook or > ProcessUtility_hook if an app would just want to

Re: [HACKERS] [PATCH] A hook for session start

2017-08-01 Thread Peter Eisentraut
On 7/20/17 07:47, Yugo Nagata wrote: > Another patch, session_start_sample.patch, is a very simple > example of this hook that changes work_mem values for sessions > of a specific database. I think test modules should go into src/test/modules/ instead of contrib. -- Peter Eisentraut

Re: [HACKERS] Re: [BUGS] BUG #14758: Segfault with logical replication on a function index

2017-08-01 Thread Peter Eisentraut
On 8/1/17 00:21, Noah Misch wrote: > On Mon, Jul 31, 2017 at 09:40:34AM +0900, Masahiko Sawada wrote: >> On Sat, Jul 29, 2017 at 4:35 AM, Scott Milliken wrote: >>> Thank you Masahiko! I've tested and confirmed that this patch fixes the >>> problem. >>> >> >> Thank you for the

Re: [HACKERS] More flexible LDAP auth search filters?

2017-08-01 Thread Thomas Munro
On Wed, Aug 2, 2017 at 5:36 AM, Peter Eisentraut wrote: > On 7/16/17 19:09, Thomas Munro wrote: >> On Mon, Jul 17, 2017 at 10:26 AM, Thomas Munro >> wrote: >>> ldap-search-filters-v2.patch >> >> Gah, it would help if I could spell

Re: [HACKERS] [GENERAL] Not able to create collation on Windows

2017-08-01 Thread Tom Lane
Murtuza Zabuawala writes: > I am trying to create collation on windows using default POSIX collation > with pgAdmin3 but I am getting error as shown in screenshot, Can someone > suggest how to fix this? > *Syntax:* > CREATE COLLATION public.test from

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-08-01 Thread Peter Eisentraut
On 8/1/17 08:28, Victor Wagner wrote: > On Tue, 1 Aug 2017 08:16:54 -0400 > Peter Eisentraut wrote: > >> On 8/1/17 02:12, Victor Wagner wrote: We are only calling uloc_toLanguageTag() with keyword/value combinations that ICU itself previously told us

Re: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-08-01 Thread Markus Sintonen
The following does not work: LISTEN 'foo%' Neither this: LISTEN SIMILAR TO "foo%" This works: LISTEN "foo%" But it does not act as a pattern. We could change the SIMILAR TO something like following (accepting also type of the pattern), for example: LISTEN PATTERN 'foo%' TYPE 'similar' LISTEN

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-01 Thread Etsuro Fujita
On 2017/07/31 18:56, Amit Langote wrote: On 2017/07/28 20:46, Amit Khandekar wrote: create table foo (a int, b text) partition by list (a); create table foo1 partition of foo for values in (1); create table foo2(b text, a int) ; alter table foo attach partition foo2 for values in (2);

Re: [HACKERS] [GENERAL] Not able to create collation on Windows

2017-08-01 Thread Peter Eisentraut
On 8/1/17 10:53, Tom Lane wrote: > Murtuza Zabuawala writes: >> I am trying to create collation on windows using default POSIX collation >> with pgAdmin3 but I am getting error as shown in screenshot, Can someone >> suggest how to fix this? > >> *Syntax:* >>

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-08-01 Thread Tom Lane
Victor Wagner writes: > Peter Eisentraut wrote: >> I don't know that we can already reach that conclusion. Maybe the > Because it was fixed in subsequent versions. > And 4.2 is first version where this function appeared. > So, we still

[HACKERS] Remove 1MB size limit in tsvector

2017-08-01 Thread Ildus Kurbangaliev
Hello, hackers! Historically tsvector type can't hold more than 1MB data. I want to propose a patch that removes that limit. That limit is created by 'pos' field from WordEntry, which have only 20 bits for storage. In the proposed patch I removed this field and instead of it I keep offsets only

Re: [HACKERS] How to run PG TAP tests on windows?

2017-08-01 Thread Michael Paquier
On Tue, Aug 1, 2017 at 10:24 AM, Abbas Butt wrote: > Can anyone point out to a tutorial or a list of steps required to run PG TAP > tests on windows? Only MSVC has a special handling:

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-08-01 Thread Stas Kelvich
> On 31 Jul 2017, at 20:03, Robert Haas wrote: > > Regardless of whether we share XIDs or DXIDs, we need a more complex > concept of transaction state than we have now. Seems that discussion shifted from 2PC itself to the general issues with distributed transactions. So

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-08-01 Thread Victor Wagner
On Tue, 1 Aug 2017 08:16:54 -0400 Peter Eisentraut wrote: > On 8/1/17 02:12, Victor Wagner wrote: > >> We are only calling uloc_toLanguageTag() with keyword/value > >> combinations that ICU itself previously told us were supported. So > >> just ignoring errors

Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y

2017-08-01 Thread Pavel Golub
Hello, Robert. Sorry, if I was rough. My English is not so excellent. My point is that I was trying to distinguish behavior of EDB installer and "build from source" PG. And the result is that EDB executes ALTER USER and I don't know why. You wrote: RH> On Thu, Jul 27, 2017 at 2:52 AM, Pavel

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-08-01 Thread Peter Eisentraut
On 8/1/17 02:12, Victor Wagner wrote: >> We are only calling uloc_toLanguageTag() with keyword/value >> combinations that ICU itself previously told us were supported. So >> just ignoring errors doesn't seem proper in this case. >> > We know that this version of ICU is broken. But what choice we

Re: [HACKERS] AlterUserStmt anmd RoleSpec rules in grammar.y

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 8:42 AM, Pavel Golub wrote: > Sorry, if I was rough. My English is not so excellent. My point is > that I was trying to distinguish behavior of EDB installer and > "build from source" PG. > > And the result is that EDB executes ALTER USER and I don't

Re: [HACKERS] [GENERAL] Not able to create collation on Windows

2017-08-01 Thread Tom Lane
Murtuza Zabuawala writes: > Yes, I was able to create collation using "C" instead of "POSIX" on windows, > CREATE COLLATION public.test from pg_catalog."C"; Yeah, I thought that might happen. So the point basically is that in almost all of the collations

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Michael Paquier
On Tue, Aug 1, 2017 at 6:35 PM, Remi Colinet wrote: > I'am skeptical about the use of JSON, XML, and others in such output. You should not. > Does anyone use these formats (XML, JSON, YAML) for EXPLAIN output? > I suspect only TEXT format is being used. I think that

[HACKERS] A little improvementof ApplyLauncherMain loop code

2017-08-01 Thread Yugo Nagata
Hi, When reading the logical replication code, I found that the following part could be improved a bit. In the foreach, LWLockAcquire and logicalrep_worker_find are called for each loop, but they are needed only when sub->enabled is true. 846 /* Start the missing workers for enabled

Re: [HACKERS] Improve the performance of the standby server when dropping tables on the primary server

2017-08-01 Thread Simon Riggs
On 1 August 2017 at 05:45, Tokuda, Takashi wrote: > Hi, > > The attached patch changes data structure storing unowned SMgrRelation objects > from list structure to hash structure. > The reason why I change it is that list structure very slowly removes a node. > And

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-08-01 Thread Masahiko Sawada
On Tue, Aug 1, 2017 at 3:43 AM, Robert Haas wrote: > On Mon, Jul 31, 2017 at 1:27 PM, Alvaro Herrera > wrote: >> Postgres-XL seems to manage this problem by using a transaction manager >> node, which is in charge of assigning snapshots. I don't

[HACKERS] reload-through-the-top-parent switch the partition table

2017-08-01 Thread Rushabh Lathia
https://www.postgresql.org/message-id/CA%2BTgmoZFn7TJ7QBsFat nuEE%3DGYGdZSNXqr9489n5JBsdy5rFfA%40mail.gmail.com Above thread, it's been pointed out as important consideration about adding reload-through-the-top-parent switch the partition table. One small step toward making use of hash function

Re: [HACKERS] Red-Black tree traversal tests

2017-08-01 Thread Aleksander Alekseev
Hi Victor, > Postgres now has its own red-black tree implementation. This tree has 4 > types of traversals. In the attachment, you can find module test that > checks the correctness of tree traversal strategies. > > I hope that someone can find it useful. Great job! However, according to lcov

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-08-01 Thread Tom Lane
"Tels" writes: > So, is the goal you are trying to achive here to be able to say "You need > Perl 5.8.3; plus Module XYZ in vABC if you want point 2, otherwise skip > this step" instead of saying "You need Perl 5.10.1?"? I mainly want to be sure that if we say "it

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Andres Freund
On 2017-08-01 19:11:55 +0200, Michael Paquier wrote: > I think that Depesz makes use of a non-default format for its > explain.depesz.com, or he would have a hard time maintaining a > deparsing API for its application. Hm? e.d.c accepts the text explain format, so I'm unclear on what you're

[HACKERS] Better way to handle suppression of CASCADE detail messages

2017-08-01 Thread Tom Lane
In various places in the regression tests, we want to suppress DROP CASCADE's detail messages because of the fact that they don't always come out in the same order. I noticed that some places deal with that by adjusting client_min_messages while others use "\set VERBOSITY terse". I think that the

[HACKERS] Possible bug in 9.3.17 using operator <>

2017-08-01 Thread Nick Dro
The operator <> seems to not work properly comparing citext types in triggers function.   https://stackoverflow.com/questions/45441840/posgresql-9-3-operator-doesnt-give-logical-result   Can someone figure out what is the problem? This seems like a bug.

Re: [HACKERS] Possible bug in 9.3.17 using operator <>

2017-08-01 Thread David G. Johnston
On Tue, Aug 1, 2017 at 8:39 AM, Nick Dro wrote: > The operator <> seems to not work properly comparing citext types in > triggers function. > > https://stackoverflow.com/questions/45441840/posgresql- > 9-3-operator-doesnt-give-logical-result > > Can someone figure out

Re: [HACKERS] PL_stashcache, or, what's our minimum Perl version?

2017-08-01 Thread Tels
On Sun, July 30, 2017 4:35 pm, Tom Lane wrote: > "Tels" writes: >> On Sun, July 30, 2017 12:22 pm, Tom Lane wrote: >>> Yeah, I looked into that. The closest candidate I can find is that >>> perl 5.10.1 contains Test::More 0.92. However, it's not real clear >>> to

Re: [HACKERS] [GENERAL] Not able to create collation on Windows

2017-08-01 Thread Murtuza Zabuawala
Hi Tom, Yes, I was able to create collation using "C" instead of "POSIX" on windows, CREATE COLLATION public.test from pg_catalog."C"; -- Regards, Murtuza Zabuawala On Tue, Aug 1, 2017 at 9:09 PM, Tom Lane wrote: > Peter Eisentraut

Re: [HACKERS] [GENERAL] Not able to create collation on Windows

2017-08-01 Thread Tom Lane
Peter Eisentraut writes: > On 8/1/17 10:53, Tom Lane wrote: >> I think this is actually a bug, because the collations code clearly >> means to allow clones of the C/POSIX locales --- see eg lc_collate_is_c, > You seem to say that we should support a "POSIX"

Re: [HACKERS] map_partition_varattnos() and whole-row vars

2017-08-01 Thread Amit Khandekar
On 1 August 2017 at 15:11, Etsuro Fujita wrote: > On 2017/07/31 18:56, Amit Langote wrote: >> Yes, that's what's needed here. So we need to teach >> map_variable_attnos_mutator() to convert whole-row vars just like it's >> done in adjust_appendrel_attrs_mutator(). >

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Remi Colinet
I did it in version 2 of the patch. The patch could yield TEXT, JSON, and XML ouput. For below query, it gives: => Terminal 1 test=# select * from t_10m, t_1m where t_10m.md5 like '%cb%'; => Terminal 2 test=# \watch PROGRESS 9546; Wed 10 May 2017 06:29:59 PM CEST

Re: [HACKERS] PostgreSQL 10 (latest beta) and older ICU

2017-08-01 Thread Victor Wagner
On Mon, 31 Jul 2017 19:42:30 -0400 Peter Eisentraut wrote: > On 7/25/17 15:20, Victor Wagner wrote: > > It turns out, that PostgreSQL enumerates collations for all ICU > > locales and passes it into uloc_toLanguageTag function with strict > > argument of this

Re: [HACKERS] Better way to handle suppression of CASCADE detail messages

2017-08-01 Thread Andres Freund
Hi, On 2017-08-01 13:34:45 -0400, Tom Lane wrote: > BTW, in the long run maybe we should instead make the CASCADE message > ordering more predictable, perhaps by sorting the objects by OID. > But that's not a job for beta time. Oid is probably not good enough - with parallel tests and such it's

Re: [HACKERS] Better way to handle suppression of CASCADE detail messages

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 1:39 PM, Andres Freund wrote: > Oid is probably not good enough - with parallel tests and such it's not > necessarily predicable. Even less so when the tests are run against an > existing cluster. Sorting by name would probably be better... It's

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-08-01 Thread Robert Haas
On Mon, Jul 31, 2017 at 11:10 PM, Amit Langote wrote: > OK, these cosmetic changes are now in attached patch 0001. Regarding 0001: -List *childrels; +List *attachRel_children; I sorta don't see why this is necessary, or better. /* It's

Re: [HACKERS] Better way to handle suppression of CASCADE detail messages

2017-08-01 Thread Andres Freund
On 2017-08-01 13:48:34 -0400, Robert Haas wrote: > On Tue, Aug 1, 2017 at 1:39 PM, Andres Freund wrote: > > Oid is probably not good enough - with parallel tests and such it's not > > necessarily predicable. Even less so when the tests are run against an > > existing cluster.

Re: [HACKERS] pgbench minor doc typo

2017-08-01 Thread Peter Eisentraut
On 7/19/17 16:42, Fabien COELHO wrote: > Alik Khilazhev is submitting a patch about a zipfian random function > for pgbench, and noticed a typo in the documentation about > random_exponential. > > Attached is a fix extracted from his patch submission, which could be > applied to head/10/9.6.

Re: [HACKERS] More flexible LDAP auth search filters?

2017-08-01 Thread Peter Eisentraut
On 7/16/17 19:09, Thomas Munro wrote: > On Mon, Jul 17, 2017 at 10:26 AM, Thomas Munro > wrote: >> ldap-search-filters-v2.patch > > Gah, it would help if I could spell "occurrences" correctly. Fixed in > the attached. Please also add the corresponding support for

Re: [HACKERS] Better way to handle suppression of CASCADE detail messages

2017-08-01 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 1, 2017 at 1:39 PM, Andres Freund wrote: >> Oid is probably not good enough - with parallel tests and such it's not >> necessarily predicable. Even less so when the tests are run against an >> existing cluster. Sorting

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 12:35 PM, Remi Colinet wrote: > I did it in version 2 of the patch. > I'am skeptical about the use of JSON, XML, and others in such output. > > Does anyone use these formats (XML, JSON, YAML) for EXPLAIN output? > I suspect only TEXT format is being

Re: [HACKERS] [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities

2017-08-01 Thread Michael Paquier
On Tue, Aug 1, 2017 at 7:17 PM, Andres Freund wrote: > On 2017-08-01 19:11:55 +0200, Michael Paquier wrote: >> I think that Depesz makes use of a non-default format for its >> explain.depesz.com, or he would have a hard time maintaining a >> deparsing API for its application.

[HACKERS] parallel documentation improvements

2017-08-01 Thread Robert Haas
Hi, In commit 054637d2e08cda6a096f48cc99696136a06f4ef5, I updated the parallel query documentation to reflect recently-committed parallel query features. However, a few more things got committed after that. Most of the attached patch consists of generalizing references to Gather to also include

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-08-01 Thread Masahiko Sawada
On Tue, Aug 1, 2017 at 1:40 AM, Robert Haas wrote: > On Thu, Jul 27, 2017 at 8:25 AM, Ashutosh Bapat > wrote: >> The remote transaction can be committed/aborted only after the fate of >> the local transaction is decided. If we commit remote

[HACKERS] foreign table creation and NOT VALID check constraints

2017-08-01 Thread Amit Langote
In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints declared NOT VALID valid if created with table." In retrospect, constraints on foreign tables should have been excluded from consideration in that commit, because the thinking behind the aforementioned commit (that the

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-01 Thread Simon Riggs
On 1 August 2017 at 07:16, Amit Langote wrote: > In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints > declared NOT VALID valid if created with table." In retrospect, > constraints on foreign tables should have been excluded from consideration > in

Re: [HACKERS] pgbench minor doc typo

2017-08-01 Thread Fabien COELHO
Alik Khilazhev is submitting a patch about a zipfian random function for pgbench, and noticed a typo in the documentation about random_exponential. Attached is a fix extracted from his patch submission, which could be applied to head/10/9.6. done Ok, thanks. -- Fabien. -- Sent via

Re: [HACKERS] Remove 1MB size limit in tsvector

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 10:08 AM, Ildus Kurbangaliev wrote: > Historically tsvector type can't hold more than 1MB data. > I want to propose a patch that removes that limit. > > That limit is created by 'pos' field from WordEntry, which have only > 20 bits for

[HACKERS] JDBC 42.1.4 released

2017-08-01 Thread Dave Cramer
*Notable changes* - Statements with non-zero fetchSize no longer require server-side named handle. This might cause issues when using old PostgreSQL versions (pre-8.4)+fetchSize+interleaved ResultSet processing combo. see issue 869

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 12:26 AM, Amit Langote wrote: > So is the latest patch posted upthread to process ON CONFLICT DO NOTHING > using locally-defined unique indexes on leaf partitions something to consider? Yeah, for v11. > Maybe, not until we have cascading

Re: [HACKERS] Update comments in nodeModifyTable.c

2017-08-01 Thread Robert Haas
On Tue, Aug 1, 2017 at 12:31 AM, Etsuro Fujita wrote: > Maybe I'm missing something, but I'm not sure that's a good idea because the > change says like we might have 'wholerow' only for the FDW case, but that > isn't correct because we would have 'wholerow' for a view

Re: [HACKERS] Remove 1MB size limit in tsvector

2017-08-01 Thread Ildus K
On Tue, 1 Aug 2017 14:56:54 -0400 Robert Haas wrote: > On Tue, Aug 1, 2017 at 10:08 AM, Ildus Kurbangaliev > wrote: > > Historically tsvector type can't hold more than 1MB data. > > I want to propose a patch that removes that limit. > > > >

Re: [HACKERS] parallel documentation improvements

2017-08-01 Thread Erik Rijkers
On 2017-08-01 20:43, Robert Haas wrote: In commit 054637d2e08cda6a096f48cc99696136a06f4ef5, I updated the parallel query documentation to reflect recently-committed parallel Barring objections, I'd like to commit this in the next couple of days I think that in this bit: occurrence is