Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: On 2015-04-28 10:40:10 -0400, Stephen Frost wrote: * Andres Freund (and...@anarazel.de) wrote: On 2015-04-28 16:36:28 +0200, Petr Jelinek wrote: I am also very sure that every time I'll write this statement I will have to look into

Re: [HACKERS] ATSimpleRecursion() and inheritance foreign parents

2015-04-28 Thread Etsuro Fujita
On 2015/04/28 15:17, Amit Langote wrote: The code at the beginning of ATSimpleRecursion() looks like - /* * Propagate to children if desired. Non-table relations never have * children, so no need to search in that case. */ if (recurse rel-rd_rel-relkind == RELKIND_RELATION) Not sure

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Andres Freund
On 2015-04-28 10:40:10 -0400, Stephen Frost wrote: * Andres Freund (and...@anarazel.de) wrote: On 2015-04-28 16:36:28 +0200, Petr Jelinek wrote: I am also very sure that every time I'll write this statement I will have to look into manual for the names of TARGET and EXCLUDED because

Re: [HACKERS] cache invalidation for PL/pgsql functions

2015-04-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: rhaas=# create table foo (a int); CREATE TABLE rhaas=# create or replace function test (x foo) returns int as $$begin return x.b; end$$ language plpgsql; CREATE FUNCTION rhaas=# alter table foo add column b int; ALTER TABLE rhaas=# select

Re: [HACKERS] improving speed of make check-world

2015-04-28 Thread Peter Eisentraut
On 4/28/15 9:09 AM, Michael Paquier wrote: I guess by redirecting it into the log file you indicated, but is that a good idea to redirect stderr? I am sure that Peter did that on purpose, both approaches having advantages and disadvantages. Personally I don't mind looking at the install log

Re: [HACKERS] [COMMITTERS] pgsql: Add transforms feature

2015-04-28 Thread Andrew Dunstan
On 04/28/2015 12:03 PM, Andrew Dunstan wrote: [switching to -hackers] On 04/28/2015 11:51 AM, Andrew Dunstan wrote: On 04/28/2015 09:04 AM, Michael Paquier wrote: On Tue, Apr 28, 2015 at 10:01 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, Apr 28, 2015 at 9:55 AM, Andrew

Re: [HACKERS] [COMMITTERS] pgsql: Add transforms feature

2015-04-28 Thread Peter Eisentraut
On 4/28/15 4:10 PM, Andrew Dunstan wrote: Do we actually have a Windows machine building with Python3? The answer seems to be probably not. When I tried enabling this with bowerbird I got a ton of errors like these: plpy_cursorobject.obj : error LNK2001: unresolved external symbol

Re: [HACKERS] Allow SQL/plpgsql functions to accept record

2015-04-28 Thread Jim Nasby
On 4/28/15 1:31 PM, Andrew Dunstan wrote: On 04/28/2015 01:44 PM, Jim Nasby wrote: On 4/27/15 10:06 PM, Andrew Dunstan wrote: My point remains that we really need methods of a) getting the field names from generic records and b) using text values to access fields of generic records, both as

Re: [HACKERS] why does enum_endpoint call GetTransactionSnapshot()?

2015-04-28 Thread Bruce Momjian
On Sat, Feb 14, 2015 at 05:29:43PM -0500, Robert Haas wrote: On Sat, Feb 14, 2015 at 5:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I think this is probably a holdover from before the death of SnapshotNow, and that we should just pass NULL to

Re: [HACKERS] pg_rewind test race condition..?

2015-04-28 Thread Heikki Linnakangas
On 04/28/2015 11:02 AM, Stephen Frost wrote: Heikki, Not sure if anyone else is seeing this, but I'm getting regression test failures when running the pg_rewind tests pretty consistently with 'make check'. Specifically with basic remote, I'm getting: source and target cluster are on

Re: [HACKERS] Can pg_dump make use of CURRENT/SESSION_USER

2015-04-28 Thread Fabrízio de Royes Mello
On Tue, Apr 28, 2015 at 1:07 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, Apr 28, 2015 at 9:38 AM, Robert Haas robertmh...@gmail.com wrote: On Sat, Apr 25, 2015 at 8:05 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: If we ever implement something

Re: [HACKERS] pg_basebackup, tablespace mapping and path canonicalization

2015-04-28 Thread Bruce Momjian
On Fri, Feb 6, 2015 at 08:25:42AM -0500, Robert Haas wrote: On Thu, Feb 5, 2015 at 10:21 PM, Ian Barwick i...@2ndquadrant.com wrote: I stumbled on what appears to be inconsistent handling of double slashes in tablespace paths when using pg_basebackup with the -T/--tablespace-mapping

Re: [HACKERS] Feedback on getting rid of VACUUM FULL

2015-04-28 Thread Jim Nasby
On 4/28/15 1:32 PM, Robert Haas wrote: More than five years have passed since Heikki posted this, and we still haven't found a solution to the problem -- which neverthless keeps biting people to the point that multiple user-space implementations of similar techniques are out there. Yeah. The

Re: [HACKERS] shared_libperl, shared_libpython

2015-04-28 Thread Andrew Dunstan
On 04/28/2015 04:31 PM, Peter Eisentraut wrote: On 4/28/15 12:05 AM, Tom Lane wrote: Yeah. Even more specifically, olinguito does have --with-python in its configure flags, but then the plpython Makefile skips the build because libpython isn't available as a shared library. But the contrib

Re: [HACKERS] pg_basebackup, tablespace mapping and path canonicalization

2015-04-28 Thread Ian Barwick
On 29/04/15 09:12, Bruce Momjian wrote: On Fri, Feb 6, 2015 at 08:25:42AM -0500, Robert Haas wrote: On Thu, Feb 5, 2015 at 10:21 PM, Ian Barwick i...@2ndquadrant.com wrote: I stumbled on what appears to be inconsistent handling of double slashes in tablespace paths when using pg_basebackup

Re: [HACKERS] Temporal extensions

2015-04-28 Thread Dave Jones
Hi Jim, On 28/04/15 03:49, Jim Nasby wrote: On 4/27/15 6:08 PM, Dave Jones wrote: (Though, I dislike using timestamps to do change/history tracking, but that's just me...) I've been playing around with history tracking (in the context of BI, typically with batch loaded reporting databases)

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-28 Thread Robert Haas
On Fri, Apr 24, 2015 at 4:09 PM, Jim Nasby jim.na...@bluetreble.com wrote: When I read that I think about something configurable at relation-level.There are cases where you may want to have more granularity of this information at block level by having the VM slots to track less blocks than 32,

Re: [HACKERS] Parallel Seq Scan

2015-04-28 Thread Robert Haas
On Fri, Apr 24, 2015 at 8:32 AM, Amit Kapila amit.kapil...@gmail.com wrote: - InitializeParallelWorkers() still mixes together general parallel executor concerns with concerns specific to parallel sequential scan (e.g. EstimatePartialSeqScanSpace). Here we are doing 2 things, first one is for

Re: [HACKERS] Can pg_dump make use of CURRENT/SESSION_USER

2015-04-28 Thread Fabrízio de Royes Mello
On Tue, Apr 28, 2015 at 9:38 AM, Robert Haas robertmh...@gmail.com wrote: On Sat, Apr 25, 2015 at 8:05 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: If we ever implement something like COMMENT ON CURRENT_DATABASE IS ... it will be useful, because you will be

Re: [HACKERS] Proposal: knowing detail of config files via SQL

2015-04-28 Thread David Steele
On 4/27/15 10:37 PM, Sawada Masahiko wrote: Thank you for your reviewing. Attached v8 patch is latest version. I posted a review through the CF app but it only went to the list instead of recipients of the latest message. install-checkworld is failing but the fix is pretty trivial. See:

Re: [HACKERS] Proposal: knowing detail of config files via SQL

2015-04-28 Thread David Steele
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Looks good overall, but make installcheck-world does not

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Geoff Winkless
On 28 April 2015 at 15:46, Stephen Frost sfr...@snowman.net wrote: +1, NEW/OLD seem pretty natural and I'm not worried about what they look like in rules, and their usage in triggers matches up with what they'd mean here, I'd think. Since I've stuck my head above the parapet once I figured

Re: [HACKERS] Auditing extension for PostgreSQL (Take 2)

2015-04-28 Thread David Steele
On 4/28/15 2:14 AM, Sawada Masahiko wrote: On Fri, Apr 24, 2015 at 3:23 AM, David Steele da...@pgmasters.net wrote: I've also added some checking to make sure that if anything looks funny on the stack an error will be generated. Thanks for the feedback! Thank you for updating the patch!

Re: [HACKERS] deparsing utility commands

2015-04-28 Thread Dimitri Fontaine
Hi, As a comment to the whole email below, I think the following approach is the best compromise we will find, allowing everybody to come up with their own format much as in the Logical Decoding plugins world. Of course, as in the Logical Decoding area, BDR and similar projects will implement

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Petr Jelinek
On 28/04/15 16:44, Andres Freund wrote: On 2015-04-28 10:40:10 -0400, Stephen Frost wrote: * Andres Freund (and...@anarazel.de) wrote: On 2015-04-28 16:36:28 +0200, Petr Jelinek wrote: I am also very sure that every time I'll write this statement I will have to look into manual for the names

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Geoff Winkless
On 28 April 2015 at 15:57, I wrote: ​MySQL uses VALUES(columnname) to reference the intended INSERT value (what you might term NEW) and the target name to reference OLD. I understand that people might think the bracketed syntax isn't very pleasant because that looks like a function, but it

Re: [HACKERS] [COMMITTERS] pgsql: Add transforms feature

2015-04-28 Thread Michael Paquier
On Wed, Apr 29, 2015 at 5:15 AM, Peter Eisentraut pete...@gmx.net wrote: On 4/28/15 4:10 PM, Andrew Dunstan wrote: Do we actually have a Windows machine building with Python3? The answer seems to be probably not. When I tried enabling this with bowerbird I got a ton of errors like these:

Re: [HACKERS] shared_libperl, shared_libpython

2015-04-28 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On 4/28/15 12:05 AM, Tom Lane wrote: Yeah. Even more specifically, olinguito does have --with-python in its configure flags, but then the plpython Makefile skips the build because libpython isn't available as a shared library. But the contrib test is

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-28 Thread Tom Lane
Tomas Vondra tomas.von...@2ndquadrant.com writes: On 04/28/15 21:50, Tom Lane wrote: RestrictInfo is not a general expression node and support for it has been deliberately omitted from expression_tree_walker(). So I think what you are proposing is a bad idea and probably a band-aid for some

Re: [HACKERS] improving speed of make check-world

2015-04-28 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: On Tue, Apr 28, 2015 at 1:46 AM, Jeff Janes jeff.ja...@gmail.com wrote: This change fixed the problem for me. It also made this age-old compiler warning go away: In file included from gram.y:14515: scan.c: In function 'yy_try_NUL_trans':

Re: [HACKERS] Moving on to close the current CF 2015-02

2015-04-28 Thread Magnus Hagander
On Fri, Apr 17, 2015 at 4:57 PM, Magnus Hagander mag...@hagander.net wrote: On Fri, Apr 17, 2015 at 9:23 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Fri, Apr 17, 2015 at 4:22 PM, Michael Paquier wrote: @Magnus: having the possibility to mark a patch as returned with feedback

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Peter Geoghegan
On Tue, Apr 28, 2015 at 9:42 AM, Stephen Frost sfr...@snowman.net wrote: I agree with that, but how are NEW and OLD ambiguous? NEW is clearly the tuple being added, while OLD is clearly the existing tuple. Yes, but EXCLUDED is neither the tuple being added, nor is it the new tuple. It's

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Peter Geoghegan
On Tue, Apr 28, 2015 at 7:36 AM, Petr Jelinek p...@2ndquadrant.com wrote: I am also very sure that every time I'll write this statement I will have to look into manual for the names of TARGET and EXCLUDED because they don't seem intuitive to me at all (especially the EXCLUDED). According to

Re: [HACKERS] [PATCH] Add transforms feature

2015-04-28 Thread Jeff Janes
On Tue, Apr 7, 2015 at 7:55 PM, Peter Eisentraut pete...@gmx.net wrote: On 3/22/15 5:46 AM, Pavel Stehule wrote: Isn't better doesn't support TRANSFORM ALL clause? If somebody would to use transformations - then he have to explicitly enable it by TRANSFORM FOR TYPE ? It is safe and without

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2015-04-28 Thread Jeff Janes
On Mon, Mar 30, 2015 at 5:26 PM, Tomas Vondra tomas.von...@2ndquadrant.com wrote: Hello, attached is a new version of the patch series. Aside from fixing various issues (crashes, memory leaks). The patches are rebased to current master, and I also attach a few SQL scripts I used for testing

Re: [HACKERS] [COMMITTERS] pgsql: Add transforms feature

2015-04-28 Thread Andrew Dunstan
Oops, thought I'd changed the address line. [switching to -hackers] On 04/28/2015 11:51 AM, Andrew Dunstan wrote: On 04/28/2015 09:04 AM, Michael Paquier wrote: On Tue, Apr 28, 2015 at 10:01 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, Apr 28, 2015 at 9:55 AM, Andrew

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2015-04-28 Thread Stephen Frost
* Jeff Janes (jeff.ja...@gmail.com) wrote: On Mon, Mar 30, 2015 at 5:26 PM, Tomas Vondra tomas.von...@2ndquadrant.com wrote: attached is a new version of the patch series. Aside from fixing various issues (crashes, memory leaks). The patches are rebased to current master, and I also attach

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Peter Geoghegan
On Tue, Apr 28, 2015 at 7:38 AM, Andres Freund and...@anarazel.de wrote: On 2015-04-28 16:36:28 +0200, Petr Jelinek wrote: I am also very sure that every time I'll write this statement I will have to look into manual for the names of TARGET and EXCLUDED because they don't seem intuitive to me

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Stephen Frost
* Peter Geoghegan (p...@heroku.com) wrote: On Tue, Apr 28, 2015 at 7:38 AM, Andres Freund and...@anarazel.de wrote: On 2015-04-28 16:36:28 +0200, Petr Jelinek wrote: I am also very sure that every time I'll write this statement I will have to look into manual for the names of TARGET and

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Peter Geoghegan
On Tue, Apr 28, 2015 at 9:45 AM, Peter Geoghegan p...@heroku.com wrote: Yes, but EXCLUDED is neither the tuple being added, nor is it the new tuple. It's something else entirely. I mean, nor is it the existing tuple. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Stephen Frost
* Peter Geoghegan (p...@heroku.com) wrote: On Tue, Apr 28, 2015 at 9:42 AM, Stephen Frost sfr...@snowman.net wrote: I agree with that, but how are NEW and OLD ambiguous? NEW is clearly the tuple being added, while OLD is clearly the existing tuple. Yes, but EXCLUDED is neither the tuple

Re: [HACKERS] tablespaces inside $PGDATA considered harmful

2015-04-28 Thread Bruce Momjian
On Fri, Apr 24, 2015 at 01:05:03PM -0400, Bruce Momjian wrote: This way, both pg_dump and pg_upgrade will issue warnings, though, of course, those warnings can be ignored. I am hopeful these two warnings will be sufficient and we will not need make these errors, with the possible

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-28 Thread Tomas Vondra
Hi, On 04/28/15 21:50, Tom Lane wrote: Tomas Vondra tomas.von...@2ndquadrant.com writes: the attached trivial patch adds handling of RestrictInfo nodes into expression_tree_walker(). RestrictInfo is not a general expression node and support for it has been deliberately omitted from

[HACKERS] shared_libperl, shared_libpython

2015-04-28 Thread Peter Eisentraut
On 4/28/15 12:05 AM, Tom Lane wrote: Yeah. Even more specifically, olinguito does have --with-python in its configure flags, but then the plpython Makefile skips the build because libpython isn't available as a shared library. But the contrib test is (I assume, haven't looked) conditional

Re: [HACKERS] COPY and file_fdw with fixed column widths

2015-04-28 Thread Andrew Dunstan
On 04/28/2015 03:50 PM, Bruce Momjian wrote: On Tue, Apr 28, 2015 at 12:46:22PM -0700, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: I know COPY doesn't support importing files with fixed column widths, i.e. we can't say field1 is the first 30 characters, and field2 is the rest of

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-28 Thread Jim Nasby
On 4/28/15 7:11 AM, Robert Haas wrote: On Fri, Apr 24, 2015 at 4:09 PM, Jim Nasbyjim.na...@bluetreble.com wrote: When I read that I think about something configurable at relation-level.There are cases where you may want to have more granularity of this information at block level by having the

Re: [HACKERS] cache invalidation for PL/pgsql functions

2015-04-28 Thread Pavel Stehule
2015-04-28 19:43 GMT+02:00 Robert Haas robertmh...@gmail.com: The following behavior surprised me, and a few other people at EnterpriseDB, and one of our customers: rhaas=# create table foo (a int); CREATE TABLE rhaas=# create or replace function test (x foo) returns int as $$begin return

Re: [HACKERS] Allow SQL/plpgsql functions to accept record

2015-04-28 Thread Merlin Moncure
On Tue, Apr 28, 2015 at 12:44 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 4/27/15 10:06 PM, Andrew Dunstan wrote: My point remains that we really need methods of a) getting the field names from generic records and b) using text values to access fields of generic records, both as lvalues

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2015-04-28 Thread Jeff Janes
On Tue, Apr 28, 2015 at 9:13 AM, Stephen Frost sfr...@snowman.net wrote: * Jeff Janes (jeff.ja...@gmail.com) wrote: On Mon, Mar 30, 2015 at 5:26 PM, Tomas Vondra tomas.von...@2ndquadrant.com wrote: attached is a new version of the patch series. Aside from fixing various issues

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread David G. Johnston
On Tue, Apr 28, 2015 at 9:58 AM, Stephen Frost sfr...@snowman.net wrote: * Peter Geoghegan (p...@heroku.com) wrote: On Tue, Apr 28, 2015 at 9:42 AM, Stephen Frost sfr...@snowman.net wrote: I agree with that, but how are NEW and OLD ambiguous? NEW is clearly the tuple being added, while

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-04-28 Thread Jim Nasby
On 4/28/15 1:16 AM, Pavel Stehule wrote: I think it can't be any clearer than the proposed plpgsql.display_context_min_messages client_min_context. It's doing the same thing as min_messages does, just for context instead of the message. Or does this affect client

Re: [HACKERS] Allow SQL/plpgsql functions to accept record

2015-04-28 Thread Jim Nasby
On 4/27/15 10:06 PM, Andrew Dunstan wrote: My point remains that we really need methods of a) getting the field names from generic records and b) using text values to access fields of generic records, both as lvalues and rvalues. Without those this feature will be of comparatively little value,

Re: [HACKERS] Fwd: [GENERAL] 4B row limit for CLOB tables

2015-04-28 Thread Jim Nasby
On 4/28/15 5:41 AM, José Luis Tallón wrote: On 04/27/2015 08:49 AM, Jim Nasby wrote: On 4/25/15 1:19 PM, Bruce Momjian wrote: Note if you are storing a table with rows that exceed 2KB in size (aggregate size of each row) then the Maximum number of rows in a table may be limited to

[HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-28 Thread Tomas Vondra
Hi there, the attached trivial patch adds handling of RestrictInfo nodes into expression_tree_walker(). This is needed for example when calling pull_varnos or (or other functions using the expression walker) in clausesel.c, for example. An example of a query causing errors with pull_varnos

[HACKERS] pg_rewind test race condition..?

2015-04-28 Thread Stephen Frost
Heikki, Not sure if anyone else is seeing this, but I'm getting regression test failures when running the pg_rewind tests pretty consistently with 'make check'. Specifically with basic remote, I'm getting: source and target cluster are on the same timeline Failure, exiting in

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2015-04-28 Thread Tomas Vondra
Hi, On 04/28/15 19:36, Jeff Janes wrote: ... Thanks. I think I tried that, but was still having trouble. But it turns out that the trouble was for an unrelated reason, and I got it to compile now. Yeah, a new column was added to pg_proc the day after I submitted the pacth. Will address

Re: [HACKERS] Freeze avoidance of very large table.

2015-04-28 Thread Robert Haas
On Tue, Apr 28, 2015 at 1:53 PM, Jim Nasby jim.na...@bluetreble.com wrote: Because in those cases it would be trivial to drop XMIN out of the tuple headers. For a warehouse with narrow rows that could be a significant win. Moreso, we could also move XMAX to the page level if we accept that if

Re: [HACKERS] INSERT ... ON CONFLICT UPDATE/IGNORE 4.0, parser/executor stuff

2015-04-28 Thread Peter Geoghegan
On Tue, Apr 28, 2015 at 3:38 AM, Andres Freund and...@anarazel.de wrote: The more I look at approach taken in the executor, the less I like it. I think the fundamental structural problem is that you've chosen to represent the ON CONFLICT UPDATE part as fully separate plan tree node; planned

[HACKERS] cache invalidation for PL/pgsql functions

2015-04-28 Thread Robert Haas
The following behavior surprised me, and a few other people at EnterpriseDB, and one of our customers: rhaas=# create table foo (a int); CREATE TABLE rhaas=# create or replace function test (x foo) returns int as $$begin return x.b; end$$ language plpgsql; CREATE FUNCTION rhaas=# alter table foo

Re: [HACKERS] Allow SQL/plpgsql functions to accept record

2015-04-28 Thread Andrew Dunstan
On 04/28/2015 01:44 PM, Jim Nasby wrote: On 4/27/15 10:06 PM, Andrew Dunstan wrote: My point remains that we really need methods of a) getting the field names from generic records and b) using text values to access fields of generic records, both as lvalues and rvalues. Without those this

Re: [HACKERS] Feedback on getting rid of VACUUM FULL

2015-04-28 Thread Robert Haas
On Fri, Apr 24, 2015 at 3:04 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Heikki Linnakangas wrote: Hmm, AFAICT pg_reorg is much more complex, writing stuff to a temp table and swapping relfilenodes afterwards. More like the VACUUM REWRITE that's been discussed. For the kicks, I looked

Re: [HACKERS] cache invalidation for PL/pgsql functions

2015-04-28 Thread Jim Nasby
On 4/28/15 12:58 PM, Pavel Stehule wrote: I hate to use the term bug for what somebody's probably going to tell me is acceptable behavior, but that seems like a bug. I guess the root of the problem is that PL/plgsql's cache invalidation logic only considers the pg_proc row's TID

Re: [HACKERS] parallel mode and parallel contexts

2015-04-28 Thread Robert Haas
On Sun, Apr 26, 2015 at 2:03 PM, Euler Taveira eu...@timbira.com.br wrote: On 19-03-2015 15:13, Robert Haas wrote: On Wed, Mar 18, 2015 at 5:36 PM, Andres Freund and...@2ndquadrant.com wrote: Reading the README first, the rest later. So you can comment on my comments, while I actually look

Re: [HACKERS] parallel mode and parallel contexts

2015-04-28 Thread Robert Haas
On Sun, Apr 26, 2015 at 9:57 PM, Amit Langote langote_amit...@lab.ntt.co.jp wrote: On 2015-04-22 AM 04:14, Robert Haas wrote: We should check IsParallelWorker() for operations that are allowed in the master during parallel mode, but not allowed in the workers - e.g. the master can scan its own

Re: [HACKERS] Feedback on getting rid of VACUUM FULL

2015-04-28 Thread Alvaro Herrera
Robert Haas wrote: On Fri, Apr 24, 2015 at 3:04 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I think what we need here is something that does heap_update to tuples at the end of the table, moving them to earlier pages; then wait for old snapshots to die (the infrastructure for which

Re: [HACKERS] INSERT ... ON CONFLICT UPDATE/IGNORE 4.0

2015-04-28 Thread Peter Geoghegan
On Mon, Apr 27, 2015 at 6:43 AM, Andres Freund and...@anarazel.de wrote: Could you please add the tests for the logical decoding code you added? I presume you have some already/ Most of the tests I used for logical decoding were stress tests (i.e. prominently involved my favorite tool,

Re: [HACKERS] Improving RLS qual pushdown

2015-04-28 Thread Dean Rasheed
On 27 April 2015 at 17:33, Stephen Frost sfr...@snowman.net wrote: Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: I took another look at this and came up with some alternate comment rewording. I also added a couple of additional comments that should hopefully clarify the code a bit.

Re: [HACKERS] INSERT ... ON CONFLICT UPDATE/IGNORE 4.0

2015-04-28 Thread Peter Geoghegan
On Mon, Apr 27, 2015 at 8:31 PM, Heikki Linnakangas hlinn...@iki.fi wrote: I thought we had an ironclad scheme to prevent deadlocks like this, so I'd like to understand why that happens. Okay. I think I know how it happens (I was always skeptical of the idea that this would be 100% reliable),

[HACKERS] ATSimpleRecursion() and inheritance foreign parents

2015-04-28 Thread Amit Langote
Hi, Following ALTER TABLE actions are applied recursively to inheritance descendents via ATSimpleRecursion() - ALTER COLUMN DEFAULT ALTER COLUMN DROP NOT NULL ALTER COLUMN SET NOT NULL ALTER COLUMN SET STATISTICS ALTER COLUMN SET STORAGE The code at the beginning of ATSimpleRecursion() looks

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-04-28 Thread Pavel Stehule
2015-04-27 22:53 GMT+02:00 Jim Nasby jim.na...@bluetreble.com: On 4/27/15 11:47 AM, Joel Jacobson wrote: On Mon, Apr 27, 2015 at 6:14 PM, Marko Tiikkaja ma...@joh.to mailto:ma...@joh.to wrote: That sounds weird. log_min_messages are the messages sent to the log;

Re: [HACKERS] Auditing extension for PostgreSQL (Take 2)

2015-04-28 Thread Sawada Masahiko
On Fri, Apr 24, 2015 at 3:23 AM, David Steele da...@pgmasters.net wrote: On 4/23/15 5:49 AM, Sawada Masahiko wrote: I'm concerned that behaviour of pg_audit has been changed at a few times as far as I remember. Did we achieve consensus on this design? The original author Abhijit expressed

Re: [HACKERS] INSERT ... ON CONFLICT UPDATE/IGNORE 4.0, parser/executor stuff

2015-04-28 Thread Andres Freund
On 2015-04-27 23:52:58 +0200, Andres Freund wrote: On 2015-04-27 16:28:49 +0200, Andres Freund wrote: On 2015-04-26 18:02:06 -0700, Peter Geoghegan wrote: * So far, there has been a lack of scrutiny about what the patch does in the rewriter (in particular, to support the EXCLUDED.*

Re: [HACKERS] Fwd: [GENERAL] 4B row limit for CLOB tables

2015-04-28 Thread José Luis Tallón
On 04/27/2015 08:49 AM, Jim Nasby wrote: On 4/25/15 1:19 PM, Bruce Momjian wrote: Note if you are storing a table with rows that exceed 2KB in size (aggregate size of each row) then the Maximum number of rows in a table may be limited to 4 Billion, see TOAST. That's not accurate

Re: [HACKERS] COPY and file_fdw with fixed column widths

2015-04-28 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I know COPY doesn't support importing files with fixed column widths, i.e. we can't say field1 is the first 30 characters, and field2 is the rest of the line. We need a unique delimiter at column 31. (Commercial Ingres does support this ability.) I

Re: [HACKERS] COPY and file_fdw with fixed column widths

2015-04-28 Thread Bruce Momjian
On Tue, Apr 28, 2015 at 12:46:22PM -0700, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: I know COPY doesn't support importing files with fixed column widths, i.e. we can't say field1 is the first 30 characters, and field2 is the rest of the line. We need a unique delimiter at

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2015-04-28 Thread Tom Lane
Tomas Vondra tomas.von...@2ndquadrant.com writes: the attached trivial patch adds handling of RestrictInfo nodes into expression_tree_walker(). RestrictInfo is not a general expression node and support for it has been deliberately omitted from expression_tree_walker(). So I think what you are

[HACKERS] COPY and file_fdw with fixed column widths

2015-04-28 Thread Bruce Momjian
I know COPY doesn't support importing files with fixed column widths, i.e. we can't say field1 is the first 30 characters, and field2 is the rest of the line. We need a unique delimiter at column 31. (Commercial Ingres does support this ability.) I know we tell most people to use sed, Perl, or

Re: [HACKERS] ATSimpleRecursion() and inheritance foreign parents

2015-04-28 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: On 2015/04/28 15:17, Amit Langote wrote: The code at the beginning of ATSimpleRecursion() looks like - if (recurse rel-rd_rel-relkind == RELKIND_RELATION) Not sure if it's great idea, but now that foreign tables can also have children, should

Re: [HACKERS] INSERT ... ON CONFLICT syntax issues

2015-04-28 Thread Peter Geoghegan
On Tue, Apr 28, 2015 at 10:36 AM, David G. Johnston david.g.johns...@gmail.com wrote: This example exemplifies the poorness of the proposed wording, IMO: [...] SET dname = EXCLUDED.dname || ' (formerly ' || TARGET.dname || ')' NEW.dname || '(formerly ' || OLD.dname || ')' reads perfectly

Re: [HACKERS] cache invalidation for PL/pgsql functions

2015-04-28 Thread Merlin Moncure
On Tue, Apr 28, 2015 at 12:43 PM, Robert Haas robertmh...@gmail.com wrote: I hate to use the term bug for what somebody's probably going to tell me is acceptable behavior, but that seems like a bug. I guess the root of the problem is that PL/plgsql's cache invalidation logic only considers