Re: [HACKERS] Event triggers + table partitioning cause server crash in current master

2017-05-15 Thread Amit Langote
On 2017/05/14 12:03, Mark Dilger wrote: > Hackers, > > I discovered a reproducible crash using event triggers in the current > development version, 29c7d5e483acaa74a0d06dd6c70b320bb315. > I was getting a crash before this version, and cloned a fresh copy of > the sources to be sure I was up

[HACKERS] Create publication syntax is not coming properly in pg_dump / pg_dumpall

2017-05-15 Thread tushar
Hi, I observed that in pg_dump/pg_dumpall - 'create publication' syntax is not coming properly if only specified value is mentioned in publish. Testcase to reproduce - \\create a publication postgres=# CREATE PUBLICATION abc for all tables with (publish='insert'); CREATE PUBLICATION

[HACKERS] NOT NULL constraints on range partition key columns

2017-05-15 Thread Amit Langote
Starting a new thread to discuss the proposal I put forward in [1] to stop creating explicit NOT NULL constraint on range partition keys that are simple columns. I said the following: On 2017/05/12 11:20, Robert Haas wrote: > On Thu, May 11, 2017 at 10:15 PM, Amit Langote >

Re: [HACKERS] Create publication syntax is not coming properly in pg_dump / pg_dumpall

2017-05-15 Thread Masahiko Sawada
On Mon, May 15, 2017 at 5:04 PM, tushar wrote: > Hi, > > I observed that in pg_dump/pg_dumpall - 'create publication' syntax is not > coming properly if only specified value is mentioned in publish. > > Testcase to reproduce - > > \\create a publication > >

Re: [HACKERS] Patch to fix documentation about AFTER triggers

2017-05-15 Thread Ashutosh Bapat
On Sat, May 13, 2017 at 2:45 AM, Paul Jungwirth wrote: > Here is a patch to amend the docs here: > > https://www.postgresql.org/docs/devel/static/plpgsql-trigger.html > > In the example for an AFTER trigger, you see this code: > > -- > -- Create a row in

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-15 Thread Ildus Kurbangaliev
On Mon, 15 May 2017 10:34:58 +0530 Dilip Kumar wrote: > On Sun, May 14, 2017 at 9:54 PM, Dilip Kumar > wrote: > > After your fix, now tupleid is invalid which is expected, but seems > > like we need to do something more. As per the comments seems

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-05-15 Thread Kyotaro HORIGUCHI
Hello, At Fri, 12 May 2017 17:24:07 +0900, Masahiko Sawada wrote in > On Fri, May 12, 2017 at 11:24 AM, Masahiko Sawada > wrote: > > On Thu, May 11, 2017 at 6:16 PM, Petr Jelinek

Re: [HACKERS] Small improvement to compactify_tuples

2017-05-15 Thread Heikki Linnakangas
On 05/14/2017 09:47 PM, Sokolov Yura wrote: Good day, everyone. I've been playing a bit with unlogged tables - just random updates on simple key-value table. I've noticed amount of cpu spent in a compactify_tuples (called by PageRepareFragmentaion). Most of time were spent in qsort of

Re: [HACKERS] Typos in pg_basebackup.c

2017-05-15 Thread Magnus Hagander
On Mon, May 15, 2017 at 7:02 AM, Michael Paquier wrote: > Hi all, > > Found $subject while working on the area. A patch is attached. > Thanks, > Applied, thanks. -- Magnus Hagander Me: https://www.hagander.net/ Work:

Re: [HACKERS] Create publication syntax is not coming properly in pg_dump / pg_dumpall

2017-05-15 Thread Kuntal Ghosh
On Mon, May 15, 2017 at 3:06 PM, Masahiko Sawada wrote: > On Mon, May 15, 2017 at 5:04 PM, tushar wrote: >> Hi, >> >> I observed that in pg_dump/pg_dumpall - 'create publication' syntax is not >> coming properly if only specified value is

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-15 Thread Masahiko Sawada
On Mon, May 15, 2017 at 6:41 PM, tushar wrote: > Hi, > > Server Crashes if we try to provide slot_name='none' at the time of creating > subscription - > > postgres=# create subscription sub2 connection 'dbname=postgres port=5000 > user=centos password=f'

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-15 Thread Kuntal Ghosh
On Mon, May 15, 2017 at 4:00 PM, Masahiko Sawada wrote: > On Mon, May 15, 2017 at 6:41 PM, tushar wrote: >> Hi, >> >> Server Crashes if we try to provide slot_name='none' at the time of creating >> subscription - >> >> postgres=# create

[HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-15 Thread tushar
Hi, Server Crashes if we try to provide slot_name='none' at the time of creating subscription - postgres=# create subscription sub2 connection 'dbname=postgres port=5000 user=centos password=f' publication abc with (slot_name='none'); NOTICE: synchronized table states server closed the

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-15 Thread Dilip Kumar
On Mon, May 15, 2017 at 2:46 PM, Ildus Kurbangaliev wrote: > Hi, > planSlot contains already projected tuple, you can't use it as oldtuple. > I think problem is that `rewriteTargetListUD` called only for parent > relation, so there is no `wholerow` attribute for

Re: [HACKERS] Receive buffer size for the statistics socket

2017-05-15 Thread Heikki Linnakangas
On 05/14/2017 09:54 PM, Tom Lane wrote: Also, it's clear that a session could easily shove much more than 8KB at a time out to the stats collector, because what we're doing in the stats test does not involve touching any very large number of tables. So I think this is not just a test failure

Re: [HACKERS] [POC] hash partitioning

2017-05-15 Thread amul sul
On Wed, May 10, 2017 at 10:13 PM, Robert Haas wrote: > On Wed, May 10, 2017 at 8:34 AM, Ashutosh Bapat > wrote: >> Hash partitioning will partition the data based on the hash value of the >> partition key. Does that require collation?

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-15 Thread Masahiko Sawada
On Mon, May 15, 2017 at 8:06 PM, Kuntal Ghosh wrote: > On Mon, May 15, 2017 at 4:00 PM, Masahiko Sawada > wrote: >> On Mon, May 15, 2017 at 6:41 PM, tushar >> wrote: >>> Hi, >>> >>> Server Crashes if we try to

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-15 Thread Ashutosh Bapat
On Mon, May 15, 2017 at 2:46 PM, Ildus Kurbangaliev wrote: > On Mon, 15 May 2017 10:34:58 +0530 > Dilip Kumar wrote: > >> On Sun, May 14, 2017 at 9:54 PM, Dilip Kumar >> wrote: >> > After your fix, now tupleid is

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-15 Thread Ashutosh Bapat
On Mon, May 15, 2017 at 6:04 PM, Dilip Kumar wrote: > On Mon, May 15, 2017 at 5:43 PM, Ashutosh Bapat > wrote: >> Yes. postgresAddForeignUpdateTargets() which is called by >> rewriteTargetListUD injects "ctid". "wholerow" is always there.

Re: [HACKERS] Small improvement to compactify_tuples

2017-05-15 Thread Sokolov Yura
Sokolov Yura писал 2017-05-15 15:08: Heikki Linnakangas писал 2017-05-15 12:06: On 05/14/2017 09:47 PM, Sokolov Yura wrote: Good day, everyone. I've been playing a bit with unlogged tables - just random updates on simple key-value table. I've noticed amount of cpu spent in a

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-15 Thread Masahiko Sawada
On Mon, May 15, 2017 at 8:22 PM, Kuntal Ghosh wrote: > On Mon, May 15, 2017 at 4:39 PM, Masahiko Sawada > wrote: > > While testing with logical replication, I've found that the server > hangs if we create a subscription to the same server. For

Re: [HACKERS] NOT NULL constraints on range partition key columns

2017-05-15 Thread Amit Kapila
On Mon, May 15, 2017 at 11:46 AM, Amit Langote wrote: > Starting a new thread to discuss the proposal I put forward in [1] to stop > creating explicit NOT NULL constraint on range partition keys that are > simple columns. I said the following: > > On 2017/05/12

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-15 Thread Kuntal Ghosh
On Mon, May 15, 2017 at 5:04 PM, Masahiko Sawada wrote: > On Mon, May 15, 2017 at 8:22 PM, Kuntal Ghosh > wrote: >> On Mon, May 15, 2017 at 4:39 PM, Masahiko Sawada >> wrote: >> >> While testing with logical replication,

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-15 Thread Kuntal Ghosh
On Mon, May 15, 2017 at 4:39 PM, Masahiko Sawada wrote: While testing with logical replication, I've found that the server hangs if we create a subscription to the same server. For example, $ ./pg_ctl -D Test start -o "-p 5432" $ ./psql -p 5432 postgres -c "CREATE

Re: [HACKERS] UPDATE of partition key

2017-05-15 Thread Robert Haas
On Fri, May 12, 2017 at 3:07 AM, Amit Kapila wrote: > I agree with you that it might not be straightforward to make it work, > but now that earliest it can go is v11, do we want to try doing > something other than just documenting it. What I could read from this > e-mail

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-15 Thread Dilip Kumar
On Mon, May 15, 2017 at 5:43 PM, Ashutosh Bapat wrote: > Yes. postgresAddForeignUpdateTargets() which is called by > rewriteTargetListUD injects "ctid". "wholerow" is always there. Not > for postgres_fdw but for other wrappers it might be a bad news. ctid, > whole

Re: [HACKERS] Small improvement to compactify_tuples

2017-05-15 Thread Sokolov Yura
Heikki Linnakangas писал 2017-05-15 12:06: On 05/14/2017 09:47 PM, Sokolov Yura wrote: Good day, everyone. I've been playing a bit with unlogged tables - just random updates on simple key-value table. I've noticed amount of cpu spent in a compactify_tuples (called by PageRepareFragmentaion).

Re: [HACKERS] postgres 9.6.2 update breakage

2017-05-15 Thread Roel Janssen
Jan Nieuwenhuizen writes: > Roel Janssen writes: > >> So, it would be something like: >> postgres pg_upgrade \ >> ... > > It's great to have a recipe `that works', so thanks! > > However, whether or not we automate this, I cannot help to wonder if > we should support downgrading -- at least to

Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-15 Thread Peter Eisentraut
On 5/10/17 09:12, Michael Paquier wrote: > Looking at 0001 and 0002... So you are correctly blocking nextval() > when ALTER SEQUENCE holds a lock on the sequence object. And > concurrent calls of nextval() don't conflict. As far as I can see this > matches the implementation of 3. > > Here are

Re: [HACKERS] Hash Functions

2017-05-15 Thread Jeff Davis
On Sun, May 14, 2017 at 6:22 PM, Robert Haas wrote: > You'd have to prohibit a heck of a lot more than that in order for > this to work 100% reliably. You'd have to prohibit CHECK constraints, > triggers, rules, RLS policies, and UNIQUE indexes, at the least. You > might

Re: [HACKERS] Hash Functions

2017-05-15 Thread Bruce Momjian
On Mon, May 15, 2017 at 07:32:30AM -0700, Jeff Davis wrote: > On Sun, May 14, 2017 at 8:00 PM, Bruce Momjian wrote: > > Do we even know that floats are precise enough to determine the > > partition. For example, if you have 6.1, is it possible for > > that to be

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-15 Thread Dilip Kumar
On Mon, May 15, 2017 at 7:36 PM, Haribabu Kommi wrote: > > The wait of the workers to send tuples is may be > because of less number of workers. So increasing > the parallel workers may improve the performance. Yes, for the cases where a significant amount of work is

Re: [HACKERS] Event triggers + table partitioning cause server crash in current master

2017-05-15 Thread Mark Dilger
> On May 14, 2017, at 11:02 PM, Amit Langote > wrote: > > On 2017/05/14 12:03, Mark Dilger wrote: >> Hackers, >> >> I discovered a reproducible crash using event triggers in the current >> development version, 29c7d5e483acaa74a0d06dd6c70b320bb315. >> I was

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-15 Thread Ildus Kurbangaliev
On Mon, 15 May 2017 17:43:52 +0530 Ashutosh Bapat wrote: > On Mon, May 15, 2017 at 2:46 PM, Ildus Kurbangaliev > wrote: > > On Mon, 15 May 2017 10:34:58 +0530 > > Dilip Kumar wrote: > > > >> On Sun, May

[HACKERS] Increasing parallel workers at runtime

2017-05-15 Thread Haribabu Kommi
In the current parallel implementation, in case if the number of planned workers doesn't available during the start of the query execution, the query starts the execution with the available number of workers till the end of the query. It may be possible that during the query processing the

Re: [HACKERS] Receive buffer size for the statistics socket

2017-05-15 Thread Tom Lane
Heikki Linnakangas writes: > On 05/14/2017 09:54 PM, Tom Lane wrote: >> A further idea is that maybe backends should be tweaked to avoid >> blasting large amounts of data at the stats collector in one go. >> That would require more thought to design, though. > The data is

Re: [HACKERS] Hash Functions

2017-05-15 Thread Jeff Davis
On Sun, May 14, 2017 at 8:00 PM, Bruce Momjian wrote: > Do we even know that floats are precise enough to determine the > partition. For example, if you have 6.1, is it possible for > that to be 5.999 on some systems? Are IEEE systems all the same for > these

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-15 Thread Robert Haas
On Sun, May 14, 2017 at 9:50 PM, Tsunakawa, Takayuki wrote: >> I guess not as well. That would be tricky for the user to have a different >> behavior depending on the error returned by the server, which is why the >> current code is doing things right IMO. Now, the

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-15 Thread Tom Lane
Robert Haas writes: > Takayuki Tsunakawa raised a very similar issue in another thread > related to another open item, namely > https://www.postgresql.org/message-id/flat/0A3221C70F24FB45833433255569204D1F6F5659%40G01JPEXMBYT05 > in which he argued that libpq ought to try

Re: [HACKERS] NOT NULL constraints on range partition key columns

2017-05-15 Thread Robert Haas
On Mon, May 15, 2017 at 9:12 AM, Amit Kapila wrote: > Can't we allow NULL to get inserted into the partition (leaf > partition) if the user uses the partition name in Insert statement? That would be terrible behavior - the behavior of tuple routing should match the

[HACKERS] Re: proposal - using names as primary names of plpgsql function parameters instead $ based names

2017-05-15 Thread Pavel Stehule
2017-05-13 18:26 GMT+02:00 Pavel Stehule : > Hi > > Now, I when I working on plpgsql_check, I have to check function > parameters. I can use fn_vargargnos and out_param_varno for list of > arguments and related varno(s). when I detect some issue, I am using > refname. It

Re: [HACKERS] proposal psql \gdesc

2017-05-15 Thread Pavel Stehule
2017-05-09 23:00 GMT+02:00 Fabien COELHO : > > What about detecting the empty result (eg PQntuples()==0?) and writing >>> "Empty result" instead of the strange looking empty table above? That >>> would >>> just mean skipping the PrintQueryResult call in this case? >>> >> >>

Re: [HACKERS] Hash Functions

2017-05-15 Thread Robert Haas
On Sun, May 14, 2017 at 9:35 PM, Andres Freund wrote: > On 2017-05-14 21:22:58 -0400, Robert Haas wrote: >> but wanting a CHECK constraint that applies to only one partition >> seems pretty reasonable (e.g. CHECK that records for older years are >> all in the 'inactive' state,

Re: [HACKERS] Event triggers + table partitioning cause server crash in current master

2017-05-15 Thread Mark Dilger
> On May 15, 2017, at 6:49 AM, Mark Dilger wrote: > > I can confirm that this fixes the crash that I was seeing. I have read > through the patch briefly, but will give it a more thorough review in the > next few hours. My only negative comment is that your patch

Re: [HACKERS] transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-15 Thread Kevin Grittner
[Apologies to all for my recent absence from community lists, and special thanks to Thomas and Robert for picking up the slack.] On Tue, May 9, 2017 at 4:51 PM, Thomas Munro wrote: > On Tue, May 9, 2017 at 10:29 PM, Thomas Munro >

Re: [HACKERS] Small improvement to compactify_tuples

2017-05-15 Thread Alvaro Herrera
Sokolov Yura wrote: > Sokolov Yura писал 2017-05-15 18:23: > > Alvaro Herrera писал 2017-05-15 18:04: > > > Please add these two patches to the upcoming commitfest, > > > https://commitfest.postgresql.org/ > > > > Thank you for suggestion. > > > > I've created

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-15 Thread Tom Lane
Robert Haas writes: > On Sun, May 14, 2017 at 9:50 PM, Tsunakawa, Takayuki > wrote: >> By the way, could you elaborate what problem could occur if my solution is >> applied? (it doesn't seem easy for me to imagine...) > Sure. Imagine

[HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-15 Thread Robert Haas
On Sun, May 14, 2017 at 11:45 PM, Noah Misch wrote: >> I'll add this item in the PostgreSQL 10 Open Items. > > [Action required within three days. This is a generic notification.] I think there is a good argument that the existing behavior is as per the documentation, but I

Re: [HACKERS] Hash Functions

2017-05-15 Thread Mark Dilger
> On May 15, 2017, at 7:48 AM, Jeff Davis wrote: > > On Sun, May 14, 2017 at 6:22 PM, Robert Haas wrote: >> You'd have to prohibit a heck of a lot more than that in order for >> this to work 100% reliably. You'd have to prohibit CHECK constraints, >>

Re: [HACKERS] Hash Functions

2017-05-15 Thread David Fetter
On Mon, May 15, 2017 at 03:26:02PM -0400, Robert Haas wrote: > On Sun, May 14, 2017 at 9:35 PM, Andres Freund wrote: > > On 2017-05-14 21:22:58 -0400, Robert Haas wrote: > >> but wanting a CHECK constraint that applies to only one partition > >> seems pretty reasonable (e.g.

Re: [HACKERS] [POC] hash partitioning

2017-05-15 Thread Ashutosh Bapat
On Mon, May 15, 2017 at 9:13 PM, Robert Haas wrote: > On Mon, May 15, 2017 at 6:57 AM, amul sul wrote: >>> Collation is only relevant for ordering, not equality. Since hash >>> opclasses provide only equality, not ordering, it's not relevant here. >>>

Re: [HACKERS] Duplicate usage of tablespace location?

2017-05-15 Thread Kyotaro HORIGUCHI
Hi, At Mon, 15 May 2017 14:35:20 +0900, Michael Paquier wrote in > On Thu, May 11, 2017 at 1:09 PM, Kyotaro HORIGUCHI > wrote: > > If we can accept multiple server

[HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-15 Thread Thomas Munro
Hi hackers, I you hit ^d while COPY FROM STDIN is reading then subsequent COPY FROM STDIN commands return immediately. That's because we never clear the end-of-file state on the libc FILE. Shouldn't we do that, perhaps with something like the attached? -- Thomas Munro

Re: [HACKERS] Obsolete sentence in CREATE SUBSCRIPTION docs

2017-05-15 Thread Tom Lane
Masahiko Sawada writes: > I found $subject while reading documentation. I guess this should have > updated when we reworked options syntax. Pushed, thanks. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] src/test/ssl/t/001_ssltests.pl should not tromp on file permissions

2017-05-15 Thread Michael Paquier
On Tue, May 16, 2017 at 7:05 AM, Tom Lane wrote: > I got tripped up while building the 10beta1 tarballs by the fact > that src/test/ssl/ssl/client.key had permissions 0600 in my git > checkout. After a fair amount of head-scratching, I figured out > that this must have been a

Re: [HACKERS] src/test/ssl/t/001_ssltests.pl should not tromp on file permissions

2017-05-15 Thread Tom Lane
Michael Paquier writes: > On Tue, May 16, 2017 at 7:05 AM, Tom Lane wrote: >> We could maybe make 001_ssltests.pl save and restore the file's >> permissions, but I think probably a cleaner answer is to have it >> make a temporary copy and set the

Re: [HACKERS] Small improvement to compactify_tuples

2017-05-15 Thread Sokolov Yura
Sokolov Yura писал 2017-05-15 18:23: Alvaro Herrera писал 2017-05-15 18:04: Please add these two patches to the upcoming commitfest, https://commitfest.postgresql.org/ Thank you for suggestion. I've created https://commitfest.postgresql.org/14/1138/ As I could understand, I should attach

Re: [HACKERS] [POC] hash partitioning

2017-05-15 Thread Robert Haas
On Mon, May 15, 2017 at 6:57 AM, amul sul wrote: >> Collation is only relevant for ordering, not equality. Since hash >> opclasses provide only equality, not ordering, it's not relevant here. >> I'm not sure whether we should error out if it's specified or just >> silently

Re: [HACKERS] [POC] hash partitioning

2017-05-15 Thread Dilip Kumar
On Mon, May 15, 2017 at 9:06 PM, Dilip Kumar wrote: > Test2: > postgres=# insert into x2 values(100); -- it should violates > partition constraint > INSERT 0 1 > > Seems like a bug or am I missing something completely? Sorry, my bad. It's modulus on the hashvalue, not

Re: [HACKERS] Create publication syntax is not coming properly in pg_dump / pg_dumpall

2017-05-15 Thread Tom Lane
Masahiko Sawada writes: > Hm, It's a bug of pg_dump. Attached patch should fix both pg_dump and > pg_dumpall. Pushed, thanks. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Increasing parallel workers at runtime

2017-05-15 Thread Robert Haas
On Mon, May 15, 2017 at 10:06 AM, Haribabu Kommi wrote: > This still needs some adjustments to fix for the cases where > the main backend also does the scan instead of waiting for > the workers to finish the job. As increasing the workers logic > shouldn't add an

Re: [HACKERS] postgres 9.6.2 update breakage

2017-05-15 Thread Peter Eisentraut
On 5/15/17 02:48, Roel Janssen wrote: > Ah yes, I see the point. The problem here is that when new features are > added to PostgreSQL, and you rely upon them in your database schemas, > downgrading will most likely cause loss of information. > > Maybe we need a wrapper script that also makes a

Re: [HACKERS] CTE inlining

2017-05-15 Thread Adam Brusselback
>From a user's perspective: >I think most people prefer #2 because: > >* most users writing queries prefer #2 > >* most users assume full optimization and it seems natural to turn > > _off_ an optimization via a keyword > >* while some queries can be inlined, all queries can be

[HACKERS] src/test/ssl/t/001_ssltests.pl should not tromp on file permissions

2017-05-15 Thread Tom Lane
I got tripped up while building the 10beta1 tarballs by the fact that src/test/ssl/ssl/client.key had permissions 0600 in my git checkout. After a fair amount of head-scratching, I figured out that this must have been a side-effect of having run the SSL regression tests at some point in the past.

Re: [HACKERS] Relcache leak when row triggers on partitions are fired by COPY

2017-05-15 Thread Thomas Munro
On Tue, May 16, 2017 at 12:32 PM, Amit Langote wrote: > I vote for ExecCleanupTriggerState(estate). After your patch, there will > be 4 places, including afterTriggerInvokeEvents(), ExecEndPlan(), and > EvalPlanQualEnd(), that repeat the same block of code. Ok,

Re: [HACKERS] Server Crashes if try to provide slot_name='none' at the time of creating subscription.

2017-05-15 Thread Masahiko Sawada
On Mon, May 15, 2017 at 8:09 PM, Masahiko Sawada wrote: > On Mon, May 15, 2017 at 8:06 PM, Kuntal Ghosh > wrote: >> On Mon, May 15, 2017 at 4:00 PM, Masahiko Sawada >> wrote: >>> On Mon, May 15, 2017 at 6:41 PM, tushar

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-15 Thread Michael Paquier
On Tue, May 16, 2017 at 3:13 AM, Tom Lane wrote: > FWIW, I think the position most of us were taking is that this feature > is meant to retry transport-level connection failures, not cases where > we successfully make a connection to a server and then it rejects our > login

[HACKERS] Relcache leak when row triggers on partitions are fired by COPY

2017-05-15 Thread Thomas Munro
Hi hackers, While testing the patch I'm writing for the transition table open item, I noticed that we can leak Relation objects like this: postgres=# create table parent (a text, b int) partition by list (a); CREATE TABLE postgres=# create table child partition of parent for values in ('AAA');

Re: [HACKERS] Relcache leak when row triggers on partitions are fired by COPY

2017-05-15 Thread Amit Langote
Hi Thomas, On 2017/05/16 9:12, Thomas Munro wrote: > Hi hackers, > > While testing the patch I'm writing for the transition table open > item, I noticed that we can leak Relation objects like this: > > postgres=# create table parent (a text, b int) partition by list (a); > CREATE TABLE >

Re: [HACKERS] Relcache leak when row triggers on partitions are fired by COPY

2017-05-15 Thread Amit Langote
On 2017/05/16 10:03, Thomas Munro wrote: > On Tue, May 16, 2017 at 12:32 PM, Amit Langote > wrote: >> I vote for ExecCleanupTriggerState(estate). After your patch, there will >> be 4 places, including afterTriggerInvokeEvents(), ExecEndPlan(), and >>

Re: [HACKERS] Receive buffer size for the statistics socket

2017-05-15 Thread Tom Lane
I wrote: > I propose that it'd be a good idea to try to set the stats socket's > receive buffer size to be a minimum of, say, 100K on all platforms. > Code for this would be analogous to what we already have in pqcomm.c > (circa line 760) for forcing up the send buffer size, but SO_RCVBUF > not

[HACKERS] Obsolete sentence in CREATE SUBSCRIPTION docs

2017-05-15 Thread Masahiko Sawada
Hi, I found $subject while reading documentation. I guess this should have updated when we reworked options syntax. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_create_subscription_doc.patch Description: Binary data -- Sent via

Re: [HACKERS] Event triggers + table partitioning cause server crash in current master

2017-05-15 Thread Amit Langote
On 2017/05/16 1:18, Mark Dilger wrote: > >> On May 15, 2017, at 6:49 AM, Mark Dilger wrote: >> >> I can confirm that this fixes the crash that I was seeing. I have read >> through the patch briefly, but will give it a more thorough review in the >> next few hours.

Re: [HACKERS] CTE inlining

2017-05-15 Thread David Rowley
On 13 May 2017 at 08:39, Bruce Momjian wrote: > To summarize, it seems we have two options if we want to add fence > control to CTEs: > > 1. add INLINE to disable the CTE fence > 2. add MATERIALIZE to enable the CTE fence I think #1 is out of the question. What would we do

Re: [HACKERS] [POC] hash partitioning

2017-05-15 Thread amul sul
On Mon, May 15, 2017 at 9:13 PM, Robert Haas wrote: > On Mon, May 15, 2017 at 6:57 AM, amul sul wrote: >>> Collation is only relevant for ordering, not equality. Since hash >>> opclasses provide only equality, not ordering, it's not relevant here. >>>

Re: [HACKERS] Small improvement to compactify_tuples

2017-05-15 Thread Alvaro Herrera
Please add these two patches to the upcoming commitfest, https://commitfest.postgresql.org/ -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] Cached plans and statement generalization

2017-05-15 Thread Robert Haas
On Wed, May 10, 2017 at 12:11 PM, Konstantin Knizhnik wrote: > Robert, can you please explain why using TRY/CATCH is not safe here: >> >> This is definitely not a safe way of using TRY/CATCH. This has been discussed many, many times on this mailing list before, and I

Re: [HACKERS] [POC] hash partitioning

2017-05-15 Thread Dilip Kumar
On Mon, May 15, 2017 at 4:27 PM, amul sul wrote: > Updated patches attached. While testing latest patch I found a strange behaviour. test1: postgres=# create table x (a int) partition by hash(a); CREATE TABLE postgres=# create table x1 partition of x for values with (modulus

Re: [HACKERS] Small improvement to compactify_tuples

2017-05-15 Thread Sokolov Yura
Alvaro Herrera писал 2017-05-15 18:04: Please add these two patches to the upcoming commitfest, https://commitfest.postgresql.org/ Thank you for suggestion. I've created https://commitfest.postgresql.org/14/1138/ As I could understand, I should attach both patches to single email to be show

Re: [HACKERS] bumping HASH_VERSION to 3

2017-05-15 Thread Robert Haas
On Mon, May 15, 2017 at 12:08 AM, Noah Misch wrote: > The above-described topic is currently a PostgreSQL 10 open item. Robert, > since you committed the patch believed to have created it, you own this open > item. If some other commit is more relevant or if this does not

Re: [HACKERS] Hash Functions

2017-05-15 Thread David Fetter
On Mon, May 15, 2017 at 07:48:14AM -0700, Jeff Davis wrote: > This would mean we need to reload through the root as Andres and > others suggested, One refinement of this would be to traverse the partition tree, stopping at the first place where the next branch has hash partitions, or at any rate