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

2018-02-16 Thread Amit Kapila
On Fri, Feb 16, 2018 at 9:29 AM, Ashutosh Bapat wrote: > On Thu, Feb 15, 2018 at 7:47 PM, Amit Kapila wrote: >> On Thu, Feb 15, 2018 at 4:18 PM, Ashutosh Bapat >> wrote: >>> I happened to look at the patch for something else. But here are some >>> comments. If any of those have been already disc

Re: Server Crash while executing pg_replication_slot_advance (second time)

2018-02-16 Thread Arseny Sher
Hello, I confirm this bug. The idea is that while usually we start decoding from safe data.restart_lsn point, here we don't care about consistent snapshots and rush into decoding right away from data.confirmed_flush (slotfunc.c:475). The latter points to the first page's header instead of valid r

Re: pgsql: Do execGrouping.c via expression eval machinery, take two.

2018-02-16 Thread Andres Freund
Hi, On 2018-02-16 22:48:39 +, Andres Freund wrote: > Do execGrouping.c via expression eval machinery, take two. > > This has a performance benefit on own, although not hugely so. The > primary benefit is that it will allow for to JIT tuple deforming and > comparator invocations. > > Large pa

Re: Disabling src/test/[ssl|ldap] when not building with SSL/LDAP support

2018-02-16 Thread Michael Paquier
On Fri, Feb 16, 2018 at 03:32:46PM -0500, Peter Eisentraut wrote: > Maybe that would work. > > We still need a way to configure whether we want to run tests that open > TCP/IP listen sockets. For this an environment variable seems suited to me. Say if PG_TAP_ALLOW_INSECURE is set, then the tests

Re: ALTER TABLE ADD COLUMN fast default

2018-02-16 Thread Tomas Vondra
On 02/16/2018 10:46 PM, Andrew Dunstan wrote: > On Tue, Feb 13, 2018 at 6:28 PM, Andrew Dunstan > wrote: >> On Fri, Feb 9, 2018 at 3:54 PM, Andrew Dunstan >> wrote: >>> On Mon, Feb 5, 2018 at 7:49 AM, Andrew Dunstan >>> wrote: On Mon, Feb 5, 2018 at 7:19 AM, Thomas Munro wrote:

Re: missing toast table for pg_policy

2018-02-16 Thread Tom Lane
Joe Conway writes: > On 02/16/2018 05:07 PM, Andres Freund wrote: >> On 2018-02-16 16:56:15 -0500, Joe Conway wrote: >>> Looking at the issue, the problem seems to be missing toast table for >>> pg_policy. Also attached is a one line patch. It isn't clear to me >>> whether this is a candidate for

Re: missing toast table for pg_policy

2018-02-16 Thread Joe Conway
On 02/16/2018 05:07 PM, Andres Freund wrote: > Hi, > > On 2018-02-16 16:56:15 -0500, Joe Conway wrote: >> Looking at the issue, the problem seems to be missing toast table for >> pg_policy. Also attached is a one line patch. It isn't clear to me >> whether this is a candidate for backpatching. >

Re: missing toast table for pg_policy

2018-02-16 Thread Andres Freund
Hi, On 2018-02-16 16:56:15 -0500, Joe Conway wrote: > Looking at the issue, the problem seems to be missing toast table for > pg_policy. Also attached is a one line patch. It isn't clear to me > whether this is a candidate for backpatching. Don't think it is - it'd not take effect on already init

missing toast table for pg_policy

2018-02-16 Thread Joe Conway
Currently if you try to create a too large policy, it fails with: ERROR: row is too big: size X, maximum size 8160 An example for reproducing this is attached. Looking at the issue, the problem seems to be missing toast table for pg_policy. Also attached is a one line patch. It isn't clear

Re: Add more information_schema columns

2018-02-16 Thread Peter Eisentraut
On 2/13/18 18:39, Tom Lane wrote: > Andres Freund writes: >> Do we have a policy about catversion bumps for information schema >> changes? A cluster from before this commit fails the regression tests >> after the change, but still mostly works... > > I think historically we've not bumped catversi

Re: ALTER TABLE ADD COLUMN fast default

2018-02-16 Thread Andrew Dunstan
On Tue, Feb 13, 2018 at 6:28 PM, Andrew Dunstan wrote: > On Fri, Feb 9, 2018 at 3:54 PM, Andrew Dunstan > wrote: >> On Mon, Feb 5, 2018 at 7:49 AM, Andrew Dunstan >> wrote: >>> On Mon, Feb 5, 2018 at 7:19 AM, Thomas Munro >>> wrote: On Fri, Jan 26, 2018 at 1:23 PM, Andrew Dunstan wro

Re: Cancelling parallel query leads to segfault

2018-02-16 Thread Peter Eisentraut
On 2/14/18 13:56, Andres Freund wrote: > With your example I can reliably trigger the issue if I shut down the > server while the query is running: OK, that way I can see it too. Fix pushed. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remot

Re: Add PGDLLIMPORT to enable_hashagg

2018-02-16 Thread Brian Cloutier
On Fri, Feb 9, 2018 at 1:01 PM, Robert Haas wrote: > > Committed. Thanks for committing this! We forgot to ask though, could you please backport this patch to 10 and maybe even 9.6? As-is I don't think these variables will be available until PG 11.

Re: rename sgml files?

2018-02-16 Thread Tom Lane
Peter Eisentraut writes: > On 2/12/18 16:19, Tom Lane wrote: >> At that point, back-patching documentation fixes would become effectively >> impossible except through manual intervention in the patching process. > Are you not using git cherry-pick? Yes, when it works, which it tends not to in ca

Re: Disabling src/test/[ssl|ldap] when not building with SSL/LDAP support

2018-02-16 Thread Peter Eisentraut
On 2/12/18 23:00, Michael Paquier wrote: > Hm. Wouldn't it be enough to just spread the use of > TestLib::check_pg_config and use SKIP on the tests where things cannot > be run then? I see no need to invent an extra facility if all the > control is already in pg_config.h. For slapd, you can actu

Re: FOR EACH ROW triggers on partitioned tables

2018-02-16 Thread Peter Eisentraut
On 2/15/18 16:55, Alvaro Herrera wrote: > Amit Langote wrote: >> Do you mean to fire these triggers only if the parent table (not a child >> table/partition) is addressed in the DML, right? If the table directly >> addressed in the DML is a partition whose parent has a row-level trigger, >> then t

Re: rename sgml files?

2018-02-16 Thread Peter Eisentraut
On 2/12/18 16:19, Tom Lane wrote: > At that point, back-patching documentation fixes would become effectively > impossible except through manual intervention in the patching process. Are you not using git cherry-pick? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Develo

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Anna Akenteva
Tom Lane writes 2018-02-16 17:58: Also, I don't entirely see how this fixes your stated goal of being able to select a bytea value whose textual representation exceeds 1GB. It's not necessarily my goal. My goal is to avoid the confusing situation where you insert something into a table and sudde

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Alvaro Herrera
Tom Lane wrote: > Anna Akenteva writes: > > [ widen StringInfoData max length to size_t ] > > I find this scary as heck. Have you spent any time looking at the > side effects? There are probably hundreds of places that expect that > stringinfos won't get larger than 1GB. See these commits:

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Tom Lane
Andres Freund writes: > On 2018-02-16 09:58:29 -0500, Tom Lane wrote: >> Anna Akenteva writes: >>> [ widen StringInfoData max length to size_t ] >> I find this scary as heck. Have you spent any time looking at the >> side effects? There are probably hundreds of places that expect that >> strin

Re: master check fails on Windows Server 2008

2018-02-16 Thread Tom Lane
Marina Polyakova writes: > Hello, hackers! I got a permanent failure of master (commit > 2a41507dab0f293ff241fe8ae326065998668af8) check on Windows Server 2008. > Regression output and diffs as well as config.pl are attached. Weird. AFAICS the cost estimates for those two plans should be quite

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Andres Freund
Hi, On 2018-02-16 09:58:29 -0500, Tom Lane wrote: > Anna Akenteva writes: > > [ widen StringInfoData max length to size_t ] > > I find this scary as heck. Have you spent any time looking at the > side effects? There are probably hundreds of places that expect that > stringinfos won't get large

Re: After an error - pg_replication_slot is dropped

2018-02-16 Thread Petr Jelinek
On 16/02/18 12:38, tushar wrote: > On 02/16/2018 04:02 PM, Petr Jelinek wrote: >> It's because you are creating temporary slot. Temporary slots are >> removed on error, that's a documented behavior. > > Thanks for pointing out but It looks weird behavior - even a small mea > culpa can remove the s

[PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-02-16 Thread Julian Markwort
Dear Postgresql Hackers, as of now, pg_hba.conf allows us to enable authentification by certificate through the auth-method "cert", in which case the user must provide a valid certificate with a certificate common name(CN) matching the database user's name or an entry in a pg_ident map. Additiona

Re: spelling of enable_partition_wise_join

2018-02-16 Thread Peter Eisentraut
On 2/14/18 03:28, Ashutosh Bapat wrote: > On Wed, Feb 14, 2018 at 2:15 AM, Alvaro Herrera > wrote: >> Peter Eisentraut wrote: >>> I wonder how others feel about this, but the spelling of >>> enable_partition_wise_join feels funny to me every time I look at it. I >>> would write it enable_partiti

Re: pearltidy source code has been removed (pgindent)

2018-02-16 Thread Steven Lembark
-- Steven Lembark 1505 National Ave Workhorse Computing Rockford, IL 61103 lemb...@wrkhors.com+1 888 359 3508

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Tom Lane
Anna Akenteva writes: > [ widen StringInfoData max length to size_t ] I find this scary as heck. Have you spent any time looking at the side effects? There are probably hundreds of places that expect that stringinfos won't get larger than 1GB. Also, I don't entirely see how this fixes your sta

[HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Anna Akenteva
Hello! If I create a big bytea value and try to select it from a table, I get an error, something like: "ERROR: invalid memory alloc request size ...". So basically we can insert data into a table but then we can't even work with it. Sounds like a bug. Attaching a patch that fixes it (appli

Re: autovacuum: change priority of the vacuumed tables

2018-02-16 Thread Masahiko Sawada
On Fri, Feb 16, 2018 at 7:50 PM, Ildus Kurbangaliev wrote: > On Fri, 16 Feb 2018 17:42:34 +0900 > Masahiko Sawada wrote: > >> On Thu, Feb 15, 2018 at 10:16 PM, Grigory Smolkin >> wrote: >> > On 02/15/2018 09:28 AM, Masahiko Sawada wrote: >> > >> >> Hi, >> >> >> >> On Thu, Feb 8, 2018 at 11:01 PM

Re: After an error - pg_replication_slot is dropped

2018-02-16 Thread tushar
On 02/16/2018 04:02 PM, Petr Jelinek wrote: It's because you are creating temporary slot. Temporary slots are removed on error, that's a documented behavior. Thanks for pointing out but It looks weird behavior - even a small mea culpa can remove the slot. Temporary table - doesn't go automatic

master check fails on Windows Server 2008

2018-02-16 Thread Marina Polyakova
Hello, hackers! I got a permanent failure of master (commit 2a41507dab0f293ff241fe8ae326065998668af8) check on Windows Server 2008. Regression output and diffs as well as config.pl are attached. I used the following commands: build.bat > build.txt vcregress.bat check > check.txt Binary search

Re: [HACKERS] Pluggable storage

2018-02-16 Thread Alexander Korotkov
Hi, Haribabu! On Mon, Feb 5, 2018 at 2:22 PM, Haribabu Kommi wrote: > > On Tue, Jan 9, 2018 at 11:42 PM, Haribabu Kommi > wrote: > >> >> Updated patches are attached. >> > > To integrate the columnar store with the pluggable storage API, I found > that > there are couple of other things also th

Re: non-bulk inserts and tuple routing

2018-02-16 Thread Etsuro Fujita
(2018/02/16 18:23), Amit Langote wrote: On 2018/02/16 18:12, Etsuro Fujita wrote: In the patch you added the comments: + wcoList = linitial(node->withCheckOptionLists); + + /* +* Convert Vars in it to contain this partition's attribute numbers. +* Use the WITH CHECK

Re: autovacuum: change priority of the vacuumed tables

2018-02-16 Thread Ildus Kurbangaliev
On Fri, 16 Feb 2018 17:42:34 +0900 Masahiko Sawada wrote: > On Thu, Feb 15, 2018 at 10:16 PM, Grigory Smolkin > wrote: > > On 02/15/2018 09:28 AM, Masahiko Sawada wrote: > > > >> Hi, > >> > >> On Thu, Feb 8, 2018 at 11:01 PM, Ildus Kurbangaliev > >> wrote: > >>> > >>> Hi, > >>> > >>> Attach

Server Crash while executing pg_replication_slot_advance (second time)

2018-02-16 Thread tushar
Hi, Getting an another server crash against latest sources of v11 while executing pg_replication_slot_advance second time . This issue is also  reproducible  with the patch given at

Re: After an error - pg_replication_slot is dropped

2018-02-16 Thread Petr Jelinek
Hi, On 16/02/18 10:51, tushar wrote: > Hi, > > Please refer this straight forward scenario  against latest sources of v11. > > [centos@centos-cpula bin]$ ./psql  postgres > psql (11devel) > Type "help" for help. > > postgres=#  SELECT * FROM > pg_create_logical_replication_slot('regression_slot

Re: Server crash in pg_replication_slot_advance function

2018-02-16 Thread Masahiko Sawada
On Fri, Feb 16, 2018 at 6:55 PM, amul sul wrote: > On Fri, Feb 16, 2018 at 3:06 PM, amul sul wrote: >> On Fri, Feb 16, 2018 at 1:44 PM, tushar >> wrote: >>> Hi, >> [] >>> postgres=# SELECT end_lsn FROM >>> pg_replication_slot_advance('regression_slot1', '0/271'); >>> server closed the c

Re: Server crash in pg_replication_slot_advance function

2018-02-16 Thread Petr Jelinek
On 16/02/18 10:55, amul sul wrote: > On Fri, Feb 16, 2018 at 3:06 PM, amul sul wrote: >> On Fri, Feb 16, 2018 at 1:44 PM, tushar >> wrote: >>> Hi, >> [] >>> postgres=# SELECT end_lsn FROM >>> pg_replication_slot_advance('regression_slot1', '0/271'); >>> server closed the connection unexp

Re: Server crash in pg_replication_slot_advance function

2018-02-16 Thread tushar
On 02/16/2018 03:25 PM, amul sul wrote: Attached patch proposes a required fix. Thanks, Issue seems to be fixed with this patch , now getting an expected error -ERROR:  cannot move slot to 0/290, minimum is 0/298 -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Ent

Re: Server crash in pg_replication_slot_advance function

2018-02-16 Thread amul sul
On Fri, Feb 16, 2018 at 3:06 PM, amul sul wrote: > On Fri, Feb 16, 2018 at 1:44 PM, tushar wrote: >> Hi, > [] >> postgres=# SELECT end_lsn FROM >> pg_replication_slot_advance('regression_slot1', '0/271'); >> server closed the connection unexpectedly >> This probably means the server termi

After an error - pg_replication_slot is dropped

2018-02-16 Thread tushar
Hi, Please refer this straight forward scenario  against latest sources of v11. [centos@centos-cpula bin]$ ./psql  postgres psql (11devel) Type "help" for help. postgres=#  SELECT * FROM pg_create_logical_replication_slot('regression_slot1', 'test_decoding', true);     slot_name |    lsn

Re: Server crash in pg_replication_slot_advance function

2018-02-16 Thread amul sul
On Fri, Feb 16, 2018 at 1:44 PM, tushar wrote: > Hi, [] > postgres=# SELECT end_lsn FROM > pg_replication_slot_advance('regression_slot1', '0/271'); > server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request.

Re: non-bulk inserts and tuple routing

2018-02-16 Thread Amit Langote
Fujita-san, Thanks for the review. On 2018/02/16 18:12, Etsuro Fujita wrote: > (2018/02/16 13:42), Amit Langote wrote: >> Attached v9.  Thanks a for the review! > > Thanks for the updated patch!  In the patch you added the comments: > > +   wcoList = linitial(node->withCheckOptionLists); >

Re: non-bulk inserts and tuple routing

2018-02-16 Thread Etsuro Fujita
(2018/02/16 13:42), Amit Langote wrote: On 2018/02/16 12:41, Etsuro Fujita wrote: (2018/02/16 10:49), Amit Langote wrote: I think you're right. If node->returningLists is non-NULL at all, ExecInitModifyTable() would've initialized the needed slot and expression context. I added Assert()s to t

Re: Contention preventing locking

2018-02-16 Thread Michail Nikolaev
Hello. Just want to notice - this work also correlates with https://www.postgresql.org/message-id/CAEepm%3D18buPTwNWKZMrAXLqja1Tvezw6sgFJKPQ%2BsFFTuwM0bQ%40mail.gmail.com paper. It provides more general way to address the issue comparing to single optimisations (but they could do the work too, of

Re: autovacuum: change priority of the vacuumed tables

2018-02-16 Thread Masahiko Sawada
On Thu, Feb 15, 2018 at 10:16 PM, Grigory Smolkin wrote: > On 02/15/2018 09:28 AM, Masahiko Sawada wrote: > >> Hi, >> >> On Thu, Feb 8, 2018 at 11:01 PM, Ildus Kurbangaliev >> wrote: >>> >>> Hi, >>> >>> Attached patch adds 'autovacuum_table_priority' to the current list of >>> automatic vacuuming

Server crash in pg_replication_slot_advance function

2018-02-16 Thread tushar
Hi, While playing around with newly implemented function 'pg_replication_slot_advance' , found a server crash . Please refer the testcase scenario - centos@centos-cpula bin]$ ./psql  postgres psql (11devel) Type "help" for help. postgres=#  SELECT * FROM pg_create_logical_replication_slot('

Re: [HACKERS] Can ICU be used for a database's default sort order?

2018-02-16 Thread Andrey Borodin
Hi everyone! > 10 февр. 2018 г., в 20:45, Andrey Borodin написал(а): > > I'm planning to provide review > So, I was looking into the patch. The patch adds: 1. Ability to specify collation provider (with version) in --locale for initdb and createdb. 2. Changes to locale checks 3. Sets ICU as

Re: [bug fix] Cascaded standby cannot start after a clean shutdown

2018-02-16 Thread Michael Paquier
On Fri, Feb 16, 2018 at 04:19:00PM +0900, Michael Paquier wrote: > Wait a minute here, when recycled past WAL segments would be filled with > zeros before being used. Please feel free to ignore this part. I pushed the "Send" button without seeing it, and I was thinking uner which circumstances se