Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-11-11 Thread Robert Haas
27;ve got -- if you're going to invent new general-purpose primitives, they need to go next to the existing functions that do similar things, not in whatever part of the code you first decided you needed them. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgre

Re: [HACKERS] GatherMerge misses to push target list

2017-11-11 Thread Robert Haas
s just a dummy target list that produces nothing. Instead, I think we should pass path->pathtarget, representing the idea that whatever Gather Merge produces as output is the same as what you put into it. See attached. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise

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

2017-11-10 Thread Robert Haas
ument that this is an improvement as it stands, and we can adjust it later if it becomes clear what would be better. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Robert Haas
On Fri, Nov 10, 2017 at 2:24 PM, Tom Lane wrote: > Robert Haas writes: >> I decided to try instead teaching the planner to keep track of the >> types of PARAM_EXEC parameters as they were created, and that seems to >> work fine. See 0001, attached. > > I did not look

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2017-11-10 Thread Robert Haas
imilar to what you've done elsewhere. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Robert Haas
ong lines in your version of the patch into multiple lines; please try to be attentive to this issue when writing patches in general, as it is a bit tedious to go through and insert line breaks in many places. Please let me know your thoughts on the attached patches. Thanks, -- Ro

Re: [HACKERS] Incorrect comment for build_child_join_rel

2017-11-10 Thread Robert Haas
On Fri, Nov 10, 2017 at 4:34 AM, Etsuro Fujita wrote: > Here is a small patch for $Subject. Good catch. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To m

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Robert Haas
server-side lo_import or lo_export is needed for some routine task, > it's safer to use a role of this sort than full superuser privilege, > as that helps to reduce the risk of damage from accidental errors. +1. That seems like great language to me. -- Robert Haas Enterprise

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-10 Thread Robert Haas
ts in ExecContextForcesOids imply that somebody it might, so perhaps it's best to clean that up. Patch for this attached, too. And here are the other patches again, too. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company 0001-pass-eflags-to-worker-v1

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-09 Thread Robert Haas
way, I then tried this. Instead of asking me what I did, can you tell me what I need to do? Maybe a self-contained reproducible test case including exactly what goes wrong on your end? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsq

Re: [HACKERS] [POC] hash partitioning

2017-11-09 Thread Robert Haas
On Wed, Nov 1, 2017 at 6:16 AM, amul sul wrote: > Fixed in the 0003 patch. I have committed this patch set with the attached adjustments. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company hash-adjustments.patch Description: Binary data -- Sent

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-09 Thread Robert Haas
s exactly the kind of thing that I'm talking about. Forcing an administrator to hand out full superuser access instead of being able to give just lo_import() makes life difficult for users for no good reason. The existence of a theoretically-exploitable security vulnerability is not tantamount to

Re: [HACKERS] why not parallel seq scan for slow functions

2017-11-09 Thread Robert Haas
a straight check on the number of base rels such that > allow generating gather path in set_rel_pathlist, if there are > multiple baserels involved. I have used all_baserels which I think > will work better for this purpose. Yes, that looks a lot more likely to be correct. Let's s

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-09 Thread Robert Haas
contained therein, and decide who to fire/imprison/execute at gunpoint). It shouldn't be our job to decide that granting a certain right is NEVER ok. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-09 Thread Robert Haas
ll not prevent you from making a binary setuid regardless of what the binary does. If you make a binary setuid root that lets someone hack root, that's your fault, not the operating system. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-09 Thread Robert Haas
in_parallel_table_scan_size = 0. That got it to use parallel query, but I still don't see anything broken. Can you clarify further? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@p

Re: [HACKERS] Parallel Append implementation

2017-11-09 Thread Robert Haas
On Sat, Oct 28, 2017 at 5:50 AM, Robert Haas wrote: > No, because the Append node is *NOT* getting copied into shared > memory. I have pushed a comment update to the existing functions; you > can use the same comment for this patch. I spent the last several days working on this patch,

Re: [HACKERS] pageinspect option to forgo buffer locking?

2017-11-09 Thread Robert Haas
gt; more likely to hit edge cases than if using pg_read_binary_file() or > such (which obviously sees an out of date page)? More the latter. It's not really an increase in terms of security exposure, but it might lead to more trouble in practice. -- Robert Haas EnterpriseDB: http://www.e

Re: [HACKERS] pageinspect option to forgo buffer locking?

2017-11-09 Thread Robert Haas
_items() is, if I remember correctly, not necessarily going to tolerate malformed input very well - I think that's why we restrict all of these functions to superusers. So using it in this way would seem to increase the risk of a server crash or other horrible misbehavior. Of course if we're

Re: [HACKERS] Runtime Partition Pruning

2017-11-09 Thread Robert Haas
On Thu, Nov 9, 2017 at 6:18 AM, Beena Emerson wrote: > The code still chooses the custom plan instead of the generic plan for > the prepared statements. I am working on it. I don't think it's really the job of this patch to do anything about that problem. -- Robert Haas En

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

2017-11-09 Thread Robert Haas
catalogs. Any syscache lookup can theoretically take a lock, even though most of the time it doesn't, and thus taking a lock that has been removed from the deadlock detector (or, say, an lwlock) and then performing a syscache lookup with it held is not OK. So I don't think we can re

Re: [HACKERS] Small improvement to compactify_tuples

2017-11-08 Thread Robert Haas
he generic routines. I don't remember any more just how much faster qsort_tuple() and qsort_ssup() are than plain qsort(), but it was significant enough to convince me to commit 337b6f5ecf05b21b5e997986884d097d60e4e3d0... -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterpr

Re: [HACKERS] why not parallel seq scan for slow functions

2017-11-08 Thread Robert Haas
stage only if there are more than two rels involved and > there isn't inheritance involved. Why is that the correct rule? Sorry if I'm being dense here. I would have thought we'd want to skip it for the topmost scan/join rel regardless of the presence or absence of inheritanc

Re: [HACKERS] Small improvement to compactify_tuples

2017-11-08 Thread Robert Haas
s like slowing down single client performance by a couple of percent is something that we really don't want to do. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chan

Re: [HACKERS] why not parallel seq scan for slow functions

2017-11-08 Thread Robert Haas
ter when there isn't inheritance involved? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2017-11-07 Thread Robert Haas
to want. Maybe nobody does, but I see no reason to worry if they do. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.or

Re: [HACKERS] pg_stat_wal_write statistics view

2017-11-07 Thread Robert Haas
y) then why use the stats collector machinery for this at all, vs. having a structure in shared memory that can be updated directly? It seems like adding a lot of overhead for no functional benefit. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sen

Re: [HACKERS] Fix a typo in dsm_impl.c

2017-11-07 Thread Robert Haas
On Mon, Nov 6, 2017 at 11:22 PM, Masahiko Sawada wrote: > Attached the patch for $subject. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to y

Re: [HACKERS] Parallel Hash take II

2017-11-07 Thread Robert Haas
kend-private memory, we clean up most everything else in AbortTransaction() and then only destroy memory contexts in CleanupTransaction(). This change doesn't go as far, but it's in the same general direction, and I think rightly so. My error was in thinking that the primary use of memo

Re: [HACKERS] why not parallel seq scan for slow functions

2017-11-07 Thread Robert Haas
swer > appears inadequate, then can you provide more details on what you are > concerned about? I don't know why the question of why root->append_rel_list is empty is the relevant thing here for deciding whether to generate gather paths at this point. -- Robert Haas Enter

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

2017-11-07 Thread Robert Haas
wonder why we currently postpone this until such a late phase of planning. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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

2017-11-07 Thread Robert Haas
ou can acquire a relation extension lock". The latter rule, although more complex, is still deadlock-proof, because the heavyweight locks still use the deadlock detector, and the rest has a consistent order of lock acquisition that precludes one backend taking A then B while another backend ta

Re: [HACKERS] UPDATE of partition key

2017-11-06 Thread Robert Haas
1); Maybe just cur_update_rri < update_rri + num_update_rri, or even current_update_rri - update_rri < num_update_rri. Also, +1 for Amit Langote's idea of trying to merge mt_perleaf_childparent_maps with mt_persubplan_childparent_maps. -- Robert Haas EnterpriseDB: http://www.enterpr

Re: [HACKERS] Client Connection redirection support for PostgreSQL

2017-11-06 Thread Robert Haas
and other systems do today. I think the in-core use of this redirect functionality is useful, but I think the real win would be optionally using it in pgpool and pgbouncer. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers m

Re: [HACKERS] why not parallel seq scan for slow functions

2017-11-06 Thread Robert Haas
On Mon, Nov 6, 2017 at 11:20 AM, Amit Kapila wrote: > On Mon, Nov 6, 2017 at 3:51 AM, Robert Haas wrote: >> This looks like it's on the right track to me. I hope Tom will look >> into it, but if he doesn't I may try to get it committed myself. >> >> -

Re: [HACKERS] Early locking option to parallel backup

2017-11-06 Thread Robert Haas
m later, but they've still got to lock the objects they actually want to access. Group locking aims to prevent deadlocks between cooperating processes; it is not a license to skip locking altogether. None of which is to say that the problems don't feel related somehow. -- Robert Haas En

Re: [HACKERS] Early locking option to parallel backup

2017-11-05 Thread Robert Haas
t; happen in the first few seconds of the backup job. My backup scripts (not > included here) are aware of that and retries the backup in case of failure. I wonder why we don't do this already ... and by default. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Pos

Re: [HACKERS] Custom compression methods

2017-11-05 Thread Robert Haas
but that seems hard to achieve in this case. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] why not parallel seq scan for slow functions

2017-11-05 Thread Robert Haas
_path and related fields */ +set_cheapest(current_rel); I wonder if it's really OK to call set_cheapest() a second time for the same relation... -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-11-05 Thread Robert Haas
On Fri, Nov 3, 2017 at 5:57 PM, Alexander Korotkov wrote: > On Thu, Nov 2, 2017 at 5:56 AM, Robert Haas wrote: >> > I can propose following alternative approach: teach read-only queries on >> > hot >> > standby to tolerate concurrent relation truncation. Therefor

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-05 Thread Robert Haas
or this precise plan wouldn't yet be that big because a > good chunk of slot_getattr calls come from execTuplesMatch() which > doesn't really provide enough context to do JITing (when used for > hashaggs, there is more so it's JITed). Similarly gather merge's >

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-04 Thread Robert Haas
cSetAlloc time. I think that's largely caused by allocating space for heap tuples and then freeing them and allocating space for new heap tuples. Gather/Gather Merge are guilty of that, but I think there may be other places in the executor with the same issue. Maybe we could have fixed-size

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-04 Thread Robert Haas
out a 24% improvement. Any reviews appreciated. Thanks, -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company shm-mq-less-spinlocks-v1.2.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to you

Re: [HACKERS] MERGE SQL Statement for PG11

2017-11-03 Thread Robert Haas
PG11 > > 1. Do nothing, we reject MERGE > > 2. Implement MERGE for unique index situations only, attempting to > avoid errors (Simon OP) > > 3. Implement MERGE, but without attempting to avoid concurrent ERRORs (Peter) > > 4. Implement MERGE, while attempting to avoid concurre

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-11-03 Thread Robert Haas
g the ORDER BY query in a subselect to cut off fetching values at the correct point. But no operator class for any access method can directly handle that query efficiently as you've written it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sen

Re: [HACKERS] proposal: schema variables

2017-11-02 Thread Robert Haas
#x27;t. Right now, SET always refers to a GUC, never a variable, so there's no possibility of getting confused about whether it's intending to change a GUC or an eponymous variable. Once you make SET able to change either one of two different kinds of objects, then that possibility does exis

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-02 Thread Robert Haas
On Thu, Nov 2, 2017 at 10:26 PM, Peter Geoghegan wrote: > On Thu, Nov 2, 2017 at 9:44 AM, Robert Haas wrote: >> The second commit (22576734b805fb0952f9be841ca8f643694ee868) is where >> I think things get a lot more dangerous. The problem (as Andres >> pointed out to me th

Re: [HACKERS] MERGE SQL Statement for PG11

2017-11-02 Thread Robert Haas
if no single unique index can be identified." I don't think anybody's putting words into your mouth here. We're just reading what you wrote. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] MERGE SQL Statement for PG11

2017-11-02 Thread Robert Haas
t; semantics? > > I don't know if this would be helpful TBH, or if it would negate > Simon's compatibility goals. Just another idea. Yes, that fixes the problem. Of course, it also turns MERGE CONCURRENTLY into syntactic sugar for INSERT ON CONFLICT UPDATE, which br

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-02 Thread Robert Haas
easily, but haste makes bugs, and (I know you're all tired of hearing me say this) patches that implicate the on-disk format are scary. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] proposal: schema variables

2017-11-02 Thread Robert Haas
ing security problems. For example, maybe a security-definer function could leave behind variables to trick the calling code into failing to set GUCs that it intended to set. Or maybe creating a variable at the wrong time will just break things randomly. -- Robert Haas Enterp

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-02 Thread Robert Haas
create new problems that didn't exist before those commits. And if we release without reverting those commits then we can't change our mind later. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pg

Re: [HACKERS] Add some const decorations to prototypes

2017-11-02 Thread Robert Haas
u're just going to have to cast it to non-const. Then it wasn't really very const in the first place... -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To mak

Re: [HACKERS] [POC] hash partitioning

2017-11-02 Thread Robert Haas
is is by no means the only piece of code which assumes that. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [POC] hash partitioning

2017-11-02 Thread Robert Haas
have to take AccessExclusiveLock on the child. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Walsender timeouts and large transactions

2017-11-02 Thread Robert Haas
WalSndShutdown(); + +if (!pq_is_send_pending()) +return; +} I think it's only the if (!pq_is_send_pending()) return; that needs to be conditional here, isn't it? The pq_flush_if_writable() can be done unconditionally. Other than that this looks like a reasonable change

Re: [HACKERS] [POC] hash partitioning

2017-11-02 Thread Robert Haas
ime. The partition bounds can be changed for individual partitions but that would require a lock on the partition. Can you give an example of the kind of scenario about which you are concerned? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-11-01 Thread Robert Haas
efore, when > non-existent heap page is accessed on hot standby, we can know that it was > deleted by concurrent truncation and should be assumed to be empty. Any > thoughts? Sounds like it might break MVCC? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgre

Re: [HACKERS] Dynamic result sets from procedures

2017-11-01 Thread Robert Haas
able or anything -- but I wonder how much application code it will break, and whether any steps need to be taken to reduce breakage. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) T

Re: [HACKERS] PATCH: enabling parallel execution for cursors explicitly (experimental)

2017-11-01 Thread Robert Haas
query, but then materializing it isn't that bad because the result set is a lot smaller than the original table. I am not disputing the idea that there are *some* cases where parallel query is useful and materialization is still undesirable, of course. -- Robert Haas EnterpriseDB: http://w

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-01 Thread Robert Haas
no so > sure. Should we remove that part altogether, or add both in a single > statement with updated comments? I was only suggesting that you update the comments. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing l

Re: [HACKERS] PATCH: enabling parallel execution for cursors explicitly (experimental)

2017-11-01 Thread Robert Haas
CREATE TEMP TABLE x AS SELECT * FROM t2 WHERE ...; DECLARE x CURSOR FOR SELECT * FROM x; Since e9baa5e9fa147e00a2466ab2c40eb99c8a700824, that ought to work. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-

Re: [HACKERS] PATCH: enabling parallel execution for cursors explicitly (experimental)

2017-11-01 Thread Robert Haas
rial execution currently. If it's true that nothing else can happen in the middle then we could relax that, but I don't see why that should be true? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsq

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2017-10-31 Thread Robert Haas
t rows get inserted on the foreign server when they violate > local constraints. I think that's a fair point. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chan

Re: [HACKERS] Patch: restrict pg_rewind to whitelisted directories

2017-10-31 Thread Robert Haas
the new one. Otherwise people may have trouble understanding the history. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mai

Re: [HACKERS] EXPLAIN (ANALYZE, BUFFERS) reports bogus temporary buffer reads

2017-10-31 Thread Robert Haas
uffers: shared hit=547 read=16121, temp read=5502 written=5502 Committed. Arguably we ought to back-patch this, but it's minor so I didn't. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hacker

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-10-31 Thread Robert Haas
skip. Well, I think there are outstanding concerns that the patch in question is not safe, and I don't see that anything has been done to resolve them. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing li

Re: [HACKERS] ERROR: MultiXactId 3268957 has not been created yet -- apparent wraparound after missused pg_resetxlogs

2017-10-31 Thread Robert Haas
max = 3268957 page_inspect, I might use it to > extract row from the page, but this will not be quite easy. Not sure if this would work, but maybe try BEGIN ... UPDATE the row, perhaps via TID qual ... ROLLBACK? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreS

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-10-31 Thread Robert Haas
testcase to test dropped > columns in partitioned table. > > Sorry for not noticing this problem earlier. OK, committed. This is a good example of how having good code coverage doesn't necessarily mean you've found all the bugs. :-) -- Robert Haas EnterpriseDB: http://www.ente

Re: [HACKERS] Current int & float overflow checking is slow.

2017-10-30 Thread Robert Haas
rict-overflow=some-higher-level, and > with ubsan. I'm fairly certain there's more bogus overflow checks > around... Makes sense. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [POC] hash partitioning

2017-10-30 Thread Robert Haas
andling for each partitioning column. Do you want me > to handle opclass using RelabelType node? I am afraid that, that would make > the \d+ output more horrible than the current one if non-default opclass used. Maybe we should just pass the OID of the partition (or both the partition and

Re: [HACKERS] Current int & float overflow checking is slow.

2017-10-30 Thread Robert Haas
successfully. I suggest that if we think we don't need -fwrapv any more, we ought to remove it. Otherwise, we won't find out if we're wrong. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Remove secondary checkpoint

2017-10-30 Thread Robert Haas
ou could just run pg_waldump to find it. That probably wasn't true when this code was originally written, but it is today. I was mostly just thinking out loud, listing another option rather than advocating for it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterpris

Re: [HACKERS] Remove secondary checkpoint

2017-10-30 Thread Robert Haas
On Mon, Oct 30, 2017 at 7:04 PM, Alvaro Herrera wrote: > Robert Haas wrote: >> On Tue, Oct 24, 2017 at 7:25 PM, Andres Freund wrote: >> > I think it does the contrary. The current mechanism is, in my opinion, >> > downright dangerous: >> > https://www.postgres

Re: [HACKERS] Remove secondary checkpoint

2017-10-30 Thread Robert Haas
heckpoint around but never try to replay from that point, or only if a specific flag is provided. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscript

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-10-30 Thread Robert Haas
e that's something that's likely to come back to bite us. Giving LockAcquireExtended() an argument that causes some AccessExclusiveLocks not all to be logged also seems pretty ugly, especially because there are no comments whatsoever explaining the rationale. -- Robert Haas EnterpriseDB: htt

Re: [HACKERS] MERGE SQL Statement for PG11

2017-10-30 Thread Robert Haas
hing in core? I kinda think Peter might have the right idea here. Under his proposal, we'd be getting something that is, in a way, new. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgr

Re: [HACKERS] parallelize queries containing initplans

2017-10-29 Thread Robert Haas
On Mon, Oct 30, 2017 at 9:00 AM, Amit Kapila wrote: > Now that the PARAM_EXTERN issue is fixed, I have rebased this patch. > This patch had been switched to Ready For Committer in last CF, then > Robert had comments which I have addressed, so I think the status > should be switched b

Re: [HACKERS] Parallel worker error

2017-10-29 Thread Robert Haas
n. Shall we leave it as it is or do we want to do > something else with it? > > [1] - https://wiki.postgresql.org/wiki/PostgreSQL_10_Open_Items How about just adding an additional bullet point for that item that says "fixed by commit blah blah for 10.1"? -- Robert Haas Enterprise

Re: [HACKERS] Parallel safety for extern params

2017-10-29 Thread Robert Haas
On Sat, Oct 28, 2017 at 8:02 PM, Amit Kapila wrote: > I think we need to make changes in exec_simple_recheck_plan to make > the behavior similar to HEAD. With the attached patch, all tests > passed with force_parallel_mode. Committed to REL_10_STABLE. -- Robert Haas Enterpris

Re: [HACKERS] WIP: Restricting pg_rewind to data/wal dirs

2017-10-29 Thread Robert Haas
gardless, to increase your chances of getting feedback. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Parallel worker error

2017-10-29 Thread Robert Haas
he second variant, committed, and also back-patched to 9.6. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Implementing pg_receivewal --no-sync

2017-10-29 Thread Robert Haas
On Sun, Oct 29, 2017 at 3:42 AM, Michael Paquier wrote: > Okay. Here is an updated patch incorporating those comments. Committed with a little wordsmithing on the documentation. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pg

Re: [HACKERS] [POC] hash partitioning

2017-10-29 Thread Robert Haas
new hash value into a uint64 value. That seems likely to be slightly faster and I don't see any real downside. rhaas=# create table natch (a citext, b text) partition by hash (a); ERROR: XX000: missing support function 2(16398,16398) in opfamily 16437 LOCATION: RelationBuildPartitionKey,

Re: [HACKERS] Fix typo in blvacuum.c

2017-10-28 Thread Robert Haas
On Tue, Oct 17, 2017 at 3:48 AM, Seki, Eiji wrote: > I found a typo in comment of blvacuum.c, so attach the patch for it. Thanks. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hack

Re: [HACKERS] Parallel Append implementation

2017-10-28 Thread Robert Haas
* getting copied into shared memory. I have pushed a comment update to the existing functions; you can use the same comment for this patch. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgres

Re: [HACKERS] Partition-wise aggregation/grouping

2017-10-28 Thread Robert Haas
ting, if any, can we think about doing with this plan to make sure it doesn't regress things? For example, if we do a TPC-H run with partitioned tables and partition-wise join enabled, will any plans change with this patch? Do they get faster or not? Anyone have other ideas for what to test?

Re: [HACKERS] Adding table_constraint description in ALTER TABLE synopsis

2017-10-28 Thread Robert Haas
my best to follow instructions on > how to submit a patch. I'd say you did a good job. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to yo

Re: [HACKERS] Typos in src/backend/optimizer/README

2017-10-28 Thread Robert Haas
ar. I think you are right. I have committed the patch. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] unsafe tuple releasing in get_default_partition_oid

2017-10-28 Thread Robert Haas
On Sat, Oct 28, 2017 at 10:03 AM, Julien Rouhaud wrote: > I just noticed that get_default_partition_oid() tries to release the > tuple even if it isn't valid. > Trivial patch attached. Oops. I wonder how that managed to survive testing. Committed. -- Robert Haas Ente

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-10-27 Thread Robert Haas
hat the subsequent reads can see the > committed result of previous writes even if the previous transactions > were distributed transactions. Right, this is very important, and having the backend wait for the resolver(s) is, I think, the right way to implement it. -- Robert Haas Enterp

Re: [HACKERS] Parallel safety for extern params

2017-10-27 Thread Robert Haas
o have a crack at it or should we just leave this as a master-only fix? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-10-27 Thread Robert Haas
-lived context. I think the same technique is used elsewhere for similar reasons. I admit I haven't checked whether there would actually be a leak here if we did it as you propose, but I wouldn't find it at all surprising. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterp

Re: [HACKERS] Index only scan for cube and seg

2017-10-27 Thread Robert Haas
n't recall the details off-hand. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] MERGE SQL Statement for PG11

2017-10-27 Thread Robert Haas
her problems with taking ShareRowExclusiveLock include (1) probable lock upgrade hazards and (2) do you really want MERGE to kick autovacuum off of your giant table? Probably not. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers

Re: [HACKERS] MERGE SQL Statement for PG11

2017-10-27 Thread Robert Haas
UPDATE; if less useful cases are vulnerable to some weirdness, maybe it's OK to just document the problems. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To m

Re: [HACKERS] WIP: BRIN bloom indexes

2017-10-27 Thread Robert Haas
y again later; in the meantime, they'd be on the new version. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)

2017-10-27 Thread Robert Haas
or a long time to come, and although an automated reconnect is a little annoying, it's a lot less annoying than an outright connection failure. So that part of your patch should probably be resubmitted when and if we bump the version to 3.1. -- Robert Haas EnterpriseDB: http://www.enterprisedb.c

Re: [HACKERS] Re: Is anything preventing us from allowing write to foreign tables from standby?

2017-10-27 Thread Robert Haas
transaction is only read-only because you had no other choice, but nonetheless that's how it is marked. I have a feeling that if we extend the definition of "read only" to mean "sometimes allow writes", we may regret it. -- Robert Haas EnterpriseDB: http://www.enterpri

Re: [HACKERS] Implementing pg_receivewal --no-sync

2017-10-26 Thread Robert Haas
o let's not use them up for developer-convenience options. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

  1   2   3   4   5   6   7   8   9   10   >