Re: pgsql: Fix deadlock hazard in CREATE INDEX CONCURRENTLY

2018-01-03 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Some of the buildfarm machines still don't like this. > It proves me wrong about the ordering in which the steps return > completion being consistent: > *** > *** 20,24 > unlck >

pgsql: Clean up tupdesc.c for recent changes.

2018-01-03 Thread Tom Lane
Clean up tupdesc.c for recent changes. TupleDescCopy needs to have the same effects as CreateTupleDescCopy in that, since it doesn't copy constraints, it should clear the per-attribute fields associated with them. Oversight in commit cc5f81366. Since TupleDescCopy has already established the pre

Re: pgsql: Add parallel-aware hash joins.

2018-01-03 Thread Tom Lane
will pass everywhere. regards, tom lane

Re: pgsql: Add parallel-aware hash joins.

2018-01-03 Thread Tom Lane
is none too fast itself ... it'll be a few hours before I can confirm anything. regards, tom lane

pgsql: Tweak parallel hash join test case in hopes of improving stabili

2018-01-03 Thread Tom Lane
Tweak parallel hash join test case in hopes of improving stability. This seems to make things better on gaur, let's see what the rest of the buildfarm thinks. Thomas Munro Discussion: https://postgr.es/m/CAEepm=1uuT8iJxMEsR=jl+3zei87db2v0+0h9o_ruxxczpz...@mail.gmail.com Branch -- master D

Re: pgsql: Add parallel-aware hash joins.

2018-01-03 Thread Tom Lane
st cycles on gaur without a failure. That's not enough to really prove anything, but it's more successes than I was getting before. I pushed the patch so we can see what the rest of the buildfarm thinks. regards, tom lane

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Tom Lane
+ 1 and foo.id > ss.id - 1; 2017-12-21 17:34:52.092 EST [2252:6] LOG: terminating any other active server processes Also, what the devil is happening on skink? regards, tom lane

pgsql: Fix incorrect computations of length of null bitmap in pageinspe

2018-01-04 Thread Tom Lane
Fix incorrect computations of length of null bitmap in pageinspect. Instead of using our standard macro for this calculation, this code did it itself ... and got it wrong, leading to incorrect display of the null bitmap in some cases. Noted and fixed by Maksim Milyutin. In passing, remove a usel

pgsql: Fix incorrect computations of length of null bitmap in pageinspe

2018-01-04 Thread Tom Lane
Fix incorrect computations of length of null bitmap in pageinspect. Instead of using our standard macro for this calculation, this code did it itself ... and got it wrong, leading to incorrect display of the null bitmap in some cases. Noted and fixed by Maksim Milyutin. In passing, remove a usel

pgsql: Fix incorrect computations of length of null bitmap in pageinspe

2018-01-04 Thread Tom Lane
Fix incorrect computations of length of null bitmap in pageinspect. Instead of using our standard macro for this calculation, this code did it itself ... and got it wrong, leading to incorrect display of the null bitmap in some cases. Noted and fixed by Maksim Milyutin. In passing, remove a usel

pgsql: Fix new test case to not be endian-dependent.

2018-01-04 Thread Tom Lane
Fix new test case to not be endian-dependent. Per buildfarm. Discussion: https://postgr.es/m/ec295792-a69f-350f-6287-25a20e8f3...@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/18869e202b74f36d504c5c3c7d9db9c186039eba Modified Files -- contr

pgsql: Fix new test case to not be endian-dependent.

2018-01-04 Thread Tom Lane
Fix new test case to not be endian-dependent. Per buildfarm. Discussion: https://postgr.es/m/ec295792-a69f-350f-6287-25a20e8f3...@gmail.com Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0dc5dfcd7a7190739247a88c1c6249c75591effd Modified Files -

Re: pgsql: Implement channel binding tls-server-end-point for SCRAM

2018-01-04 Thread Tom Lane
Peter Eisentraut writes: > Implement channel binding tls-server-end-point for SCRAM Buildfarm doesn't like this one bit. regards, tom lane

pgsql: Rewrite ConditionVariableBroadcast() to avoid live-lock.

2018-01-05 Thread Tom Lane
_variable.c was introduced. Tom Lane and Thomas Munro Discussion: https://postgr.es/m/CAEepm=0nwkehyw7ndousf8juukoprncyy3vuasvhrewsota...@mail.gmail.com Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1c77e990833a72039a71ca3f813ff6d05a4d09b9 Modified Files ---

pgsql: Rewrite ConditionVariableBroadcast() to avoid live-lock.

2018-01-05 Thread Tom Lane
_variable.c was introduced. Tom Lane and Thomas Munro Discussion: https://postgr.es/m/CAEepm=0nwkehyw7ndousf8juukoprncyy3vuasvhrewsota...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/aced5a92bf46532466417ab485bc94006cf60d91 Modified Files ---

pgsql: Reorder steps in ConditionVariablePrepareToSleep for more safety

2018-01-05 Thread Tom Lane
Reorder steps in ConditionVariablePrepareToSleep for more safety. In the admittedly-very-unlikely case that AddWaitEventToSet fails, ConditionVariablePrepareToSleep would error out after already having set cv_sleep_target, which is probably bad, and after having already set cv_wait_event_set, whic

pgsql: Reorder steps in ConditionVariablePrepareToSleep for more safety

2018-01-05 Thread Tom Lane
Reorder steps in ConditionVariablePrepareToSleep for more safety. In the admittedly-very-unlikely case that AddWaitEventToSet fails, ConditionVariablePrepareToSleep would error out after already having set cv_sleep_target, which is probably bad, and after having already set cv_wait_event_set, whic

pgsql: Remove return values of ConditionVariableSignal/Broadcast.

2018-01-05 Thread Tom Lane
Remove return values of ConditionVariableSignal/Broadcast. In the wake of commit aced5a92b, the semantics of these results are a bit squishy: we can tell whether we signaled some other process(es), but we do not know which ones were real waiters versus mere sentinels for ConditionVariableBroadcast

Re: pgsql: Improve error handling in RemovePgTempFiles().

2018-01-06 Thread Tom Lane
Thomas Munro writes: > On Tue, Dec 5, 2017 at 11:59 AM, Tom Lane wrote: >> Improve error handling in RemovePgTempFiles(). > Was it intentional that a newly created cluster produces a LOG error > on startup until you eventually do something to cause base/pgsql_tmp > to exi

Re: pgsql: Improve error handling in RemovePgTempFiles().

2018-01-07 Thread Tom Lane
de as above but without missing_ok). Having an explicit control parameter seems marginally clearer but I'm not sure it's buying anything meaningful. Thoughts? regards, tom lane

pgsql: Back off chattiness in RemovePgTempFiles().

2018-01-07 Thread Tom Lane
Back off chattiness in RemovePgTempFiles(). In commit 561885db0, as part of normalizing RemovePgTempFiles's error handling, I removed its behavior of silently ignoring ENOENT failures during directory opens. Thomas Munro points out that this is a bad idea at the top level, because we don't create

Re: pgsql: Improve error handling in RemovePgTempFiles().

2018-01-07 Thread Tom Lane
hould just do your > second alternative as-is (ie, code as above but without missing_ok). > Having an explicit control parameter seems marginally clearer but > I'm not sure it's buying anything meaningful. Thoughts? Hearing no comments, I did it the first way. regards, tom lane

Re: pgsql: Improve error handling in RemovePgTempFiles().

2018-01-07 Thread Tom Lane
Thomas Munro writes: > On Mon, Jan 8, 2018 at 2:41 PM, Tom Lane wrote: >> Hearing no comments, I did it the first way. > It's funny that the two boolean arguments are always opposite. > They're essentially both saying "top level?". Yeah. I thought a

Buildfarm status monitoring (was Re: pgsql: Implement channel binding tls-server-end-point for SCRAM)

2018-01-08 Thread Tom Lane
Simon Riggs writes: > On 4 January 2018 at 21:02, Tom Lane wrote: >> Peter Eisentraut writes: >>> Implement channel binding tls-server-end-point for SCRAM >> Buildfarm doesn't like this one bit. > Can't we automate these messages? It's not th

pgsql: Cosmetic improvements in condition_variable.[hc].

2018-01-08 Thread Tom Lane
Cosmetic improvements in condition_variable.[hc]. Clarify a bunch of comments. Discussion: https://postgr.es/m/CAEepm=0nwkehyw7ndousf8juukoprncyy3vuasvhrewsota...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e35dba475a440f73dccf9ed1fd61e3abc6ee61

pgsql: Improve error detection capability in proclists.

2018-01-08 Thread Tom Lane
Improve error detection capability in proclists. Previously, although the initial state of a proclist_node is expected to be next == prev == 0, proclist_delete_offset would reset nodes to next == prev == INVALID_PGPROCNO when removing them from a list. This is the same state that a node in a singl

pgsql: Allow ConditionVariable[PrepareTo]Sleep to auto-switch between C

2018-01-09 Thread Tom Lane
Allow ConditionVariable[PrepareTo]Sleep to auto-switch between CVs. The original coding here insisted that callers manually cancel any prepared sleep for one condition variable before starting a sleep on another one. While that's not a huge burden today, it seems like a gotcha that will bite us in

pgsql: Allow ConditionVariable[PrepareTo]Sleep to auto-switch between C

2018-01-09 Thread Tom Lane
Allow ConditionVariable[PrepareTo]Sleep to auto-switch between CVs. The original coding here insisted that callers manually cancel any prepared sleep for one condition variable before starting a sleep on another one. While that's not a huge burden today, it seems like a gotcha that will bite us in

pgsql: Fix race condition during replication origin drop.

2018-01-09 Thread Tom Lane
Fix race condition during replication origin drop. replorigin_drop() misunderstood the API for condition variables: it had ConditionVariablePrepareToSleep and ConditionVariableCancelSleep inside its test-and-sleep loop, rather than outside the loop as intended. The net effect is a narrow race-con

pgsql: Fix race condition during replication origin drop.

2018-01-09 Thread Tom Lane
Fix race condition during replication origin drop. replorigin_drop() misunderstood the API for condition variables: it had ConditionVariablePrepareToSleep and ConditionVariableCancelSleep inside its test-and-sleep loop, rather than outside the loop as intended. The net effect is a narrow race-con

pgsql: While waiting for a condition variable, detect postmaster death.

2018-01-09 Thread Tom Lane
While waiting for a condition variable, detect postmaster death. The general assumption for postmaster child processes is that they should just exit(1), reasonably promptly, if the postmaster disappears. condition_variable.c neglected this consideration and could be left waiting forever, if the co

pgsql: While waiting for a condition variable, detect postmaster death.

2018-01-09 Thread Tom Lane
While waiting for a condition variable, detect postmaster death. The general assumption for postmaster child processes is that they should just exit(1), reasonably promptly, if the postmaster disappears. condition_variable.c neglected this consideration and could be left waiting forever, if the co

pgsql: Improve the heuristic for ordering child paths of a parallel app

2018-01-09 Thread Tom Lane
Improve the heuristic for ordering child paths of a parallel append. Commit ab7271677 introduced code that attempts to order the child scans of a Parallel Append node in a way that will minimize execution time, based on total cost and startup cost. However, it failed to think hard about what to d

pgsql: Rewrite list_qsort() to avoid trashing its input list.

2018-01-09 Thread Tom Lane
Rewrite list_qsort() to avoid trashing its input list. The initial implementation of list_qsort(), from commit ab7271677, re-used the ListCells of the input list while not touching the List header. This meant that anybody who still had a pointer to the original header would now be in possession o

pgsql: Remove dubious micro-optimization in ckpt_buforder_comparator().

2018-01-10 Thread Tom Lane
Remove dubious micro-optimization in ckpt_buforder_comparator(). It seems incorrect to assume that the list of CkptSortItems can never contain duplicate page numbers: concurrent activity could result in some page getting dropped from a low-numbered buffer and later loaded into a high-numbered buff

pgsql: Remove dubious micro-optimization in ckpt_buforder_comparator().

2018-01-10 Thread Tom Lane
Remove dubious micro-optimization in ckpt_buforder_comparator(). It seems incorrect to assume that the list of CkptSortItems can never contain duplicate page numbers: concurrent activity could result in some page getting dropped from a low-numbered buffer and later loaded into a high-numbered buff

pgsql: Remove dubious micro-optimization in ckpt_buforder_comparator().

2018-01-10 Thread Tom Lane
Remove dubious micro-optimization in ckpt_buforder_comparator(). It seems incorrect to assume that the list of CkptSortItems can never contain duplicate page numbers: concurrent activity could result in some page getting dropped from a low-numbered buffer and later loaded into a high-numbered buff

pgsql: Fix sample INSTR() functions in the plpgsql documentation.

2018-01-10 Thread Tom Lane
hough this patch only touches documentation, we should probably call it out as a bug fix in the next minor release notes, since users who have adopted the functions will likely want to update their versions. Yugo Nagata and Tom Lane Discussion: https://postgr.es/m/20171229191705.c0b43a8c.nag...@sr

pgsql: Fix sample INSTR() functions in the plpgsql documentation.

2018-01-10 Thread Tom Lane
hough this patch only touches documentation, we should probably call it out as a bug fix in the next minor release notes, since users who have adopted the functions will likely want to update their versions. Yugo Nagata and Tom Lane Discussion: https://postgr.es/m/20171229191705.c0b43a8c.nag...@sr

pgsql: Fix sample INSTR() functions in the plpgsql documentation.

2018-01-10 Thread Tom Lane
hough this patch only touches documentation, we should probably call it out as a bug fix in the next minor release notes, since users who have adopted the functions will likely want to update their versions. Yugo Nagata and Tom Lane Discussion: https://postgr.es/m/20171229191705.c0b43a8c.nag...@sr

pgsql: Fix sample INSTR() functions in the plpgsql documentation.

2018-01-10 Thread Tom Lane
hough this patch only touches documentation, we should probably call it out as a bug fix in the next minor release notes, since users who have adopted the functions will likely want to update their versions. Yugo Nagata and Tom Lane Discussion: https://postgr.es/m/20171229191705.c0b43a8c.nag...@sr

pgsql: Fix sample INSTR() functions in the plpgsql documentation.

2018-01-10 Thread Tom Lane
hough this patch only touches documentation, we should probably call it out as a bug fix in the next minor release notes, since users who have adopted the functions will likely want to update their versions. Yugo Nagata and Tom Lane Discussion: https://postgr.es/m/20171229191705.c0b43a8c.nag...@sr

pgsql: Fix sample INSTR() functions in the plpgsql documentation.

2018-01-10 Thread Tom Lane
hough this patch only touches documentation, we should probably call it out as a bug fix in the next minor release notes, since users who have adopted the functions will likely want to update their versions. Yugo Nagata and Tom Lane Discussion: https://postgr.es/m/20171229191705.c0b43a8c.nag...@sr

pgsql: Cosmetic fix in postgres_fdw.c.

2018-01-11 Thread Tom Lane
Cosmetic fix in postgres_fdw.c. Make the forward declaration of estimate_path_cost_size match its actual definition. Tatsuro Yamada Discussion: https://postgr.es/m/96f2f554-1eeb-fe6f-e0db-650771886...@lab.ntt.co.jp Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/

pgsql: Add QueryEnvironment to ExplainOneQuery_hook's parameter list.

2018-01-11 Thread Tom Lane
Add QueryEnvironment to ExplainOneQuery_hook's parameter list. This should have been done in commit 18ce3a4ab, which added that parameter to ExplainOneQuery, but it was overlooked. This makes it impossible for a user of the hook to pass the queryEnv down to ExplainOnePlan. It's too late to chang

pgsql: Fix incorrect handling of subquery pullup in the presence of gro

2018-01-12 Thread Tom Lane
Fix incorrect handling of subquery pullup in the presence of grouping sets. If we flatten a subquery whose target list contains constants or expressions, when those output columns are used in GROUPING SET columns, the planner was capable of doing the wrong thing by merging a pulled-up expression i

pgsql: Fix incorrect handling of subquery pullup in the presence of gro

2018-01-12 Thread Tom Lane
Fix incorrect handling of subquery pullup in the presence of grouping sets. If we flatten a subquery whose target list contains constants or expressions, when those output columns are used in GROUPING SET columns, the planner was capable of doing the wrong thing by merging a pulled-up expression i

pgsql: Fix incorrect handling of subquery pullup in the presence of gro

2018-01-12 Thread Tom Lane
Fix incorrect handling of subquery pullup in the presence of grouping sets. If we flatten a subquery whose target list contains constants or expressions, when those output columns are used in GROUPING SET columns, the planner was capable of doing the wrong thing by merging a pulled-up expression i

pgsql: Fix incorrect handling of subquery pullup in the presence of gro

2018-01-12 Thread Tom Lane
Fix incorrect handling of subquery pullup in the presence of grouping sets. If we flatten a subquery whose target list contains constants or expressions, when those output columns are used in GROUPING SET columns, the planner was capable of doing the wrong thing by merging a pulled-up expression i

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Avoid unnecessary failure in SELECT concurrent with ALTER NO INH

2018-01-12 Thread Tom Lane
Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. If a query against an inheritance tree runs concurrently with an ALTER TABLE that's disinheriting one of the tree members, it's possible to get a "could not find inherited attribute" error because after obtaining lock on the rem

pgsql: Fix postgres_fdw to cope with duplicate GROUP BY entries.

2018-01-12 Thread Tom Lane
Fix postgres_fdw to cope with duplicate GROUP BY entries. Commit 7012b132d, which added the ability to push down aggregates and grouping to the remote server, wasn't careful to ensure that the remote server would have the same idea we do about which columns are the grouping columns, in cases where

pgsql: Fix postgres_fdw to cope with duplicate GROUP BY entries.

2018-01-12 Thread Tom Lane
Fix postgres_fdw to cope with duplicate GROUP BY entries. Commit 7012b132d, which added the ability to push down aggregates and grouping to the remote server, wasn't careful to ensure that the remote server would have the same idea we do about which columns are the grouping columns, in cases where

pgsql: Remove useless lookup of root partitioned rel in ExecInitModifyT

2018-01-17 Thread Tom Lane
Remove useless lookup of root partitioned rel in ExecInitModifyTable(). node->partitioned_rels is only set in UPDATE/DELETE cases, but ExecInitModifyTable only uses its "rel" variable in INSERT cases, so the extra logic to find the root rel is just a waste of complexity and cycles. Etsuro Fujita,

pgsql: Extend configure's __int128 test to check for a known gcc bug.

2018-01-18 Thread Tom Lane
ix some typos in the existing configure test for __int128. They're harmless because we only compile that code not run it, but they're still confusing for anyone looking at it closely. This is needed in support of commit 751804998, so back-patch to 9.5 as that was. Marina Polyakova, Victo

pgsql: Extend configure's __int128 test to check for a known gcc bug.

2018-01-18 Thread Tom Lane
ix some typos in the existing configure test for __int128. They're harmless because we only compile that code not run it, but they're still confusing for anyone looking at it closely. This is needed in support of commit 751804998, so back-patch to 9.5 as that was. Marina Polyakova, Victo

pgsql: Extend configure's __int128 test to check for a known gcc bug.

2018-01-18 Thread Tom Lane
ix some typos in the existing configure test for __int128. They're harmless because we only compile that code not run it, but they're still confusing for anyone looking at it closely. This is needed in support of commit 751804998, so back-patch to 9.5 as that was. Marina Polyakova, Victo

pgsql: Extend configure's __int128 test to check for a known gcc bug.

2018-01-18 Thread Tom Lane
ix some typos in the existing configure test for __int128. They're harmless because we only compile that code not run it, but they're still confusing for anyone looking at it closely. This is needed in support of commit 751804998, so back-patch to 9.5 as that was. Marina Polyakova, Victo

Re: pgsql: Local partitioned indexes

2018-01-19 Thread Tom Lane
Alvaro Herrera writes: > Local partitioned indexes Evidently you're not there yet. I'm suspicious that the continuing failures on dromedary may trace to its use of -DCOPY_PARSE_PLAN_TREES ... try looking for a missed field addition in copyfuncs.c. regards, tom lane

pgsql: Suppress possibly-uninitialized-variable warnings.

2018-01-19 Thread Tom Lane
Suppress possibly-uninitialized-variable warnings. Apparently, Peter's compiler has faith that the switch test values here could never not be valid values of their enums. Mine does not, and I tend to agree with it. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/96

Re: pgsql: Fix behavior of ~> (cube, int) operator

2018-01-21 Thread Tom Lane
atched) and 563a053bd. Please fix. regards, tom lane

Re: pgsql: Add parallel-aware hash joins.

2018-01-22 Thread Tom Lane
M- 0B 0B 76 46241 top 2.6 00:01.04 1/1 0232140K 0B 0B 46241 Weird --- my other macOS machines aren't doing that. Anyway, it looks like we should write off these longfin timings as ambient noise :-( regards, tom lane

pgsql: Make pg_dump's ACL, sec label, and comment entries reliably iden

2018-01-22 Thread Tom Lane
Make pg_dump's ACL, sec label, and comment entries reliably identifiable. _tocEntryRequired() expects that it can identify ACL, SECURITY LABEL, and COMMENT TOC entries that are for large objects by seeing whether the tag for them starts with "LARGE OBJECT ". While that works fine for actual large

pgsql: Make pg_dump's ACL, sec label, and comment entries reliably iden

2018-01-22 Thread Tom Lane
Make pg_dump's ACL, sec label, and comment entries reliably identifiable. _tocEntryRequired() expects that it can identify ACL, SECURITY LABEL, and COMMENT TOC entries that are for large objects by seeing whether the tag for them starts with "LARGE OBJECT ". While that works fine for actual large

pgsql: Make pg_dump's ACL, sec label, and comment entries reliably iden

2018-01-22 Thread Tom Lane
Make pg_dump's ACL, sec label, and comment entries reliably identifiable. _tocEntryRequired() expects that it can identify ACL, SECURITY LABEL, and COMMENT TOC entries that are for large objects by seeing whether the tag for them starts with "LARGE OBJECT ". While that works fine for actual large

pgsql: Make pg_dump's ACL, sec label, and comment entries reliably iden

2018-01-22 Thread Tom Lane
Make pg_dump's ACL, sec label, and comment entries reliably identifiable. _tocEntryRequired() expects that it can identify ACL, SECURITY LABEL, and COMMENT TOC entries that are for large objects by seeing whether the tag for them starts with "LARGE OBJECT ". While that works fine for actual large

pgsql: Make pg_dump's ACL, sec label, and comment entries reliably iden

2018-01-22 Thread Tom Lane
Make pg_dump's ACL, sec label, and comment entries reliably identifiable. _tocEntryRequired() expects that it can identify ACL, SECURITY LABEL, and COMMENT TOC entries that are for large objects by seeing whether the tag for them starts with "LARGE OBJECT ". While that works fine for actual large

pgsql: Make pg_dump's ACL, sec label, and comment entries reliably iden

2018-01-22 Thread Tom Lane
Make pg_dump's ACL, sec label, and comment entries reliably identifiable. _tocEntryRequired() expects that it can identify ACL, SECURITY LABEL, and COMMENT TOC entries that are for large objects by seeing whether the tag for them starts with "LARGE OBJECT ". While that works fine for actual large

pgsql: Reorder code in pg_dump to dump comments etc in a uniform order.

2018-01-22 Thread Tom Lane
Reorder code in pg_dump to dump comments etc in a uniform order. Most of the code in pg_dump dumps an object's comment, security label, and ACL auxiliary TOC entries, in that order, immediately after the object's main TOC entry, and at least dumpComment's API spec says this isn't optional. dumpDa

pgsql: Move handling of database properties from pg_dumpall into pg_dum

2018-01-22 Thread Tom Lane
Move handling of database properties from pg_dumpall into pg_dump. This patch rearranges the division of labor between pg_dump and pg_dumpall so that pg_dump itself handles all properties attached to a single database. Notably, a database's ACL (GRANT/REVOKE status) and local GUC settings establi

Re: pgsql: Add parallel-aware hash joins.

2018-01-22 Thread Tom Lane
n be seen that things have gotten notably slower since the beginning of November. regards, tom lane

pgsql: In pg_dump, force reconnection after issuing ALTER DATABASE SET

2018-01-23 Thread Tom Lane
In pg_dump, force reconnection after issuing ALTER DATABASE SET command(s). The folly of not doing this was exposed by the buildfarm: in some cases, the GUC settings applied through ALTER DATABASE SET may be essential to interpreting the reloaded data correctly. Another argument why we can't real

pgsql: Documentation fix: pg_ctl no longer makes connection attempts.

2018-01-23 Thread Tom Lane
Documentation fix: pg_ctl no longer makes connection attempts. Overlooked in commit f13ea95f9. Noted by Nick Barnes. Discussion: https://postgr.es/m/20180123093723.7407.3...@wrigleys.postgresql.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c9707d9413b171a6f0

pgsql: Documentation fix: pg_ctl no longer makes connection attempts.

2018-01-23 Thread Tom Lane
Documentation fix: pg_ctl no longer makes connection attempts. Overlooked in commit f13ea95f9. Noted by Nick Barnes. Discussion: https://postgr.es/m/20180123093723.7407.3...@wrigleys.postgresql.org Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5ca17d655f9

pgsql: Teach reparameterize_path() to handle AppendPaths.

2018-01-23 Thread Tom Lane
Teach reparameterize_path() to handle AppendPaths. If we're inside a lateral subquery, there may be no unparameterized paths for a particular child relation of an appendrel, in which case we *must* be able to create similarly-parameterized paths for each other child relation, else the planner will

pgsql: Teach reparameterize_path() to handle AppendPaths.

2018-01-23 Thread Tom Lane
Teach reparameterize_path() to handle AppendPaths. If we're inside a lateral subquery, there may be no unparameterized paths for a particular child relation of an appendrel, in which case we *must* be able to create similarly-parameterized paths for each other child relation, else the planner will

pgsql: Teach reparameterize_path() to handle AppendPaths.

2018-01-23 Thread Tom Lane
Teach reparameterize_path() to handle AppendPaths. If we're inside a lateral subquery, there may be no unparameterized paths for a particular child relation of an appendrel, in which case we *must* be able to create similarly-parameterized paths for each other child relation, else the planner will

pgsql: Teach reparameterize_path() to handle AppendPaths.

2018-01-23 Thread Tom Lane
Teach reparameterize_path() to handle AppendPaths. If we're inside a lateral subquery, there may be no unparameterized paths for a particular child relation of an appendrel, in which case we *must* be able to create similarly-parameterized paths for each other child relation, else the planner will

pgsql: Teach reparameterize_path() to handle AppendPaths.

2018-01-23 Thread Tom Lane
Teach reparameterize_path() to handle AppendPaths. If we're inside a lateral subquery, there may be no unparameterized paths for a particular child relation of an appendrel, in which case we *must* be able to create similarly-parameterized paths for each other child relation, else the planner will

pgsql: Teach reparameterize_path() to handle AppendPaths.

2018-01-23 Thread Tom Lane
Teach reparameterize_path() to handle AppendPaths. If we're inside a lateral subquery, there may be no unparameterized paths for a particular child relation of an appendrel, in which case we *must* be able to create similarly-parameterized paths for each other child relation, else the planner will

pgsql: Improve implementation of pg_attribute_always_inline.

2018-01-23 Thread Tom Lane
Improve implementation of pg_attribute_always_inline. Avoid compiler warnings on MSVC (which doesn't want to see both __forceinline and inline) and ancient GCC (which doesn't have __attribute__((always_inline))). Don't force inline-ing when building at -O0, as the programmer is probably hoping fo

Re: pgsql: Add parallel-aware hash joins.

2018-01-24 Thread Tom Lane
t| t (1 row) rollback to settings; == regards, tom lane

pgsql: Improve pg_dump's handling of "special" built-in objects.

2018-01-25 Thread Tom Lane
Improve pg_dump's handling of "special" built-in objects. We had some pretty ad-hoc handling of the public schema and the plpgsql extension, which are both presumed to exist in template0 but might be modified or deleted in the database being dumped. Up to now, by default pg_dump would emit a CREA

pgsql: Clean up some aspects of pg_dump/pg_restore item-selection logic

2018-01-25 Thread Tom Lane
Clean up some aspects of pg_dump/pg_restore item-selection logic. Ensure that CREATE DATABASE and related commands are issued when, and only when, --create is specified. Previously there were scenarios where using selective-dump switches would prevent --create from having any effect. For example

pgsql: Add missing "static" markers.

2018-01-25 Thread Tom Lane
Add missing "static" markers. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bb415675d8ab6e776321a96f9c0e77c12fda96ea Modified Files -- src/backend/executor/nodeModifyTable.c | 2 +- src/bin/pg_dump/pg_dump.c | 2 +- 2 files c

pgsql: Support --no-comments in pg_dump, pg_dumpall, pg_restore.

2018-01-25 Thread Tom Lane
Support --no-comments in pg_dump, pg_dumpall, pg_restore. We have switches already to suppress other subsidiary object properties, such as ACLs, security labels, ownership, and tablespaces, so just on the grounds of symmetry we should allow suppressing comments as well. Also, commit 0d4e6ed30 adde

pgsql: Remove the obsolete WITH clause of CREATE FUNCTION.

2018-01-26 Thread Tom Lane
Remove the obsolete WITH clause of CREATE FUNCTION. This clause was superseded by SQL-standard syntax back in 7.3. We've kept it around for backwards-compatibility purposes ever since; but 15 years seems like long enough for that, especially seeing that there are undocumented weirdnesses in how it

pgsql: Avoid unnecessary use of pg_strcasecmp for already-downcased ide

2018-01-26 Thread Tom Lane
Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. We have a lot of code in which option names, which from the user's viewpoint are logically keywords, are passed through the grammar as plain identifiers, and then matched to string literals during command execution. This app

pgsql: Avoid crash during EvalPlanQual recheck of an inner indexscan.

2018-01-27 Thread Tom Lane
Avoid crash during EvalPlanQual recheck of an inner indexscan. Commit 09529a70b changed nodeIndexscan.c and nodeIndexonlyscan.c to postpone initialization of the indexscan proper until the first tuple fetch. It overlooked the question of mark/restore behavior, which means that if some caller atte

pgsql: Avoid crash during EvalPlanQual recheck of an inner indexscan.

2018-01-27 Thread Tom Lane
Avoid crash during EvalPlanQual recheck of an inner indexscan. Commit 09529a70b changed nodeIndexscan.c and nodeIndexonlyscan.c to postpone initialization of the indexscan proper until the first tuple fetch. It overlooked the question of mark/restore behavior, which means that if some caller atte

pgsql: Update time zone data files to tzdata release 2018c.

2018-01-27 Thread Tom Lane
Update time zone data files to tzdata release 2018c. DST law changes in Brazil, Sao Tome and Principe. Historical corrections for Bolivia, Japan, and South Sudan. The "US/Pacific-New" zone has been removed (it was only a link to America/Los_Angeles anyway). Branch -- REL9_4_STABLE Details

pgsql: Update time zone data files to tzdata release 2018c.

2018-01-27 Thread Tom Lane
Update time zone data files to tzdata release 2018c. DST law changes in Brazil, Sao Tome and Principe. Historical corrections for Bolivia, Japan, and South Sudan. The "US/Pacific-New" zone has been removed (it was only a link to America/Los_Angeles anyway). Branch -- REL9_3_STABLE Details

pgsql: Update time zone data files to tzdata release 2018c.

2018-01-27 Thread Tom Lane
Update time zone data files to tzdata release 2018c. DST law changes in Brazil, Sao Tome and Principe. Historical corrections for Bolivia, Japan, and South Sudan. The "US/Pacific-New" zone has been removed (it was only a link to America/Los_Angeles anyway). Branch -- REL_10_STABLE Details

pgsql: Update time zone data files to tzdata release 2018c.

2018-01-27 Thread Tom Lane
Update time zone data files to tzdata release 2018c. DST law changes in Brazil, Sao Tome and Principe. Historical corrections for Bolivia, Japan, and South Sudan. The "US/Pacific-New" zone has been removed (it was only a link to America/Los_Angeles anyway). Branch -- REL9_5_STABLE Details

pgsql: Update time zone data files to tzdata release 2018c.

2018-01-27 Thread Tom Lane
Update time zone data files to tzdata release 2018c. DST law changes in Brazil, Sao Tome and Principe. Historical corrections for Bolivia, Japan, and South Sudan. The "US/Pacific-New" zone has been removed (it was only a link to America/Los_Angeles anyway). Branch -- REL9_6_STABLE Details

pgsql: Update time zone data files to tzdata release 2018c.

2018-01-27 Thread Tom Lane
Update time zone data files to tzdata release 2018c. DST law changes in Brazil, Sao Tome and Principe. Historical corrections for Bolivia, Japan, and South Sudan. The "US/Pacific-New" zone has been removed (it was only a link to America/Los_Angeles anyway). Branch -- master Details ---

  1   2   3   4   5   6   7   8   9   10   >