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

2017-11-24 Thread Amit Kapila
On Thu, Nov 23, 2017 at 5:18 PM, amul sul wrote: > On Sat, Nov 11, 2017 at 1:05 AM, Robert Haas wrote: >> On Wed, Sep 27, 2017 at 7:07 AM, amul sul wrote: >>> Attaching POC patch that throws an error in the case of a concurrent update >>> to an already deleted tuple due to UPDATE of partition ke

Re: [HACKERS] Custom compression methods

2017-11-24 Thread Tomas Vondra
Hi, I ran into another issue - after inserting some data into a table with a tsvector column (without any compression defined), I can no longer read the data. This is what I get in the console: db=# select max(md5(body_tsvector::text)) from messages; ERROR: cache lookup failed for compression o

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-24 Thread Peter Geoghegan
On Fri, Nov 24, 2017 at 6:09 PM, Jeff Janes wrote: >> We see this for the entry tree (no deletion is possible in the first >> place), and we also see it for the posting tree (the dance with >> inserters having a pin on the root, and so on). Not mentioning why >> pending list recycling is safe in t

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-24 Thread Jeff Janes
On Thu, Nov 16, 2017 at 2:43 PM, Peter Geoghegan wrote: > On Thu, Nov 16, 2017 at 2:16 PM, Jeff Janes wrote: > > The only reference to super-exclusive lock in > src/backend/access/gin/README, > > that I can find, is about posting trees, not pending lists. Can you > quote > > or give line number

Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2017-11-24 Thread Amit Kapila
On Fri, Nov 24, 2017 at 4:51 PM, hubert depesz lubaczewski wrote: > Hi, > > up to parallel executions, when we had node in explain analyze showing > "loops=x" with x more than 1, it meant that the "actual time" had to be > multiplied by loops to get real time spent in a node. > > For example, chec

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-24 Thread Jeff Janes
On Thu, Nov 16, 2017 at 12:29 PM, Robert Haas wrote: > On Thu, Nov 16, 2017 at 7:08 AM, Masahiko Sawada > wrote: > > Agreed, that's better. Attached updated patch. > > Also I've added this to the next CF so as not to forget. > > Committed and back-patched. While I'm fairly sure this is a correc

Re: [HACKERS] Custom compression methods

2017-11-24 Thread Tomas Vondra
Hi, On 11/24/2017 10:38 AM, Ildus Kurbangaliev wrote: > ... > That means compressed datums now in the column with storage > specified as external. I'm not sure that's a bug or a feature. > Interesting. Never realized it behaves like this. Not sure if it's intentional or not (i.e. bug vs. feature)

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-24 Thread Craig Ringer
On 24 November 2017 at 22:11, Oliver Ford wrote: > Adds RANGE BETWEEN with a start and end value, as well as an > exclusions clause, to the window functions. This partially resolves > TODO list item "Implement full support for window framing clauses". > Yay! I'll try to take a look at this. --

Re: [HACKERS] proposal - Default namespaces for XPath expressions (PostgreSQL 11)

2017-11-24 Thread Pavel Stehule
2017-11-24 18:13 GMT+01:00 Pavel Stehule : > > > 2017-11-24 17:53 GMT+01:00 Pavel Stehule : > >> Hi >> >> 2017-11-22 22:49 GMT+01:00 Thomas Munro : >> >>> On Thu, Nov 9, 2017 at 10:11 PM, Pavel Stehule >>> wrote: >>> > Attached new version. >>> >>> Hi Pavel, >>> >>> FYI my patch testing robot say

Re: [HACKERS] proposal - Default namespaces for XPath expressions (PostgreSQL 11)

2017-11-24 Thread Pavel Stehule
2017-11-24 17:53 GMT+01:00 Pavel Stehule : > Hi > > 2017-11-22 22:49 GMT+01:00 Thomas Munro : > >> On Thu, Nov 9, 2017 at 10:11 PM, Pavel Stehule >> wrote: >> > Attached new version. >> >> Hi Pavel, >> >> FYI my patch testing robot says[1]: >> >> xml ... FAILED >> >> reg

Re: [HACKERS] proposal - Default namespaces for XPath expressions (PostgreSQL 11)

2017-11-24 Thread Pavel Stehule
Hi 2017-11-22 22:49 GMT+01:00 Thomas Munro : > On Thu, Nov 9, 2017 at 10:11 PM, Pavel Stehule > wrote: > > Attached new version. > > Hi Pavel, > > FYI my patch testing robot says[1]: > > xml ... FAILED > > regression.diffs says: > > + SELECT x.* FROM t1, xmltable(XMLNAM

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-24 Thread Oliver Ford
On Fri, Nov 24, 2017 at 3:08 PM, Erikjan Rijkers wrote: > (debian 8) > > make check fails: > > foreign_data ... ok > window ... FAILED > xmlmap ... ok > > The diff is: > > $ ( cd /var/data1/pg_stuff/pg_sandbox/pgsql.frame_range/src/te

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

2017-11-24 Thread Alvaro Herrera
A typo in all the messages the patch adds: "to an another" -> "to another" -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] More stats about skipped vacuums

2017-11-24 Thread Robert Haas
On Tue, Nov 21, 2017 at 2:09 AM, Kyotaro HORIGUCHI wrote: > Yes, my concern here is how many column we can allow in a stats > view. I think I'm a bit too warried about that. I think that's a good thing to worry about. In the past, Tom has expressed reluctance to make stats tables that have a ro

Re: default range partition and constraint exclusion

2017-11-24 Thread Robert Haas
On Wed, Nov 22, 2017 at 4:21 AM, Amit Langote wrote: >>> If all predicate_refuted_by() receives is the expression tree (AND/OR) >>> with individual nodes being strict clauses involving partition keys (and >>> nothing about the nullness of the keys), the downstream code is just >>> playing by the r

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

2017-11-24 Thread Robert Haas
On Thu, Nov 23, 2017 at 6:48 AM, amul sul wrote: > And remaining are EvalPlanQualFetch, ExecOnConflictUpdate, > RelationFindReplTupleByIndex & RelationFindReplTupleSeq. Note that check in > RelationFindReplTupleByIndex & RelationFindReplTupleSeq will have LOG not an > ERROR. The first one is goi

Re: Add RANGE with values and exclusions clauses to the Window Functions

2017-11-24 Thread Erikjan Rijkers
On 2017-11-24 15:11, Oliver Ford wrote: Adds RANGE BETWEEN with a start and end value, as well as an exclusions clause, to the window functions. This partially resolves TODO list item "Implement full support for window framing clauses". [0001-window-frame-v1.patch] (debian 8) make check fails

Re: [HACKERS] Commits don't block for synchronous replication

2017-11-24 Thread Simon Riggs
On 23 November 2017 at 11:11, Michael Paquier wrote: > This is older than the bug report of this thread. All those > indications point out that the patch has *not* been committed. So it > seems to me that you perhaps committed it to your local repository, > but forgot to push it to the remote. I

Add RANGE with values and exclusions clauses to the Window Functions

2017-11-24 Thread Oliver Ford
Adds RANGE BETWEEN with a start and end value, as well as an exclusions clause, to the window functions. This partially resolves TODO list item "Implement full support for window framing clauses". == Specification == The window functions already allow a "ROWS BETWEEN start_value PRECEDING/FOLLOWI

Re: [HACKERS] WIP: Separate log file for extension

2017-11-24 Thread Antonin Houska
Antonin Houska wrote: > Magnus Hagander wrote: > > > > On Fri, Aug 25, 2017 at 12:12 AM, Antonin Houska wrote: > > > > > I like this idea in general. > > > > Then it's supposed to change some of its attributes > > > > > adjust_log_stream_attr(&stream->filename, "my_extension.log"); > >

Re: scan-build plpython stuff

2017-11-24 Thread John Naylor
Peter, I built plpython with scan-build using Python 2.7.12 and Clang 3.8. On master, I got 13 warnings, and with your patches only one warning (report attached). Make installcheck passes. Let me know if I can test anything else. -John Naylor Title: plpy_spi.c Bug Summa

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2017-11-24 Thread Antonin Houska
Masahiko Sawada wrote: > On Mon, Oct 30, 2017 at 5:48 PM, Ashutosh Bapat > wrote: > > On Thu, Oct 26, 2017 at 7:41 PM, Masahiko Sawada > > wrote: > >> > >> Because I don't want to break the current user semantics. that is, > >> currently it's guaranteed that the subsequent reads can see the >

Re: [HACKERS] Add support for tuple routing to foreign partitions

2017-11-24 Thread Etsuro Fujita
(2017/10/27 20:00), Etsuro Fujita wrote: Please find attached an updated version of the patch. Amit rebased this patch and sent me the rebased version off list. Thanks for that, Amit! One thing I noticed I overlooked is about this change I added to make_modifytable to make a valid-looking p

Re: [HACKERS] Parallel Append implementation

2017-11-24 Thread Rajkumar Raghuwanshi
On Thu, Nov 23, 2017 at 2:22 PM, amul sul wrote: > Look like it is the same crash what v20 claim to be fixed, indeed I > missed to add fix[1] in v20 patch, sorry about that. Attached updated > patch includes aforementioned fix. Hi, I have applied latest v21 patch, it got crashed when enabled par

explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2017-11-24 Thread hubert depesz lubaczewski
Hi, up to parallel executions, when we had node in explain analyze showing "loops=x" with x more than 1, it meant that the "actual time" had to be multiplied by loops to get real time spent in a node. For example, check step 13 in https://explain.depesz.com/s/gNBd It shows time of 3ms, but loops

Re: [HACKERS] Challenges preventing us moving to 64 bit transaction id (XID)?

2017-11-24 Thread Alexander Korotkov
Dear Amit, Thank you for the attention to this patch. On Thu, Nov 23, 2017 at 4:39 PM, Amit Kapila wrote: > On Thu, Jun 22, 2017 at 9:06 PM, Alexander Korotkov > wrote: > > Work on this patch took longer than I expected. It is still in not so > good > > shape, but I decided to publish it anyw

Re: documentation is now XML

2017-11-24 Thread Michael Paquier
On Fri, Nov 24, 2017 at 5:39 AM, Tom Lane wrote: > Peter Eisentraut writes: >> The documentation sources are now DocBook XML, not SGML. (The files are >> still named *.sgml. That's something to think about separately.) > > I think we should have a discussion about whether it'd be smart > to con

Re: [HACKERS] Custom compression methods

2017-11-24 Thread Ildus Kurbangaliev
On Thu, 23 Nov 2017 21:54:32 +0100 Tomas Vondra wrote: > > Hmm, this seems to have fixed it, but only in one direction. Consider > this: > > create table t_pglz (v text); > create table t_lz4 (v text compressed lz4); > > insert into t_pglz select repeat(md5(i::text),300) > fro