Re: [HACKERS] Should pg_current_wal_location() become pg_current_wal_lsn()

2017-05-05 Thread Tom Lane
Noah Misch writes: > On Fri, May 05, 2017 at 03:36:39AM +1200, David Rowley wrote: >> Do any of the committers who voted for this change feel inclined to >> pick this patch up? > I'll echo that question. This open item lacks a clear owner. One might argue > that 806091c caused it by doing the b

Re: [HACKERS] Should pg_current_wal_location() become pg_current_wal_lsn()

2017-05-05 Thread Noah Misch
On Fri, May 05, 2017 at 03:36:39AM +1200, David Rowley wrote: > On 2 May 2017 at 00:10, David Rowley wrote: > > On 20 April 2017 at 07:29, Euler Taveira wrote: > >> 2017-04-19 1:32 GMT-03:00 Michael Paquier : > >>> > >>> I vote for "location" -> "lsn". I would expect complains about the > >>> cur

Re: [HACKERS] delta relations in AFTER triggers

2017-05-05 Thread Noah Misch
On Fri, May 05, 2017 at 08:23:33AM +1200, Thomas Munro wrote: > On Fri, May 5, 2017 at 12:39 AM, Neha Sharma > wrote: > > While testing the feature we encountered one more crash,below is the > > scenario to reproduce. > > > > create table t1 ( a int); > > create table t2 ( a int); > > insert into

Re: [HACKERS] delta relations in AFTER triggers

2017-05-05 Thread Noah Misch
On Thu, May 04, 2017 at 09:51:03PM +1200, Thomas Munro wrote: > On Thu, May 4, 2017 at 9:12 PM, Prabhat Sahu > wrote: > > I have been testing this for a while and observed a server crash while > > referencing table column value in a trigger procedure for AFTER DELETE > > trigger. > > > > -- Step

Re: [HACKERS] [PATCH] New command to monitor progression of long running queries

2017-05-05 Thread Jaime Casanova
On 5 May 2017 at 22:38, Vinayak Pokale wrote: > > On Mon, Apr 17, 2017 at 9:09 PM, Remi Colinet > wrote: >> >> Hello, >> >> I've implemented a new command named PROGRESS to monitor progression of >> long running SQL queries in a backend process. >> > Thank you for the patch. > sorry if i'm bikes

Re: [HACKERS] [PATCH] New command to monitor progression of long running queries

2017-05-05 Thread Vinayak Pokale
On Mon, Apr 17, 2017 at 9:09 PM, Remi Colinet wrote: > Hello, > > I've implemented a new command named PROGRESS to monitor progression of > long running SQL queries in a backend process. > > Thank you for the patch. I am testing your patch but after applying your patch other regression test fail

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-05-05 Thread Stephen Frost
Noah, On Fri, May 5, 2017 at 23:19 Noah Misch wrote: > On Thu, May 04, 2017 at 05:47:02PM -0400, Stephen Frost wrote: > > * Amit Langote (amitlangot...@gmail.com) wrote: > > > On Wed, May 3, 2017 at 12:05 PM, Stephen Frost > wrote: > > > > Assuming this looks good to you, I'll push it tomorrow,

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-05-05 Thread Noah Misch
On Thu, May 04, 2017 at 05:47:02PM -0400, Stephen Frost wrote: > * Amit Langote (amitlangot...@gmail.com) wrote: > > On Wed, May 3, 2017 at 12:05 PM, Stephen Frost wrote: > > > Assuming this looks good to you, I'll push it tomorrow, possibly with > > > other minor adjustments and perhaps a few mor

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-05 Thread Amit Kapila
On Sat, May 6, 2017 at 4:41 AM, Amit Kapila wrote: > On Fri, May 5, 2017 at 9:32 PM, Robert Haas wrote: >> On Fri, May 5, 2017 at 11:15 AM, Amit Kapila wrote: >>> I am not saying to rip those changes. Your most of the mail stresses >>> about the 30-second timeout which you have added in the pat

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-05 Thread Thomas Munro
On Sat, May 6, 2017 at 7:34 AM, Robert Haas wrote: > On Thu, May 4, 2017 at 10:20 PM, David Rowley > wrote: >> Now I'm not going to pretend that this patch is ready for the >> prime-time. I've not yet worked out how to properly report sync-scan >> locations without risking reporting later pages a

Re: [HACKERS] [patch] Build pgoutput with MSVC

2017-05-05 Thread MauMau
From: Michael Paquier Magnus has already pushed it as 28d1c8c. +if exist src\backend\replication\libpqwalreceiver\win32ver.rc del /q src\backend\replication\pgoutput\win32ver.rc This is not right by the way, you need to check for the existence of the file in pgoutput/, not libpqwalreceiver/. I'm

[HACKERS] Draft release notes for next week's back-branch releases

2017-05-05 Thread Tom Lane
I've written $SUBJECT ... you can find them at https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=54dbd4dc78b045ffcc046b9a43681770c3992dd4 and in an hour or so they should be built in the devel docs at https://www.postgresql.org/docs/devel/static/release-9-6-3.html As usual, thi

Re: [HACKERS] [patch] Build pgoutput with MSVC

2017-05-05 Thread Michael Paquier
On Sat, May 6, 2017 at 7:07 AM, MauMau wrote: > From: Magnus Hagander > If that's all that's required, I'll just go ahead and commit it right > away, including the clean.bat. > > I think the problem with clean.bat isn't cleaning up pgoutput.dll -- > that one goes in a different directory. But it d

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-05 Thread Amit Kapila
On Fri, May 5, 2017 at 9:32 PM, Robert Haas wrote: > On Fri, May 5, 2017 at 11:15 AM, Amit Kapila wrote: >> I am not saying to rip those changes. Your most of the mail stresses >> about the 30-second timeout which you have added in the patch to >> detect timeouts during failures (rollback proces

Re: [HACKERS] PG 10 release notes

2017-05-05 Thread Bruce Momjian
On Fri, May 5, 2017 at 02:28:50PM +0200, Petr Jelinek wrote: > On 05/05/17 02:46, Bruce Momjian wrote: > > I am getting tired of saying this. When I am writing the release notes, > > I am trying to figure out how it affects our shipped code, and the only > > "decoding" I know of is test_decoding.

Re: [HACKERS] [patch] Build pgoutput with MSVC

2017-05-05 Thread MauMau
From: Magnus Hagander If that's all that's required, I'll just go ahead and commit it right away, including the clean.bat. I think the problem with clean.bat isn't cleaning up pgoutput.dll -- that one goes in a different directory. But it does need to clean up the win32ver.rc file that gets dropp

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-05 Thread Peter Geoghegan
On Fri, May 5, 2017 at 12:40 PM, Robert Haas wrote: > One idea that crossed my mind is to just have workers write all of > their output tuples to a temp file and have the leader read them back > in. At some cost in I/O, this would completely eliminate the overhead > of workers waiting for the lea

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-05 Thread Andres Freund
Hi, On 2017-05-05 15:29:40 -0400, Robert Haas wrote: > On Thu, May 4, 2017 at 9:37 PM, Andres Freund wrote: > It's pretty easy (but IMHO not very interesting) to measure internal > contention in the Parallel Seq Scan node. As David points out > downthread, that problem isn't trivial to fix, but

Re: [HACKERS] Row Level Security UPDATE Confusion

2017-05-05 Thread Stephen Frost
Rod, * Rod Taylor (rod.tay...@gmail.com) wrote: > UPDATE seems to work as described (unable to create records you cannot > select); both the single rule version and multi-rule version seem to work > the same. I'm glad they work the same now, as they were always intended to. Regarding the "rules"

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-05 Thread Robert Haas
On Thu, May 4, 2017 at 10:36 PM, David Rowley wrote: > On 3 May 2017 at 07:13, Robert Haas wrote: >> Multiple people (including David Rowley >> as well as folks here at EnterpriseDB) have demonstrated that for >> certain queries, we can actually use a lot more workers and everything >> works grea

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-05 Thread Robert Haas
On Thu, May 4, 2017 at 10:20 PM, David Rowley wrote: > Now I'm not going to pretend that this patch is ready for the > prime-time. I've not yet worked out how to properly report sync-scan > locations without risking reporting later pages after reporting the > end of the scan. What I have at the mo

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-05 Thread Robert Haas
On Thu, May 4, 2017 at 9:37 PM, Andres Freund wrote: > Have those benchmarks, even in a very informal form, been shared / > collected / referenced centrally? I'd be very interested to know where > the different contention points are. Possibilities: > > - in non-resident workloads: too much concur

Re: [HACKERS] Row Level Security UPDATE Confusion

2017-05-05 Thread Rod Taylor
Hmm. UPDATE seems to work as described (unable to create records you cannot select); both the single rule version and multi-rule version seem to work the same. This combination works too though it seems funny that UPDATE can create an entry it cannot reverse. I can set the value to 100 (going to

Re: [HACKERS] idea: custom log_line_prefix components besides application_name

2017-05-05 Thread Robert Haas
On Thu, May 4, 2017 at 10:59 AM, Chapman Flack wrote: > invalid input syntax for integer: "21' && 1=2)) Uni/**/ON > SEl/**/eCT 0x646665743166657274,0x646665743266657274, > 0x646665743366657274 -- " Now that is choice. I wonder what specific database system that's targeting... > I just wonder if

Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.

2017-05-05 Thread Robert Haas
On Fri, May 5, 2017 at 1:51 PM, Petr Jelinek wrote: > Syntax of ALTER command is correct, syntax of the connection string is > not, you are probably getting errors in log from the replication worker. > > We could check validity of the connection string though to complain > immediately like we do i

Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.

2017-05-05 Thread Petr Jelinek
On 05/05/17 14:40, tushar wrote: > Hi, > > While testing 'logical replication' against v10 , i encountered one > issue where data stop migrating after ALTER PUBLICATION. > > X Server > \\ Make sure wal_level is set to logical in postgresql.conf file > \\create table/Insert 1 row -> create table t

Re: [HACKERS] snapbuild woes

2017-05-05 Thread Petr Jelinek
On 05/05/17 18:18, Andres Freund wrote: > On 2017-05-05 13:53:16 +0200, Petr Jelinek wrote: >> On 05/05/17 02:42, Andres Freund wrote: >>> On 2017-05-04 17:00:04 -0700, Andres Freund wrote: Attached is a prototype patch for that. >>> >> >> I am not sure I understand the ABI comment for started

Re: [HACKERS] logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)

2017-05-05 Thread Petr Jelinek
On 02/05/17 15:31, Tom Lane wrote: > Petr Jelinek writes: >> Let me expand, if we don't drop the slot by default when dropping >> subscription, we'll have a lot of users with dead slots laying around >> holding back WAL/catalog_xmin, that's really bad. If we do drop by >> default like now, we need

Re: [HACKERS] compiler warning with VS 2017

2017-05-05 Thread Tom Lane
Petr Jelinek writes: > On 05/05/17 16:56, Tom Lane wrote: >> So the comment should be something like "if the column is unchanged, >> we should not attempt to access its value beyond this point. To >> help catch any such attempts, set the string to NULL" ? > Yes that sounds about right. We don't

Re: [HACKERS] what's up with IDENTIFIER_LOOKUP_EXPR?

2017-05-05 Thread Tom Lane
Robert Haas writes: > On Thu, May 4, 2017 at 6:05 PM, Tom Lane wrote: >> PLpgSQL_datum is really a symbol table entry. The conflict against what >> we mean by "Datum" elsewhere is pretty unfortunate. > Yeah. That's particularly bad because datum is a somewhat vague word > under the best of cir

Re: [HACKERS] snapbuild woes

2017-05-05 Thread Andres Freund
On 2017-05-05 13:53:16 +0200, Petr Jelinek wrote: > On 05/05/17 02:42, Andres Freund wrote: > > On 2017-05-04 17:00:04 -0700, Andres Freund wrote: > >> Attached is a prototype patch for that. > > > > I am not sure I understand the ABI comment for started_collection_at. > What's the ABI issue? The

Re: [HACKERS] Row Level Security UPDATE Confusion

2017-05-05 Thread Stephen Frost
Rod, Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Apr 14, 2017 at 9:16 AM, Stephen Frost wrote: > > I agreed already up-thread that there's an issue there and will be > > looking to fix it. That comment was simply replying to Rod's point that > > the documentation could also be

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-05 Thread Robert Haas
On Fri, May 5, 2017 at 11:15 AM, Amit Kapila wrote: > I am not saying to rip those changes. Your most of the mail stresses > about the 30-second timeout which you have added in the patch to > detect timeouts during failures (rollback processing). I have no > objection to that part of the patch e

Re: [HACKERS] what's up with IDENTIFIER_LOOKUP_EXPR?

2017-05-05 Thread Robert Haas
On Thu, May 4, 2017 at 6:05 PM, Tom Lane wrote: > PLpgSQL_datum is really a symbol table entry. The conflict against what > we mean by "Datum" elsewhere is pretty unfortunate. Yeah. That's particularly bad because datum is a somewhat vague word under the best of circumstances (like "thing"). M

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-05 Thread Amit Kapila
On Fri, May 5, 2017 at 7:44 PM, Robert Haas wrote: > On Fri, May 5, 2017 at 1:01 AM, Amit Kapila wrote: >> I have tried to verify above point and it seems to me in such a >> situation the transaction status will be either PQTRANS_INTRANS or >> PQTRANS_INERROR. I have tried to mimic "out of memor

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-05 Thread Peter Eisentraut
On 5/2/17 21:44, Noah Misch wrote: >> I wonder if we should have an --no-subscriptions option, now that they >> are dumped by default, just like we have --no-blobs, --no-owner, >> --no-password, --no-privileges, --no-acl, --no-tablespaces, and >> --no-security-labels. It seems like there is probab

Re: [HACKERS] compiler warning with VS 2017

2017-05-05 Thread Petr Jelinek
On 05/05/17 16:56, Tom Lane wrote: > Petr Jelinek writes: >> On 05/05/17 06:50, Tom Lane wrote: >>> Actually, looking around a bit there, it's not even clear why >>> we should be booby-trapping the value of an unchanged column in >>> the first place. So I'd say that not only is the code dubious >

Re: [HACKERS] compiler warning with VS 2017

2017-05-05 Thread Tom Lane
Petr Jelinek writes: > On 05/05/17 06:50, Tom Lane wrote: >> Actually, looking around a bit there, it's not even clear why >> we should be booby-trapping the value of an unchanged column in >> the first place. So I'd say that not only is the code dubious >> but the comment is inadequate too. > H

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-05-05 Thread Peter Eisentraut
On 5/5/17 01:26, Michael Paquier wrote: > The only code path doing HOT-pruning and generating WAL is > heap_page_prune(). Do you think that we need to worry about FPWs as > well? > > Attached is an updated patch, which also forbids the run of any > replication commands when the stopping state is r

Re: [HACKERS] Why type coercion is not performed for parameters?

2017-05-05 Thread Tom Lane
Konstantin Knizhnik writes: > So my question is whether it is possible to use the same rule for type > coercion of parameters as for constant? It's not possible, I think, and even if it is, we would almost certainly reject a patch that tried to do it. There are four different ways to spell type

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-05 Thread Robert Haas
On Fri, May 5, 2017 at 1:01 AM, Amit Kapila wrote: > I have tried to verify above point and it seems to me in such a > situation the transaction status will be either PQTRANS_INTRANS or > PQTRANS_INERROR. I have tried to mimic "out of memory" failure by > making PQmakeEmptyPGresult return NULL (m

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-05-05 Thread Alvaro Herrera
Paresh More wrote: > Hello Alvaro, > > I applied the patch which you mentioned and tried compiling postgresql > server for windows 32 and 64 and the results are:- > > 1) postgresql server(96) with tcl version 8.5 is compiling fine with out > any issue. > 2) postgresql server(10) snapshot with tc

[HACKERS] May cause infinite loop when initializing rel-cache contains partitioned table

2017-05-05 Thread 甄明洋
The function of initializing rel-cache is RelationCacheInitializePhase3 and in src/backend/utils/cache/relcache.c file. When initializing the partition description information, we forget to check if partition key or descriptor is NULL. Therefore, after the loop restarts, the partition informati

Re: [HACKERS] CTE inlining

2017-05-05 Thread David Rowley
On 5 May 2017 at 14:04, Tom Lane wrote: > Craig Ringer writes: >> We're carefully maintaining this bizarre cognitive dissonance where we >> justify the need for using this as a planner hint at the same time as >> denying that we have a hint. That makes it hard to make progress here. >> I think th

Re: [HACKERS] password_encryption, default and 'plain' support

2017-05-05 Thread Michael Paquier
On Thu, May 4, 2017 at 8:37 PM, Heikki Linnakangas wrote: > On 05/03/2017 08:40 PM, Tom Lane wrote: >> >> The other question I can think to ask is what will happen during >> pg_upgrade, given an existing installation with one or more passwords >> stored plain. If the answer is "silently convert t

[HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.

2017-05-05 Thread tushar
Hi, While testing 'logical replication' against v10 , i encountered one issue where data stop migrating after ALTER PUBLICATION. X Server \\ Make sure wal_level is set to logical in postgresql.conf file \\create table/Insert 1 row -> create table test(n int); insert into t values (1); \\crea

Re: [HACKERS] [patch] Build pgoutput with MSVC

2017-05-05 Thread Petr Jelinek
On 05/05/17 12:10, Magnus Hagander wrote: > > On Fri, May 5, 2017 at 11:58 AM, Michael Paquier > mailto:michael.paqu...@gmail.com>> wrote: > > On Fri, May 5, 2017 at 6:10 PM, MauMau > wrote: > > The pgoutput is not built with MSVC. The attached patch fixe

Re: [HACKERS] PG 10 release notes

2017-05-05 Thread Petr Jelinek
On 05/05/17 02:46, Bruce Momjian wrote: > On Thu, May 4, 2017 at 05:09:40PM -0700, Andres Freund wrote: I would not in any way refer to logical decoding as being only a proof of concept, even before logical replication. >>> >>> The community ships a reliable logical _encoding_, and a tes

Re: [HACKERS] PG 10 release notes

2017-05-05 Thread Petr Jelinek
On 05/05/17 03:26, Andres Freund wrote: > On 2017-05-04 18:23:38 -0700, Peter Geoghegan wrote: >> On Thu, May 4, 2017 at 6:08 PM, Robert Haas wrote: E.g. to power amazon's data migration service (yes, that scares me). >>> >>> If you recall, I did predict prior to commit that test_decoding wou

Re: [HACKERS] compiler warning with VS 2017

2017-05-05 Thread Petr Jelinek
On 05/05/17 06:50, Tom Lane wrote: > Haribabu Kommi writes: >> I am getting a compiler warning when I build the latest HEAD PostgreSQL with >> visual studio 2017. >> The code at the line is, >> tuple->values[i] = (char *) (Size)0xdeadbeef; /* make bad usage more obvious >> */ > > Yeah, you're no

Re: [HACKERS] snapbuild woes

2017-05-05 Thread Petr Jelinek
On 05/05/17 02:42, Andres Freund wrote: > On 2017-05-04 17:00:04 -0700, Andres Freund wrote: >> Attached is a prototype patch for that. > I am not sure I understand the ABI comment for started_collection_at. What's the ABI issue? The struct is private to snapbuild.c module. Or you want to store i

Re: [HACKERS] Duplicate usage of tablespace location?

2017-05-05 Thread Neha Khatri
As Kyotaro san pointed out, the commit 22817041 started allowing creation of multiple "tablespace version directories" in same location. However the original purpose of that commit was to allow that just for the upgrade purpose. So couple of points: - The commit violated the requirement of emptines

Re: [HACKERS] Logical replication - TRAP: FailedAssertion in pgstat.c

2017-05-05 Thread Petr Jelinek
On 03/05/17 13:23, Erik Rijkers wrote: > On 2017-05-03 08:17, Petr Jelinek wrote: >> On 02/05/17 20:43, Robert Haas wrote: >>> On Thu, Apr 20, 2017 at 2:58 PM, Peter Eisentraut > code path that calls CommitTransactionCommand() should have one, no? >>> >>> Is there anything left to be committe

Re: [HACKERS] snapbuild woes

2017-05-05 Thread Petr Jelinek
On 05/05/17 02:00, Andres Freund wrote: > Hi, > > On 2017-05-02 08:55:53 +0200, Petr Jelinek wrote: >> Aah, now I understand we talked about slightly different things, I >> considered the running thing to be first step towards tracking aborted >> txes everywhere. >> I think >> we'll have to revisi

Re: [HACKERS] Why type coercion is not performed for parameters?

2017-05-05 Thread Konstantin Knizhnik
On 05.05.2017 13:29, Marko Tiikkaja wrote: But you know that the type of the literal "10" is int. If you're throwing that information away, surely that's a bug in your code. Yes, in case of integer literal I can easily determine parameter type. But in case of string literal I have to set U

Re: [HACKERS] Why type coercion is not performed for parameters?

2017-05-05 Thread Marko Tiikkaja
On Fri, May 5, 2017 at 10:58 AM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > If I evaluate expression typename('literal'), then type coercion is > performed and the function is successfully resolved, i.e. > > SELECT regnamespace('"pg_catalog"'); > > But if I want to prepare this

Re: [HACKERS] [patch] Build pgoutput with MSVC

2017-05-05 Thread Magnus Hagander
On Fri, May 5, 2017 at 11:58 AM, Michael Paquier wrote: > On Fri, May 5, 2017 at 6:10 PM, MauMau wrote: > > The pgoutput is not built with MSVC. The attached patch fixes this. > > I confirmed that a few INSERTs were replicated correctly. > > > > Should I add this matter in the PostgreSQL 10 Ope

Re: [HACKERS] [patch] Build pgoutput with MSVC

2017-05-05 Thread Michael Paquier
On Fri, May 5, 2017 at 6:10 PM, MauMau wrote: > The pgoutput is not built with MSVC. The attached patch fixes this. > I confirmed that a few INSERTs were replicated correctly. > > Should I add this matter in the PostgreSQL 10 Open Items page? Yes, with Peter as committer and Petr as owner. +

[HACKERS] [patch] Build pgoutput with MSVC

2017-05-05 Thread MauMau
Hello, I tried logical replication on Windows, but it failed like this: postgres=# create subscription mysub connection 'host=localhost port=5433 user=tuna dbname=postgres' publication mypub with (nocopy data); NOTICE: synchronized table states ERROR: could not create replication slot "mysu

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-05-05 Thread Michael Paquier
On Fri, May 5, 2017 at 5:33 PM, Pavan Deolasee wrote: > > > On Fri, May 5, 2017 at 10:56 AM, Michael Paquier > wrote: >> >> On Wed, May 3, 2017 at 12:25 AM, Peter Eisentraut >> >> >> >>> Can we prevent HOT pruning during logical decoding? >> >> >> >> It does not sound much difficult to do, couldn

[HACKERS] Why type coercion is not performed for parameters?

2017-05-05 Thread Konstantin Knizhnik
Hi hackers, If I evaluate expression typename('literal'), then type coercion is performed and the function is successfully resolved, i.e. SELECT regnamespace('"pg_catalog"'); But if I want to prepare this query, I get the error: postgres=# prepare foo as SELECT regnamespace($1);

Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL

2017-05-05 Thread Paresh More
Hello Alvaro, I applied the patch which you mentioned and tried compiling postgresql server for windows 32 and 64 and the results are:- 1) postgresql server(96) with tcl version 8.5 is compiling fine with out any issue. 2) postgresql server(10) snapshot with tcl version 8.6 is also compiling fin

Re: [HACKERS] Error message on missing SCRAM authentication with older clients

2017-05-05 Thread Heikki Linnakangas
On 05/05/2017 11:26 AM, Magnus Hagander wrote: On Fri, May 5, 2017 at 10:19 AM, Aleksander Alekseev < a.aleks...@postgrespro.ru> wrote: psql: SCRAM authentication requires libpq version 10 or above Sounds good. +1. Ok, committed. Thanks! - Heikki -- Sent via pgsql-hackers mailing list

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-05-05 Thread Pavan Deolasee
On Fri, May 5, 2017 at 10:56 AM, Michael Paquier wrote: > On Wed, May 3, 2017 at 12:25 AM, Peter Eisentraut > > > >>> Can we prevent HOT pruning during logical decoding? > >> > >> It does not sound much difficult to do, couldn't you just make it a > >> no-op with am_walsender? > > > > That's my h

Re: [HACKERS] Error message on missing SCRAM authentication with older clients

2017-05-05 Thread Magnus Hagander
On Fri, May 5, 2017 at 10:19 AM, Aleksander Alekseev < a.aleks...@postgrespro.ru> wrote: > Hi Heikki, > > > psql: SCRAM authentication requires libpq version 10 or above > > Sounds good. > > +1. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redp

Re: [HACKERS] Error message on missing SCRAM authentication with older clients

2017-05-05 Thread Aleksander Alekseev
Hi Heikki, > psql: SCRAM authentication requires libpq version 10 or above Sounds good. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] password_encryption, default and 'plain' support

2017-05-05 Thread Magnus Hagander
On Fri, May 5, 2017 at 9:38 AM, Albe Laurenz wrote: > Tom Lane wrote: > > Robert Haas writes: > >> On Wed, May 3, 2017 at 7:31 AM, Heikki Linnakangas > wrote: > >>> So, I propose that we remove support for password_encryption='plain' in > >>> PostgreSQL 10. If you try to do that, you'll get an

Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range

2017-05-05 Thread Dmitriy Sarafannikov
Amit, thanks for comments! > 1. > +#define InitNonVacuumableSnapshot(snapshotdata) \ > + do { \ > + (snapshotdata).satisfies = HeapTupleSatisfiesNonVacuumable; \ > + (snapshotdata).xmin = RecentGlobalDataXmin; \ > + } while(0) > + > > Can you explain and add comments why you think RecentGlobalDa

Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range

2017-05-05 Thread Amit Kapila
On Thu, May 4, 2017 at 9:42 PM, Dmitriy Sarafannikov wrote: > >> Maybe we need another type of snapshot that would accept any >> non-vacuumable tuple. I really don't want SnapshotAny semantics here, >> but a tuple that was live more recently than the xmin horizon seems >> like it's acceptable eno

Re: [HACKERS] password_encryption, default and 'plain' support

2017-05-05 Thread Albe Laurenz
Tom Lane wrote: > Robert Haas writes: >> On Wed, May 3, 2017 at 7:31 AM, Heikki Linnakangas wrote: >>> So, I propose that we remove support for password_encryption='plain' in >>> PostgreSQL 10. If you try to do that, you'll get an error. >> I have no idea how widely used that option is. > Is it

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-05 Thread Amit Kapila
On Fri, May 5, 2017 at 11:57 AM, Andres Freund wrote: > Hi, > > On 2017-05-05 11:50:12 +0530, Amit Kapila wrote: >> I see that EndPos can be updated in one of the cases after releasing >> the lock (refer below code). Won't that matter? > > I can't see how it'd in the cases that'd matter for > GetL

Re: [HACKERS] CTE inlining

2017-05-05 Thread Albe Laurenz
Thomas Kellerer wrote: >> 1) we switch unmarked CTEs as inlineable by default in pg11. > > +1 from me for option 1 +1 from me as well, FWIW. Yours, Laurenz Albe -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/

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

2017-05-05 Thread Jeevan Ladhe
Hi Rahila, I am not able add a new partition if default partition is further partitioned with default partition. Consider example below: postgres=# CREATE TABLE test ( a int, b int, c int) PARTITION BY LIST (a); CREATE TABLE postgres=# CREATE TABLE test_p1 PARTITION OF test FOR VALUES IN(4, 5, 6

Re: [HACKERS] Some thoughts about SCRAM implementation

2017-05-05 Thread Heikki Linnakangas
On 04/10/2017 09:28 PM, Álvaro Hernández Tortosa wrote: On 10/04/17 13:02, Heikki Linnakangas wrote: On 04/10/2017 12:39 PM, Álvaro Hernández Tortosa wrote: * The nonce length is not specified by the RFC. I see typical implementations use 24 chars for the client and 18 for the server. Current c

Re: [HACKERS] Authentication tests, and plain 'password' authentication with a SCRAM verifier

2017-05-05 Thread Heikki Linnakangas
On 03/14/2017 09:25 PM, Heikki Linnakangas wrote: On 03/14/2017 09:02 PM, Jeff Janes wrote: The message returned to the client for the wrong password differs between pg_hba-set scram and pg_hba-set md5/password methods. Is that OK? psql: error received from server in SASL exchange: invalid-pro

Re: [HACKERS] Logical replication - TRAP: FailedAssertion in pgstat.c

2017-05-05 Thread Noah Misch
On Wed, May 03, 2017 at 01:23:19PM +0200, Erik Rijkers wrote: > On 2017-05-03 08:17, Petr Jelinek wrote: > >On 02/05/17 20:43, Robert Haas wrote: > >>On Thu, Apr 20, 2017 at 2:58 PM, Peter Eisentraut > > >>>code path that calls CommitTransactionCommand() should have one, no? > >> > >>Is there anyt

Re: [HACKERS] Logical replication ApplyContext bloat

2017-05-05 Thread Noah Misch
On Wed, May 03, 2017 at 12:02:41PM +0300, Stas Kelvich wrote: > > On 20 Apr 2017, at 17:01, Dilip Kumar wrote: > > On Thu, Apr 20, 2017 at 7:04 PM, Stas Kelvich > > wrote: > >> Thanks for noting. > >> > >> Added short description of ApplyContext and ApplyMessageContext to README. > > > > Typo

Re: [HACKERS] Time based lag tracking for logical replication

2017-05-05 Thread Noah Misch
On Wed, May 03, 2017 at 08:28:53AM +0200, Simon Riggs wrote: > On 23 April 2017 at 01:10, Petr Jelinek wrote: > > Hi, > > > > The time based lag tracking commit [1] added interface for logging > > progress of replication so that we can report lag as time interval > > instead of just bytes. But the