[HACKERS] How to refer to resource files from UDFs written in C

2017-06-08 Thread Supun Nakandala
Hi hackers, I am trying to extend PostgreSQL by adding UDT and UDF for a custom use case and I am using C language extensions to do that. However, I have a requirement of reading a text file from one of the C functions. The compiled *.so files are placed in the "pg_config --pkglibdir" directory

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

2017-06-08 Thread Amit Langote
On 2017/06/08 19:25, Ashutosh Bapat wrote: > On Thu, Jun 8, 2017 at 3:13 PM, Amit Langote >>> I think this code could be removed entirely in light of commit >>> 3ec76ff1f2cf52e9b900349957b42d28128b7bc7. >> >> I am assuming you think that because now we emit IS NOT NULL constraint >> internally for

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-06-08 Thread Mithun Cy
I have merged Rafia's patch for cosmetic changes. I have also fixed some of the changes you have recommended over that. But kept few as it is since Rafia's opinion was needed on that. On Wed, Jun 7, 2017 at 5:57 PM, Robert Haas wrote: > My experience is the opposite. If I

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-06-08 Thread Mithun Cy
On Tue, Jun 6, 2017 at 3:48 PM, Neha Sharma wrote: > Hi, > > I have been testing this feature for a while and below are the observations > for few scenarios. > > Observation: > scenario 1: If we set pg_prewarm.dump_interval = -1.0,we get an additional > warning

[HACKERS] Transition tables vs ON CONFLICT

2017-06-08 Thread Thomas Munro
[Moving this to its own thread, for earlier discussion see the transition-tables-vs-wCTE thread[1].] On Wed, Jun 7, 2017 at 10:47 AM, Peter Geoghegan wrote: > I suppose you'll need two tuplestores for the ON CONFLICT DO UPDATE > case -- one for updated tuples, and the other for

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Thomas Munro
On Wed, Jun 7, 2017 at 5:36 PM, Thomas Munro wrote: > I spent a couple of hours drafting a proof-of-concept to see if my > hunch was right. It seems to work correctly so far and isn't huge > (but certainly needs more testing and work): > > 6 files changed, 156

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

2017-06-08 Thread Thomas Munro
On Mon, May 22, 2017 at 5:51 PM, Amit Langote wrote: > On 2017/05/20 9:01, Thomas Munro wrote: >> Sent too soon. Several variables should also be renamed to make clear >> they refer to the transition capture state in effect, instead of vague >> names like

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-08 Thread Tom Lane
Andres Freund writes: > On 2017-06-08 23:05:53 -0400, Tom Lane wrote: >> ... The first >> attached patch does it that way, and it seems nice and clean, but I ran >> into a complete dead end while trying to extend it to handle related cases >> such as disallowing

Re: [HACKERS] UPDATE of partition key

2017-06-08 Thread Amit Khandekar
On 7 June 2017 at 20:19, Amit Khandekar wrote: > On 7 June 2017 at 16:42, Amit Khandekar wrote: >> The column bitmap set returned by GetUpdatedColumns() refer to >> attribute numbers w.r.t. to the root partition. And the >> mstate->resultRelInfo[]

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-08 Thread Andres Freund
Hi, On 2017-06-08 23:05:53 -0400, Tom Lane wrote: > I spent some time experimenting with this, and immediately found out > that information_schema.user_mapping_options contains an instance of the > problematic usage :-(. However, that view also turns out to be a poster > child for why our old

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-08 Thread Tom Lane
I wrote: > As to *how* to throw an error, I think it should be possible to teach > parse analysis to detect such cases, with something like the > ParseExprKind mechanism that could be checked to see if we're inside > a subexpression that restricts what's allowed. There are some other > checks

Re: [HACKERS] Re: [GSOC 17] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-06-08 Thread Mengxing Liu
Thank you very much! I follow your advice and here is the result. SerializableXactHashLock 73 predicate_lock_manager 605 WALWriteLock 3 SerializableFinishedListLock 665 There are more than 90 events each time. SerializableXactHashLock/SerializableFinishedListLock are both used in SSI. I

Re: [HACKERS] walsender termination error messages worse in v10

2017-06-08 Thread Alvaro Herrera
Petr Jelinek wrote: > It took me a while to understand why walreceiver does this originally, > but it did make sense to me once I understood the [...], so I did it > the same way. In other words, the coding pattern needs a comment in both places. -- Álvaro Herrera

[HACKERS] Fix comment in shm_mq.c

2017-06-08 Thread Masahiko Sawada
Hi, Attached patch for $subject. /* * Set sender's latch, unless queue is detached. */ static shm_mq_result shm_mq_notify_receiver(volatile shm_mq *mq) I think shm_mq_notify_receiver() sets receiver's latch actually, not sender's latch. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND

Re: [HACKERS] logical replication busy-waiting on a lock

2017-06-08 Thread Petr Jelinek
On 09/06/17 01:06, Andres Freund wrote: > Hi, > > On 2017-06-03 04:50:00 +0200, Petr Jelinek wrote: >> One thing I don't like is the GetLastLocalTransactionId() that I had to >> add because we clear the proc->lxid before we get to AtEOXact_Snapshot() >> but I don't have better solution there. >

Re: [HACKERS] walsender termination error messages worse in v10

2017-06-08 Thread Petr Jelinek
On 08/06/17 23:57, Andres Freund wrote: > On 2017-06-03 00:55:22 +0200, Petr Jelinek wrote: >> On 02/06/17 23:45, Andres Freund wrote: >>> Hi Petr, >>> >>> On 2017-06-02 22:57:37 +0200, Petr Jelinek wrote: On 02/06/17 20:51, Andres Freund wrote: > I don't understand why the new block is

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Thomas Munro
On Thu, Jun 8, 2017 at 11:50 AM, Thomas Munro wrote: > On Thu, Jun 8, 2017 at 11:05 AM, Thomas Munro > wrote: >> 1. Keep the current behaviour. [...] >> >> 2. Make a code change that would split the 'new table' tuplestore in >> two:

Re: [HACKERS] logical replication busy-waiting on a lock

2017-06-08 Thread Andres Freund
Hi, On 2017-06-03 04:50:00 +0200, Petr Jelinek wrote: > One thing I don't like is the GetLastLocalTransactionId() that I had to > add because we clear the proc->lxid before we get to AtEOXact_Snapshot() > but I don't have better solution there. I dislike that quite a bit - how about we instead

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

2017-06-08 Thread Andres Freund
On 2017-06-07 11:51:12 +0200, Petr Jelinek wrote: > On 07/06/17 03:00, Andres Freund wrote: > > On 2017-06-06 19:36:13 +0200, Petr Jelinek wrote: > > > >> As a side note, we are starting to have several IsSomeTypeOfProcess > >> functions for these kind of things. I wonder if bgworker

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Robert Haas
On Tue, Jun 6, 2017 at 8:19 PM, Peter Geoghegan wrote: > On Tue, Jun 6, 2017 at 5:01 PM, Peter Geoghegan wrote: >> Also, ISTM that the code within ENRMetadataGetTupDesc() probably >> requires more explanation, resource management wise. Why so? I'm not saying you're

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2017-06-08 Thread Peter Geoghegan
On Wed, Jun 7, 2017 at 12:34 PM, Alex K wrote: > (1) One of my mentors--Alvaro Herrera--suggested me to have a look on the > UPSERT. > It may be a good point to be able to achieve the same functionality > as during the ON CONFLICT DO NOTHING, when COPY actually

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Robert Haas
On Thu, Jun 8, 2017 at 5:01 PM, Andrew Gierth wrote: >> "Robert" == Robert Haas writes: > Robert> unless some other committer volunteers. (Of course, anyone > Robert> could step in to do the work, as Thomas already has to a > Robert>

Re: [HACKERS] walsender termination error messages worse in v10

2017-06-08 Thread Andres Freund
On 2017-06-03 00:55:22 +0200, Petr Jelinek wrote: > On 02/06/17 23:45, Andres Freund wrote: > > Hi Petr, > > > > On 2017-06-02 22:57:37 +0200, Petr Jelinek wrote: > >> On 02/06/17 20:51, Andres Freund wrote: > >>> I don't understand why the new block is there, nor does the commit > >>> message

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Tom Lane
Robert Haas writes: > I don't really like either option, because, on the one hand, this is a > pretty invasive thing to go rip out -- maybe we don't have to rip out > the entire patch series, but just some of the later patches? -- and on > the other hand, keeping it in the

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Thomas Munro
On Fri, Jun 9, 2017 at 8:41 AM, Andrew Gierth wrote: >> "Thomas" == Thomas Munro writes: > > Thomas> So, afterTriggers.query_stack is used to handle the reentrancy > Thomas> that results from triggers running further statements

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Andrew Gierth
> "Robert" == Robert Haas writes: Robert> unless some other committer volunteers. (Of course, anyone Robert> could step in to do the work, as Thomas already has to a Robert> considerable degree, but without a committer involved it Robert> doesn't fix the problem.)

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Andrew Gierth
> "Thomas" == Thomas Munro writes: Thomas> So, afterTriggers.query_stack is used to handle the reentrancy Thomas> that results from triggers running further statements that Thomas> might fire triggers. It isn't used for dealing with extra Thomas>

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Peter Geoghegan
On Thu, Jun 8, 2017 at 1:20 PM, Robert Haas wrote: > I am not sure that I entirely agree with you on these points, but I > don't want to debate it further and especially not on a public mailing > list. Fair enough. > I'm going to spend some time over the next ~24 hours

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Robert Haas
On Thu, Jun 8, 2017 at 2:55 PM, Peter Geoghegan wrote: > It does seem like Kevin could have done better there. However, I think > that Kevin was taking responsibility for the situation, and that it > wasn't accurate to suggest he blamed others. I thought his account of > the

Re: [HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Andrew Dunstan
On 06/08/2017 03:06 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 06/08/2017 02:26 PM, Tom Lane wrote: >>> Yeah, if the (regconfig,text) one is considered immutable, I don't see >>> why the other two aren't. The justification for the other three being >>>

Re: [HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Tom Lane
Andrew Dunstan writes: > On 06/08/2017 02:26 PM, Tom Lane wrote: >> Yeah, if the (regconfig,text) one is considered immutable, I don't see >> why the other two aren't. The justification for the other three being >> only stable is that they depend on

Re: [HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Andrew Dunstan
On 06/08/2017 02:26 PM, Tom Lane wrote: > Josh Berkus writes: >> select proname, prosrc, proargtypes, provolatile from pg_proc where >> proname = 'to_tsvector'; > Slightly more readable version: > > regression=# select oid::regprocedure, provolatile, proparallel from pg_proc >

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Peter Geoghegan
On Thu, Jun 8, 2017 at 11:32 AM, Robert Haas wrote: > I understood the same. However, he didn't review or commit any of the > bug fix patches that Thomas posted in May, or even respond to the > mailing list threads. I eventually reviewed and committed them to > avoid

Re: [HACKERS] strange error message from slave when connection to master cannot be established

2017-06-08 Thread Robert Haas
On Thu, Jun 8, 2017 at 1:17 PM, Pavel Stehule wrote: > 2017-06-08 17:19 GMT+02:00 Robert Haas : >> On Wed, Jun 7, 2017 at 12:30 PM, Pavel Stehule >> wrote: >> > I got strange error message - false message - max connection

Re: [HACKERS] HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

2017-06-08 Thread Jim Van Fleet
pgsql-hackers-ow...@postgresql.org wrote on 06/07/2017 04:06:57 PM: ... > > > > Did you intend to attach a patch? > Yes I do -- tomorrow or Thursday -- needs a little cleaning up ... meant Friday > > > > Sokolov Yura has a patch which, to me, looks good for pgbench rw > > > performance. Does

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Robert Haas
On Thu, Jun 8, 2017 at 2:05 PM, Peter Geoghegan wrote: > On Thu, Jun 8, 2017 at 10:59 AM, Robert Haas wrote: >> More generally, I don't think there's ever a >> time when it's OK to commit a patch that you're not willing to put at >> least some effort into

Re: [HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Tom Lane
Josh Berkus writes: > select proname, prosrc, proargtypes, provolatile from pg_proc where > proname = 'to_tsvector'; Slightly more readable version: regression=# select oid::regprocedure, provolatile, proparallel from pg_proc where proname = 'to_tsvector'; oid

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Bruce Momjian
On Thu, Jun 8, 2017 at 11:05:43AM -0700, Peter Geoghegan wrote: > On Thu, Jun 8, 2017 at 10:59 AM, Robert Haas wrote: > > More generally, I don't think there's ever a > > time when it's OK to commit a patch that you're not willing to put at > > least some effort into

[HACKERS] jsonb_to_tsvector should be immutable

2017-06-08 Thread Josh Berkus
Wanted to pull this out of my general report, because nobody seems to have seen it: P3: apparently jsonb_to_tsvector with lang parameter isn't immutable? This means that it can't be used for indexing: libdata=# create index bookdata_fts on bookdata using gin (( to_tsvector('english',bookdata)));

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Peter Geoghegan
On Thu, Jun 8, 2017 at 10:59 AM, Robert Haas wrote: > More generally, I don't think there's ever a > time when it's OK to commit a patch that you're not willing to put at > least some effort into fixing up afterwards. Kevin said "It has become clear that the scope of

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Robert Haas
On Thu, Jun 8, 2017 at 1:48 PM, Heikki Linnakangas wrote: > On 06/08/2017 08:36 PM, Robert Haas wrote: >> >> I freely admit I encouraged you to commit this. I did not imagine >> that would be followed immediately by abdicating all responsibility >> for it. My mistake, I guess.

Re: [HACKERS] pgbench tap tests & minor fixes

2017-06-08 Thread Fabien COELHO
Hello Nikolay, I did some investigation: The code there really suppose that there is always \n at the end of the line, and truncates the line. It is done in /* Get location of the ending newline */ end_offset = expr_scanner_offset(sstate) - 1; just two lines above the code we are discussing.

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-08 Thread Tom Lane
"'Andres Freund'" writes: > On 2017-06-08 11:57:49 -0400, Regina Obe wrote: >> My main concern in these cases is the short-circuiting not happening. > Note there's also no short-circuiting e.g. for aggregates inside case > either. Well, depends. If const-folding manages to

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Heikki Linnakangas
On 06/08/2017 08:36 PM, Robert Haas wrote: I freely admit I encouraged you to commit this. I did not imagine that would be followed immediately by abdicating all responsibility for it. My mistake, I guess. Robert, chill out. Kevin offered to revert. It's perhaps not the best way forward -

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-08 Thread Robert Haas
On Wed, Jun 7, 2017 at 5:47 PM, Kevin Grittner wrote: > It has become clear that the scope of problems being found now > exceed what I can be sure of being able to fix in time to make for a > stable release, in spite of the heroic efforts Thomas has been > putting in. I had

Re: [HACKERS] strange error message from slave when connection to master cannot be established

2017-06-08 Thread Pavel Stehule
2017-06-08 17:19 GMT+02:00 Robert Haas : > On Wed, Jun 7, 2017 at 12:30 PM, Pavel Stehule > wrote: > > I got strange error message - false message - max connection is less on > > slave than on master, although these numbers was same. The issue was

Re: [HACKERS] Notes on testing Postgres 10b1

2017-06-08 Thread Josh Berkus
On 06/07/2017 06:37 PM, Peter Eisentraut wrote: > On 6/7/17 21:19, Josh Berkus wrote: >> The user's first thought is going to be a network issue, or a bug, or >> some other problem, not a missing PK. Yeah, they can find that >> information in the logs, but only if they think to look for it in the

Re: [HACKERS] Notes on testing Postgres 10b1

2017-06-08 Thread Josh Berkus
On 06/07/2017 07:01 PM, Petr Jelinek wrote: > On 08/06/17 03:50, Josh Berkus wrote: >> On 06/07/2017 06:25 PM, Petr Jelinek wrote: >>> On 08/06/17 03:19, Josh Berkus wrote: Peter and Petr: On 06/07/2017 05:24 PM, Peter Eisentraut wrote: > On 6/7/17 01:01, Josh Berkus wrote:

Re: [HACKERS] UPDATE of partition key

2017-06-08 Thread Robert Haas
On Thu, Jun 8, 2017 at 7:01 AM, Amit Kapila wrote: > On Thu, Jun 8, 2017 at 1:33 AM, Robert Haas wrote: >> On Wed, Jun 7, 2017 at 5:46 AM, Amit Kapila wrote: >>> As far as I understand, it is to ensure that for deleted

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-08 Thread 'Andres Freund'
On 2017-06-08 11:57:49 -0400, Regina Obe wrote: > My main concern in these cases is the short-circuiting not happening. Note there's also no short-circuiting e.g. for aggregates inside case either. - Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

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

2017-06-08 Thread Robert Haas
On Wed, Jun 7, 2017 at 5:47 AM, Ashutosh Bapat wrote: > On Sat, Jun 3, 2017 at 2:11 AM, Robert Haas wrote: >> >> + errmsg("default partition contains row(s) >> that would overlap with partition being created"))); >>

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

2017-06-08 Thread Robert Haas
On Wed, Jun 7, 2017 at 1:59 AM, amul sul wrote: > But Ashutosh's suggestion make sense, we might have constraints other > than that partitioning constraint on default partition. If those > constraints refutes the new partition's constraints, we should skip > the scan. Right.

Re: [HACKERS] Long binded parameter value in the postgres log

2017-06-08 Thread Masahiko Sawada
On Thu, Jun 8, 2017 at 5:00 PM, Nikitin Nikolay wrote: > Hi! > > > > We insert many rows with long text and bytea (about 500 MB) values. In the > postgres config we set log_min_duration_statement to 120 seconds. > > If this statements work more 120 seconds then they

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-08 Thread Regina Obe
> But this line of thinking does strengthen my feeling that throwing an error is the right thing to do for the moment. If we allow v10 to accept such cases but do something different from what we used to, that > will greatly complicate any future attempt to try to restore the old behavior. >

Re: [HACKERS] List of hostaddrs not supported

2017-06-08 Thread David G. Johnston
On Thu, Jun 8, 2017 at 8:18 AM, Robert Haas wrote: > Whatever you put in the hostaddr field - or any field other than host > and port - is one entry. There is no notion of a list of entries in > any other field, and no attempt to split any other field on a comma or > any

Re: [HACKERS] strange error message from slave when connection to master cannot be established

2017-06-08 Thread Robert Haas
On Wed, Jun 7, 2017 at 12:30 PM, Pavel Stehule wrote: > I got strange error message - false message - max connection is less on > slave than on master, although these numbers was same. The issue was in > wrong connection string in recovery conf and slave cannot to check

Re: [HACKERS] List of hostaddrs not supported

2017-06-08 Thread Robert Haas
On Thu, Jun 8, 2017 at 10:50 AM, Tom Lane wrote: > Robert Haas writes: >> It doesn't seem like a problem to me if somebody else wants to extend >> it to hostaddr, though. Whether that change belongs in v10 or v11 is >> debatable. I would object to

Re: [HACKERS] Does pg_upgrade really support "make installcheck"?

2017-06-08 Thread Tom Lane
Andrew Dunstan writes: > The whole thing is explained here: > > And since then the buildfarm has acquired a separate optional module > that tests pg_upgrade. It's enabled by default in the

Re: [HACKERS] List of hostaddrs not supported

2017-06-08 Thread Tom Lane
Robert Haas writes: > It doesn't seem like a problem to me if somebody else wants to extend > it to hostaddr, though. Whether that change belongs in v10 or v11 is > debatable. I would object to adding this as an open item with me as > the owner because doesn't seem to me

Re: [HACKERS] Does pg_upgrade really support "make installcheck"?

2017-06-08 Thread Andrew Dunstan
On 06/08/2017 03:04 AM, Neha Khatri wrote: > On 6/7/17, Tom Lane wrote: >> src/bin/pg_upgrade/TESTING claims (much further down in the file >> than I'd like): >> >> The shell script test.sh in this directory performs more or less this >> procedure. You can invoke

Re: [HACKERS] List of hostaddrs not supported

2017-06-08 Thread Robert Haas
On Thu, Jun 8, 2017 at 4:36 AM, Heikki Linnakangas wrote: > So, this is all quite confusing. I think we should support a list of > hostaddrs, to go with the list of hostnames. It seems like a strange > omission. Looking at the archives, it was mentioned a few times when this >

Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages

2017-06-08 Thread Dilip Kumar
On Thu, May 18, 2017 at 8:07 PM, Robert Haas wrote: Thanks for the feedback and sorry for the delayed response. > You might need to adjust effective_cache_size. You are right. But, effective_cache_size will have the impact on the number of pages_fetched when it's used as

Re: [HACKERS] Broken hint bits (freeze)

2017-06-08 Thread Amit Kapila
On Thu, Jun 8, 2017 at 6:49 PM, Dmitriy Sarafannikov wrote: > >> Why didn't rsync made the copies on master and replica same? > > Because rsync was running with —size-only flag. > IIUC the situation, the new WAL and updated pg_control file has been copied, but not

Re: [HACKERS] List of hostaddrs not supported

2017-06-08 Thread Tom Lane
Heikki Linnakangas writes: > So, this is all quite confusing. I think we should support a list of > hostaddrs, to go with the list of hostnames. It seems like a strange > omission. +1, if it's not too large a patch. It could be argued that this is a new feature and should

Re: [HACKERS] Broken hint bits (freeze)

2017-06-08 Thread Dmitriy Sarafannikov
> Why didn't rsync made the copies on master and replica same? Because rsync was running with —size-only flag. > I haven't looked in detail, but it sounds slightly risky proposition > to manipulate the tuples by writing C functions of the form you have > in your code. I would have preferred

Re: [HACKERS] Broken hint bits (freeze)

2017-06-08 Thread Amit Kapila
On Fri, Jun 2, 2017 at 4:20 PM, Dmitriy Sarafannikov wrote: > Thanks for all. > > We found the source of the problem. It was mistake in upgrade to 9.6. > > We upgrade replica with rsync as it is in the documentation: > rsync --verbose --relative --archive --hard-links

Re: [HACKERS] Parallel Aggregation support for aggregate functions that use transitions not implemented for array_agg

2017-06-08 Thread Ashutosh Bapat
On Wed, Jun 7, 2017 at 10:55 PM, Robert Haas wrote: > On Tue, Jun 6, 2017 at 3:23 PM, David Fetter wrote: >> I'd bet on lack of tuits. > > I expect that was part of it. Another thing to consider is that, for > numeric aggregates, the transition values

Re: [HACKERS] [BUGS] Crash observed during the start of the Postgres process

2017-06-08 Thread K S, Sandhya (Nokia - IN/Bangalore)
Hi Tom Lane, After removing our patch to change FATAL to LOG, we are not observing the crash now. Thank you for your support. We were struck with this issue for a while. Regards, Sandhya -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Friday, May 12, 2017 10:08

[HACKERS] Long binded parameter value in the postgres log

2017-06-08 Thread Nikitin Nikolay
Hi! We insert many rows with long text and bytea (about 500 MB) values. In the postgres config we set log_min_duration_statement to 120 seconds. If this statements work more 120 seconds then they will be written into the postgres log with parameter values. As a result, the postgres log

Re: [HACKERS] UPDATE of partition key

2017-06-08 Thread Amit Kapila
On Thu, Jun 8, 2017 at 1:33 AM, Robert Haas wrote: > On Wed, Jun 7, 2017 at 5:46 AM, Amit Kapila wrote: >> As far as I understand, it is to ensure that for deleted rows, nothing >> more needs to be done. For example, see the below check in >>

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

2017-06-08 Thread Jeevan Ladhe
Thanks Ashutosh, On Thu, Jun 8, 2017 at 4:04 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Thu, Jun 8, 2017 at 2:54 PM, Ashutosh Bapat > wrote: > > On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe > > wrote: > > >

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

2017-06-08 Thread Ashutosh Bapat
On Thu, Jun 8, 2017 at 2:54 PM, Ashutosh Bapat wrote: > On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe > wrote: > >> >>> >>> The code in check_default_allows_bound() to check whether the default >>> partition >>> has any rows that

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

2017-06-08 Thread Ashutosh Bapat
On Thu, Jun 8, 2017 at 3:13 PM, Amit Langote wrote: > On 2017/06/08 1:44, Robert Haas wrote: >> On Wed, Jun 7, 2017 at 7:47 AM, Ashutosh Bapat >> wrote: >>> In ATExecAttachPartition() there's following code >>> >>> 13715

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

2017-06-08 Thread Amit Langote
On 2017/06/08 1:44, Robert Haas wrote: > On Wed, Jun 7, 2017 at 7:47 AM, Ashutosh Bapat > wrote: >> In ATExecAttachPartition() there's following code >> >> 13715 partnatts = get_partition_natts(key); >> 13716 for (i = 0; i < partnatts; i++) >>

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

2017-06-08 Thread Ashutosh Bapat
On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe wrote: > >> >> The code in check_default_allows_bound() to check whether the default >> partition >> has any rows that would fit new partition looks quite similar to the code >> in >> ATExecAttachPartition() checking

[HACKERS] List of hostaddrs not supported

2017-06-08 Thread Heikki Linnakangas
While testing libpq and GSS the other day, I was surprised by the behavior of the host and hostaddr libpq options, if you specify a list of hostnames. I did this this, and it took me quite a while to figure out what was going on: $ psql "dbname=postgres hostaddr=::1

Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is coming for table which is already removed

2017-06-08 Thread Masahiko Sawada
On Thu, Jun 8, 2017 at 5:36 AM, Peter Eisentraut wrote: > On 5/30/17 13:25, Masahiko Sawada wrote: >> I think this cause is that the relation status entry could be deleted >> by ALTER SUBSCRIPTION REFRESH before corresponding table sync worker >> starting.

Re: [HACKERS] Does pg_upgrade really support "make installcheck"?

2017-06-08 Thread Neha Khatri
On 6/7/17, Tom Lane wrote: > src/bin/pg_upgrade/TESTING claims (much further down in the file > than I'd like): > > The shell script test.sh in this directory performs more or less this > procedure. You can invoke it by running > make check > or by

[HACKERS] src/include/Makefile is missing statistics directory

2017-06-08 Thread Kyotaro HORIGUCHI
Hello, I noticed that src/include/statistics is not installed by make install. The commit 7b504eb282ca2f5104b5c00b4f05a forgot to do that. master and 10 beta 1 is affected. regards, -- Kyotaro Horiguchi NTT Open Source Software Center >From 9b871ac36a0867e106200c66179ce593a25988c2 Mon Sep 17