Re: [HACKERS] [PATCH] Lockable views

2017-10-16 Thread Yugo Nagata
On Mon, 16 Oct 2017 10:07:48 +0900 (JST) Tatsuo Ishii wrote: > >> >> test=# CREATE VIEW v3 AS SELECT count(*) FROM v1; > >> >> CREATE VIEW > >> >> test=# BEGIN; > >> >> BEGIN > >> >> test=# LOCK TABLE v3; > >> >> ERROR: cannot lock view "v3" > >> >> DETAIL: Views that

Re: [HACKERS] Partition-wise aggregation/grouping

2017-10-16 Thread Jeevan Chalke
On Fri, Oct 13, 2017 at 1:13 PM, David Rowley wrote: > > I looked over the patch and saw this: > > @@ -1800,6 +1827,9 @@ cost_merge_append(Path *path, PlannerInfo *root, > */ > run_cost += cpu_operator_cost * tuples; > > + /* Add MergeAppend node overhead like

Re: [HACKERS] Extended statistics is not working on Vars hidden under a RelabelType

2017-10-16 Thread David Rowley
On 15 October 2017 at 06:49, Robert Haas wrote: > On Fri, Oct 13, 2017 at 4:49 PM, David Rowley > wrote: >> tps = 8282.481310 (including connections establishing) >> tps = 8282.750821 (excluding connections establishing) > > vs. > >> tps =

Re: [HACKERS] GUC for cleanup indexes threshold.

2017-10-16 Thread Masahiko Sawada
On Fri, Oct 13, 2017 at 1:14 AM, Robert Haas wrote: > On Tue, Oct 10, 2017 at 5:55 AM, Pavel Golub wrote: >> DP> The new status of this patch is: Ready for Committer >> >> Seems like, we may also going to hit it and it would be cool this >> vacuum

Re: [HACKERS] [POC] hash partitioning

2017-10-16 Thread Ashutosh Bapat
On Tue, Oct 10, 2017 at 4:37 PM, amul sul wrote: > On Tue, Oct 10, 2017 at 3:42 PM, Ashutosh Bapat > wrote: >> On Tue, Oct 10, 2017 at 3:32 PM, amul sul wrote: >> +hash_part? true :

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-10-16 Thread Michael Paquier
On Thu, Sep 7, 2017 at 12:33 PM, Kyotaro HORIGUCHI wrote: > At Wed, 6 Sep 2017 12:23:53 -0700, Andres Freund wrote > in <20170906192353.ufp2dq7wm5fd6...@alap3.anarazel.de> >> I'm not following. All we need to use is the beginning of the

Re: [HACKERS] [POC] hash partitioning

2017-10-16 Thread Ashutosh Bapat
On Mon, Oct 16, 2017 at 2:36 PM, Ashutosh Bapat wrote: > > Probably we should move changes to partition_bounds_copy() in 0003 to > 0001, whose name suggests so. > We can't do this, hash partition strategy is introduced by 0002. Sorry for the noise. -- Best

Re: [HACKERS] relkind check in DefineIndex

2017-10-16 Thread Michael Paquier
On Mon, Oct 16, 2017 at 2:56 PM, Amit Langote wrote: > On 2017/10/14 4:32, Robert Haas wrote: >> On Fri, Oct 13, 2017 at 12:38 PM, Alvaro Herrera >> wrote: >>> The relkind check in DefineIndex has grown into an ugly rats nest of >>> 'if'

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

2017-10-16 Thread Amit Kapila
On Sat, Oct 14, 2017 at 11:44 PM, Tomas Vondra wrote: > Hi, > > > I propose is to add a new cursor option (PARALLEL), which would allow > parallel plans for that particular user-defined cursor. Attached is an > experimental patch doing this (I'm sure there are some

Re: [HACKERS] Determine state of cluster (HA)

2017-10-16 Thread Magnus Hagander
On Mon, Oct 16, 2017 at 4:39 AM, Craig Ringer wrote: > On 13 October 2017 at 08:50, Joshua D. Drake wrote: > > 5. There is no way to connect to a db node with something akin to > > SQL-Server's "application intent" flags, to allow a connection to

Re: [HACKERS] Parallel safety for extern params

2017-10-16 Thread Amit Kapila
On Sat, Oct 14, 2017 at 1:51 AM, Robert Haas wrote: > On Fri, Oct 13, 2017 at 1:19 AM, Amit Kapila wrote: >> After fixing this problem, when I ran the regression tests with >> force_parallel_mode = regress, I saw multiple other failures. All the

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

2017-10-16 Thread Ashutosh Bapat
On Sat, Oct 7, 2017 at 1:04 AM, Robert Haas wrote: >> >> The fix is to copy the relevant partitioning information from relcache >> into PartitionSchemeData and RelOptInfo. Here's a quick patch with >> that fix. > > Committed. I hope that makes things less red rather than

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

2017-10-16 Thread alain radix
Hi, I’m facing a problem with a PostgreSQL 9.6.2 reporting this error when selecting a table ERROR: MultiXactId 3268957 has not been created yet -- apparent wraparound The root cause is not a Postgres bug but a buggy person that used pg_resetxlogs obviously without reading or understanding

Re: [HACKERS] Determine state of cluster (HA)

2017-10-16 Thread Jehan-Guillaume de Rorthais
On Mon, 16 Oct 2017 10:39:16 +0800 Craig Ringer wrote: > On 13 October 2017 at 08:50, Joshua D. Drake wrote: > > I had a long call with a firm developing front end proxy/cache/HA for > > Postgres today. Essentially the software is a replacement

Re: [HACKERS] BLK_DONE state in XLogReadBufferForRedoExtended

2017-10-16 Thread Amit Kapila
On Fri, Oct 13, 2017 at 11:57 AM, Amit Kapila wrote: > On Fri, Oct 13, 2017 at 10:32 AM, Michael Paquier > wrote: >> On Thu, Oct 12, 2017 at 10:47 PM, Amit Kapila >> wrote: >>> Today, I was trying to think about cases

Re: [HACKERS] Aggregate FILTER option is broken in v10

2017-10-16 Thread Tom Lane
I wrote: > I think possibly the best answer is to revert 8ed3f11bb. We could > think about some compromise solution like merging the projections > only for aggregates without FILTER. But that would require two > code paths through the relevant functions in nodeAgg.c, which would > be a

[HACKERS] [PATCH] Add recovery_min_apply_delay_reconnect recovery option

2017-10-16 Thread Eric Radman
This is a patch I am using in production using the following parameters in recovery.conf: recovery_min_apply_delay = '1d' recovery_min_apply_delay_reconnect = '10 min' In our environment we expect that standby servers with an apply delay provide some protection against mistakes by the

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

2017-10-16 Thread Alvaro Herrera
RADIX Alain - externe wrote: > I'm facing a problem with a PostgreSQL 9.6.2 reporting this error when > selecting a table > ERROR: MultiXactId 3268957 has not been created yet -- apparent wraparound > > The root cause is not a Postgres bug but a buggy person that used > pg_resetxlogs

Re: [HACKERS] Extended statistics is not working on Vars hidden under a RelabelType

2017-10-16 Thread Robert Haas
On Mon, Oct 16, 2017 at 2:36 AM, David Rowley wrote: > I personally think it's great we're starting to see a useful feature > materialise that can help with poor row estimates from the planner. I agree. My original post to this thread was more of a throw-away

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

2017-10-16 Thread Tomas Vondra
On 10/16/2017 01:13 PM, Amit Kapila wrote: > On Sat, Oct 14, 2017 at 11:44 PM, Tomas Vondra > wrote: >> Hi, >> >> >> I propose is to add a new cursor option (PARALLEL), which would allow >> parallel plans for that particular user-defined cursor. Attached is an >>

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

2017-10-16 Thread RADIX Alain - externe
Hi, I'm facing a problem with a PostgreSQL 9.6.2 reporting this error when selecting a table ERROR: MultiXactId 3268957 has not been created yet -- apparent wraparound The root cause is not a Postgres bug but a buggy person that used pg_resetxlogs obviously without reading or understanding

Re: [HACKERS] Determine state of cluster (HA)

2017-10-16 Thread Joshua D. Drake
On 10/16/2017 03:55 AM, Magnus Hagander wrote: On Mon, Oct 16, 2017 at 4:39 AM, Craig Ringer > wrote: On 13 October 2017 at 08:50, Joshua D. Drake > wrote: > 5.  There is

Re: [HACKERS] Determine state of cluster (HA)

2017-10-16 Thread Joshua D. Drake
On 10/15/2017 07:39 PM, Craig Ringer wrote: On 13 October 2017 at 08:50, Joshua D. Drake wrote: -Hackers, I had a long call with a firm developing front end proxy/cache/HA for Postgres today. Essentially the software is a replacement for PGPool in entirety but also

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

2017-10-16 Thread Andres Freund
Hi Rafia, On 2017-05-19 17:25:38 +0530, Rafia Sabih wrote: > head: > explain analyse select * from t where i < 3000; > QUERY PLAN Could you share how exactly you generated the data? Just so others can compare a bit better with your

[HACKERS] Re: heap/SLRU verification, relfrozenxid cut-off, and freeze-the-dead bug (Was: amcheck (B-Tree integrity checking tool))

2017-10-16 Thread Peter Geoghegan
On Fri, Oct 13, 2017 at 7:09 PM, Noah Misch wrote: > All good questions; I don't know offhand. Discovering those answers is > perhaps the chief labor required of such a project. ISTM that by far the hardest part of the project is arriving at a consensus around what a good set

Re: [HACKERS] Aggregate FILTER option is broken in v10

2017-10-16 Thread Andres Freund
On 2017-10-16 11:12:09 -0400, Tom Lane wrote: > I wrote: > > I think possibly the best answer is to revert 8ed3f11bb. We could > > think about some compromise solution like merging the projections > > only for aggregates without FILTER. But that would require two > > code paths through the

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-10-16 Thread Noah Misch
On Sun, Aug 20, 2017 at 10:37:10PM +0200, Pavel Stehule wrote: > > We have xpath-bugfix.patch and xpath-parsing-error-fix.patch. Both are > > equivalent under supported use cases (xpath in UTF8 databases). Among > > non-supported use cases, they each make different things better and > >

Re: [HACKERS] Still another race condition in recovery TAP tests

2017-10-16 Thread Michael Paquier
On Tue, Oct 17, 2017 at 5:01 AM, Robert Haas wrote: > On Fri, Oct 6, 2017 at 5:57 AM, Craig Ringer wrote: >>> Fewer people will test as we grow the list of modules they must first >>> install. >> At worst, all we have to do is provide a script >>

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-10-16 Thread Peter Geoghegan
On Sat, Oct 14, 2017 at 2:47 PM, Peter Geoghegan wrote: > I am working on an experimental version of pg_filedump, customized to > output XML that can be interpreted by an open source hex editor. The > XML makes the hex editor produce color coded, commented > tags/annotations for any

Re: [HACKERS] Still another race condition in recovery TAP tests

2017-10-16 Thread Robert Haas
On Fri, Oct 6, 2017 at 5:57 AM, Craig Ringer wrote: >> Fewer people will test as we grow the list of modules they must first >> install. > > Meh, I don't buy that. Well, I do. Prerequisites are a pain, and the more of them there are, the more pain it is. > At worst, all

Re: [HACKERS] coverage analysis improvements

2017-10-16 Thread Peter Eisentraut
On 9/27/17 01:52, Michael Paquier wrote: > I am marking the full set of patches as ready for committer. All these patches have now been committed. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via

Re: [HACKERS] oversight in EphemeralNamedRelation support

2017-10-16 Thread Tom Lane
Thomas Munro writes: > On Fri, Oct 13, 2017 at 10:01 AM, Tom Lane wrote: >> But I see very >> little case for allowing CTEs to capture such references, because surely >> we are never going to allow that to do anything useful, and we have >>

Re: [HACKERS] Is it time to kill support for very old servers?

2017-10-16 Thread Peter Eisentraut
On 9/20/17 04:32, Andres Freund wrote: > Here's what I roughly was thinking of. I don't quite like the name, and > the way the version is specified for libpq (basically just the "raw" > integer). "forced_protocol_version" reads wrong to me. I think "force_protocol_version" might be better.

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

2017-10-16 Thread Thomas Munro
Hi hackers, Vik Fearing asked off-list why hash joins appear to read slightly more temporary data than they write. The reason is that we notch up a phantom block read when we hit the end of each file. Harmless but it looks a bit weird and it's easily fixed. Unpatched, a 16 batch hash join

Re: [HACKERS] [PATCH] Add recovery_min_apply_delay_reconnect recovery option

2017-10-16 Thread Michael Paquier
On Tue, Oct 17, 2017 at 12:51 AM, Eric Radman wrote: > This administrative compromise is necessary because the WalReceiver is > not resumed after a network interruption until all records are read, > verified, and applied from the archive on disk. Taking a step back here...

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-10-16 Thread Pavel Stehule
2017-10-17 1:57 GMT+02:00 Noah Misch : > On Sun, Aug 20, 2017 at 10:37:10PM +0200, Pavel Stehule wrote: > > > We have xpath-bugfix.patch and xpath-parsing-error-fix.patch. Both are > > > equivalent under supported use cases (xpath in UTF8 databases). Among > > > non-supported

Re: [HACKERS] BLK_DONE state in XLogReadBufferForRedoExtended

2017-10-16 Thread Michael Paquier
On Mon, Oct 16, 2017 at 9:50 PM, Amit Kapila wrote: > If above analysis is correct, then I think we can say that row state > in a page will be same during recovery as it was when the original > operation was performed if the full_page_writes are enabled. I am not > sure

Re: [HACKERS] Determine state of cluster (HA)

2017-10-16 Thread Craig Ringer
On 17 October 2017 at 01:02, Joshua D. Drake wrote: > On 10/15/2017 07:39 PM, Craig Ringer wrote: >> >> On 13 October 2017 at 08:50, Joshua D. Drake wrote: >>> >>> -Hackers, >>> >>> I had a long call with a firm developing front end proxy/cache/HA

Re: [HACKERS] [PATCH] Lockable views

2017-10-16 Thread Tatsuo Ishii
> I'm a bit confused. What is difference between tables and functions > in a subquery with regard to view locking? I think also none view queries > using a subquery do not care about the changes of tables in the > subquery while executing the query. I might be misnderstanding > the problem you

[HACKERS] Re: heap/SLRU verification, relfrozenxid cut-off, and freeze-the-dead bug (Was: amcheck (B-Tree integrity checking tool))

2017-10-16 Thread Noah Misch
On Mon, Oct 16, 2017 at 12:57:39PM -0700, Peter Geoghegan wrote: > On Fri, Oct 13, 2017 at 7:09 PM, Noah Misch wrote: > > The checker should > > consider circumstances potentially carried from past versions via > > pg_upgrade. > > Right. False positives are simply

Re: [HACKERS] Is it time to kill support for very old servers?

2017-10-16 Thread Andres Freund
On 2017-10-16 16:59:59 -0400, Peter Eisentraut wrote: > On 9/20/17 04:32, Andres Freund wrote: > > Here's what I roughly was thinking of. I don't quite like the name, and > > the way the version is specified for libpq (basically just the "raw" > > integer). > > "forced_protocol_version" reads

Re: [HACKERS] replace GrantObjectType with ObjectType

2017-10-16 Thread Michael Paquier
On Thu, Oct 12, 2017 at 5:43 PM, Alvaro Herrera wrote: > Michael Paquier wrote: >> On Thu, Oct 12, 2017 at 7:55 AM, Peter Eisentraut >> wrote: >> > It seems to me that having ACL_OBJECT_* symbols alongside OBJECT_* >> > symbols is not

[HACKERS] Fix typo in blvacuum.c

2017-10-16 Thread Seki, Eiji
Hi all, I found a typo in comment of blvacuum.c, so attach the patch for it. -- Regards, Eiji Seki Fujitsu fix_comment_in_blvacuum_c.patch Description: fix_comment_in_blvacuum_c.patch -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

[HACKERS] Aggregate FILTER option is broken in v10

2017-10-16 Thread Tom Lane
Consider regression=# select sum(1/ten) filter (where ten>0) from tenk1; ERROR: division by zero This query works without error in versions before 10. It was evidently broken by commit 8ed3f11bb, which rearranged nodeAgg.c to evaluate all aggregate input expressions before considering any

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

2017-10-16 Thread Rafia Sabih
On Tue, Oct 17, 2017 at 3:22 AM, Andres Freund wrote: > Hi Rafia, > > On 2017-05-19 17:25:38 +0530, Rafia Sabih wrote: >> head: >> explain analyse select * from t where i < 3000; >> QUERY PLAN > > Could you share