Re: [HACKERS] PQputCopyEnd doesn't adhere to its API contract

2014-09-03 Thread David G Johnston
On Wed, Sep 3, 2014 at 6:25 PM, Bruce Momjian [via PostgreSQL] < ml-node+s1045698n5817646...@n5.nabble.com> wrote: > On Fri, May 9, 2014 at 12:03:36PM -0400, Robert Haas wrote: > > > On Thu, May 8, 2014 at 5:21 PM, Tom Lane <[hidden email] > >

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-03 Thread Pavel Stehule
I am sory too much patches Regards Pavel 2014-09-04 7:35 GMT+02:00 Jeevan Chalke : > Hi Pavel, > > You have attached wrong patch. > > > Thanks > -- > Jeevan B Chalke > Principal Software Engineer, Product Development > EnterpriseDB Corporation > The Enterprise PostgreSQL Company > > commit e

Re: [HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-03 Thread Jeevan Chalke
Hi Pavel, You have attached wrong patch. Thanks -- Jeevan B Chalke Principal Software Engineer, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company

Re: [HACKERS] PL/pgSQL 1.2

2014-09-03 Thread Pavel Stehule
2014-09-03 23:19 GMT+02:00 Hannu Krosing : > On 09/03/2014 05:09 PM, Marko Tiikkaja wrote: > > On 9/3/14 5:05 PM, Bruce Momjian wrote: > >> On Wed, Sep 3, 2014 at 07:54:09AM +0200, Pavel Stehule wrote: > >>> I am not against to improve a PL/pgSQL. And I repeat, what can be > >>> done and can > >>

[HACKERS] missing tab-completion for relation options

2014-09-03 Thread Fujii Masao
Hi, Attached patch adds the missing tab-completion for the relation options like autovacuum_multixact_freeze_max_age. Regards, -- Fujii Masao *** a/src/bin/psql/tab-complete.c --- b/src/bin/psql/tab-complete.c *** *** 1694,1699 psql_completion(const char *text, int start, int e

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao wrote: > On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas > wrote: >> On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: >>> >>> On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas wrote: >>>

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Wed, Sep 3, 2014 at 11:13 PM, Fujii Masao wrote: > On Wed, Sep 3, 2014 at 10:56 PM, Greg Stark wrote: >> On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier >> wrote: >>> OK, then as all the comments are basically addressed, here is an >>> updated patch correcting the comment problems mentioned

Re: [HACKERS] vacuumdb --all --analyze-in-stages - wrong order?

2014-09-03 Thread Peter Eisentraut
On Mon, 2014-05-19 at 13:51 -0400, Peter Eisentraut wrote: > On 5/18/14, 3:52 AM, Pavel Stehule wrote: > > I am looking on --analyze-in-stages option. If I understand well, > > motivation for this option is a get some minimal statistic for databases > > in minimal time. But when I tested, I found s

Re: [HACKERS] Scaling shared buffer eviction

2014-09-03 Thread Amit Kapila
On Thu, Sep 4, 2014 at 8:00 AM, Mark Kirkwood wrote: > > > Hi Amit, > > Results look pretty good. Does it help in the read-write case too? Last time I ran the tpc-b test of pgbench (results of which are posted earlier in this thread), there doesn't seem to be any major gain for that, however for

Re: [HACKERS] Scaling shared buffer eviction

2014-09-03 Thread Mark Kirkwood
On 03/09/14 16:22, Amit Kapila wrote: On Wed, Sep 3, 2014 at 9:45 AM, Amit Kapila wrote: On Thu, Aug 28, 2014 at 4:41 PM, Amit Kapila wrote: I have yet to collect data under varying loads, however I have collected performance data for 8GB shared buffers which shows reasonably good performa

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-09-03 Thread Robert Haas
On Thu, Aug 28, 2014 at 11:20 AM, Andres Freund wrote: >> >* How about making it --help=variables instead of --help-variables? >> >> -1, help is not a variable to be assigned imho > > I don't think variable assignment is a good mental model for long > commandline arguments. And it's not like I'm t

Re: [HACKERS] WAL format and API changes (9.5)

2014-09-03 Thread Michael Paquier
On Tue, Sep 2, 2014 at 9:23 PM, Heikki Linnakangas wrote: > I committed the redo-routine refactoring patch. I kept the XLog prefix in > the XLogReadBufferForRedo name; it's redundant, but all the other similar > functions in xlogutils.c use the XLog prefix so it would seem inconsistent > to not ha

Re: [HACKERS] WAL format and API changes (9.5)

2014-09-03 Thread Michael Paquier
On Tue, Sep 2, 2014 at 9:23 PM, Heikki Linnakangas wrote: > I committed the redo-routine refactoring patch. I kept the XLog prefix in > the XLogReadBufferForRedo name; it's redundant, but all the other similar > functions in xlogutils.c use the XLog prefix so it would seem inconsistent > to not ha

Re: [HACKERS] Display of timestamp in pg_dump custom format

2014-09-03 Thread Bruce Momjian
On Thu, Sep 4, 2014 at 12:02:19PM +1200, Gavin Flower wrote: > I would prefer the date in a sane numeric format to the left of the > time (similar to what I suggested above), easier to sort (if a sort > is required) - it is also easier to use regular expressions to > select statement in an arbitra

Re: [HACKERS] B-tree descend for insertion locking

2014-09-03 Thread Peter Geoghegan
On Tue, Mar 18, 2014 at 4:12 AM, Heikki Linnakangas wrote: > When inserting into a B-tree index, all the pages are read-locked when > descending the tree. When we reach the leaf page, the read-lock is exchanged > for a write-lock. > > There's nothing wrong with that, but why don't we just directly

Re: [HACKERS] PL/pgSQL 1.2

2014-09-03 Thread Hannu Krosing
On 09/04/2014 12:17 AM, Marko Tiikkaja wrote: > On 2014-09-03 23:19, Hannu Krosing wrote: >> 1. Conditions for number of rows returned by SELECT or touched by UPDATE >> or DELETE >> - >> >> >> En

Re: [HACKERS] Pg_upgrade and toast tables bug discovered

2014-09-03 Thread Bruce Momjian
On Wed, Sep 3, 2014 at 05:12:30PM -0600, Noah Yetter wrote: > I'm not sure it's fixed.  I am attempting a pg_upgrade from 9.2.8 to 9.3.5 and > it dies like so: > > (...many relations restoring successfully snipped...) > pg_restore: creating SEQUENCE address_address_id_seq > pg_restore: [archiver

Re: [HACKERS] Display of timestamp in pg_dump custom format

2014-09-03 Thread Gavin Flower
On 04/09/14 08:13, Bruce Momjian wrote: On Thu, May 1, 2014 at 12:09:34PM -0400, Bruce Momjian wrote: On Thu, May 1, 2014 at 12:33:51PM +1200, Gavin Flower wrote: On 01/05/14 12:04, Bruce Momjian wrote: On Thu, May 1, 2014 at 08:27:49AM +1200, Gavin Flower wrote: On 01/05/14 02:51, Bruce M

Re: [HACKERS] Pg_upgrade and toast tables bug discovered

2014-09-03 Thread David G Johnston
Based upon the dates the noted patch is not in 9.3.5; which was released a couple of weeks previous to it being committed. David J. nyetter wrote > I'm not sure it's fixed. I am attempting a pg_upgrade from 9.2.8 to 9.3.5 > and it dies like so: > > (...many relations restoring successfully sni

Re: [HACKERS] 9.5: Memory-bounded HashAgg

2014-09-03 Thread Tomas Vondra
On 4.9.2014 01:34, Tomas Vondra wrote: > On 20.8.2014 20:32, Robert Haas wrote: >> >> As I see it, the advantage of Jeff's approach is that it doesn't >> really matter whether our estimates are accurate or not. We don't >> have to decide at the beginning how many batches to do, and then >> possibl

Re: [HACKERS] 9.5: Memory-bounded HashAgg

2014-09-03 Thread Tomas Vondra
On 20.8.2014 20:32, Robert Haas wrote: > On Sun, Aug 17, 2014 at 1:17 PM, Tomas Vondra wrote: >> Being able to batch inner and outer relations in a matching way is >> certainly one of the reasons why hashjoin uses that particular scheme. >> There are other reasons, though - for example being able

Re: [HACKERS] Pg_upgrade and toast tables bug discovered

2014-09-03 Thread Noah Yetter
I'm not sure it's fixed. I am attempting a pg_upgrade from 9.2.8 to 9.3.5 and it dies like so: (...many relations restoring successfully snipped...) pg_restore: creating SEQUENCE address_address_id_seq pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Joshua D. Drake
On 09/03/2014 11:48 AM, Robert Haas wrote: Anyway, to get back around to the topic of PL/SQL compatibility specifically, if you care about that issue, pick one thing that exists in PL/SQL but not in PL/pgsql and try to do something about it. Maybe it'll be something that EnterpiseDB has alread

Re: [HACKERS] 9.5: Memory-bounded HashAgg

2014-09-03 Thread Tomas Vondra
On 4.9.2014 00:42, Tomas Vondra wrote: > > Attached are two CSV files contain both raw results (4 runs per query), > and aggregated results (average of the runs), logs with complete logs > and explain (analyze) plans of the queries for inspection. Of course, I forgot to attach the CSV files ... he

Re: [HACKERS] PQputCopyEnd doesn't adhere to its API contract

2014-09-03 Thread Bruce Momjian
On Fri, May 9, 2014 at 12:03:36PM -0400, Robert Haas wrote: > On Thu, May 8, 2014 at 5:21 PM, Tom Lane wrote: > > Perhaps the text should be like this: > > > > The result is 1 if the termination message was sent; or in nonblocking > > mode, this may only indicate that the termination message was

Re: [HACKERS] PL/pgSQL 1.2

2014-09-03 Thread Marko Tiikkaja
On 2014-09-03 23:19, Hannu Krosing wrote: 1. Conditions for number of rows returned by SELECT or touched by UPDATE or DELETE - Enforcing number of rows returned/affected could be done using th

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2014-09-03 Thread Peter Geoghegan
On Wed, Sep 3, 2014 at 2:18 PM, Robert Haas wrote: > My suggestion is to remove the special cases for Darwin and 32-bit > systems and see how it goes. I guess it should still be a configure option, then. Or maybe there should just be a USE_ABBREV_KEYS macro within pg_config_manual.h. Are you sug

Re: [HACKERS] PL/pgSQL 1.2

2014-09-03 Thread Kevin Grittner
Hannu Krosing wrote: > [suggested syntax] Interesting. The only one that really offends me is: > SELECT * FROM `tablename` WHERE "`idcolumn`" = idvalue; I think that should be: SELECT * FROM `tablename` WHERE `"idcolumn"` = idvalue; i.e., I think the backticks belong on the outside. -- Ke

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-09-03 Thread Andres Freund
On 2014-09-03 17:08:12 -0400, Robert Haas wrote: > On Sat, Aug 30, 2014 at 2:04 PM, Andres Freund wrote: > > If the sort buffer is allocated when the checkpointer is started, not > > everytime we sort, as you've done in your version of the patch I think > > that risk is pretty manageable. If we re

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2014-09-03 Thread Robert Haas
On Tue, Sep 2, 2014 at 7:51 PM, Peter Geoghegan wrote: > On Tue, Sep 2, 2014 at 12:22 PM, Robert Haas wrote: >> Maybe we should get rid of the tiebreak case altogether: the second >> SortSupport object is just containing all the same values as the first >> one, with only the comparator being diff

Re: [HACKERS] PL/pgSQL 1.2

2014-09-03 Thread Hannu Krosing
On 09/03/2014 05:09 PM, Marko Tiikkaja wrote: > On 9/3/14 5:05 PM, Bruce Momjian wrote: >> On Wed, Sep 3, 2014 at 07:54:09AM +0200, Pavel Stehule wrote: >>> I am not against to improve a PL/pgSQL. And I repeat, what can be >>> done and can >>> be done early: >>> >>> a) ASSERT clause -- with some o

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2014-09-03 Thread Robert Haas
On Tue, Sep 2, 2014 at 4:41 PM, Peter Geoghegan wrote: > HyperLogLog isn't sample-based - it's useful for streaming a set and > accurately tracking its cardinality with fixed overhead. OK. >> Is it the right decision to suppress the abbreviated-key optimization >> unconditionally on 32-bit syste

Re: [HACKERS] Need Multixact Freezing Docs

2014-09-03 Thread Robert Haas
On Tue, Sep 2, 2014 at 8:18 PM, Bruce Momjian wrote: > On Thu, Aug 28, 2014 at 09:32:17AM -0700, Josh Berkus wrote: >> On 08/28/2014 09:09 AM, Alvaro Herrera wrote: >> > Josh Berkus wrote: >> >> On 04/16/2014 01:30 PM, Alvaro Herrera wrote: >> >>> Josh Berkus wrote: >> >> > You can see th

Re: [HACKERS] delta relations in AFTER triggers

2014-09-03 Thread Kevin Grittner
Marti Raudsepp wrote: > On Wed, Sep 3, 2014 at 10:49 PM, Kevin Grittner wrote: >> Marti Raudsepp wrote: >>> The concept of "lightweight relations" that pop into existence when a >>> certain kind of trigger definition is used somewhere in the function >>> stack, without a CREATE TABLE, without be

Re: [HACKERS] pgcrypto: PGP signatures

2014-09-03 Thread Marko Tiikkaja
On 2014-09-03 10:33 PM, Jeff Janes wrote: On Wed, Sep 3, 2014 at 12:43 PM, Marko Tiikkaja wrote: Right. This patch only adds support for signing data when encrypting it at the same time. There's no support for detached signatures, nor is there support for anything other than signatures of enc

Re: [HACKERS] INSERT ... ON CONFLICT {UPDATE | IGNORE}

2014-09-03 Thread Peter Geoghegan
On Wed, Sep 3, 2014 at 9:51 AM, Robert Haas wrote: >> INSERT INTO upsert(key, val) VALUES(1, 'insert') ON CONFLICT WITHIN >> upsert_pkey UPDATE SET val = 'update'; > > It seems to me that it would be better to specify a conflicting column > set rather than a conflicting index name. I'm open to pu

Re: [HACKERS] COPY and heap_sync

2014-09-03 Thread Robert Haas
On Sat, Aug 30, 2014 at 2:26 AM, Jeff Janes wrote: > If you insert tuples with COPY into a table created or truncated in the same > transaction, at the end of the COPY it calls heap_sync. > > But there cases were people use COPY in a loop with a small amount of data > in each statement. Now it is

Re: [HACKERS] postgresql latency & bgwriter not doing its job

2014-09-03 Thread Robert Haas
On Sat, Aug 30, 2014 at 2:04 PM, Andres Freund wrote: > If the sort buffer is allocated when the checkpointer is started, not > everytime we sort, as you've done in your version of the patch I think > that risk is pretty manageable. If we really want to be sure nothing is > happening at runtime, e

Re: [HACKERS] Patch for psql History Display on MacOSX

2014-09-03 Thread Stepan Rutz
Hello again, just my thoughts… in psql \s without a file is nice for me iff going through less (e.g. pager), but for the most part it doesn't work at all on mac-osx. so nothing to lose for the mac psql users. regards, stepan Am 03.09.2014 um 07:45 schrieb Noah Misch : > On Tue, Sep 02, 2014

Re: [HACKERS] delta relations in AFTER triggers

2014-09-03 Thread Marti Raudsepp
On Wed, Sep 3, 2014 at 10:49 PM, Kevin Grittner wrote: > Marti Raudsepp wrote: >> The concept of "lightweight relations" that pop into existence when a >> certain kind of trigger definition is used somewhere in the function >> stack, without a CREATE TABLE, without being discoverable in >> inform

Re: [HACKERS] pgcrypto: PGP signatures

2014-09-03 Thread Jeff Janes
On Wed, Sep 3, 2014 at 12:43 PM, Marko Tiikkaja wrote: > On 2014-09-03 9:36 PM, Jeff Janes wrote: > >> I wanted to start simple so I have a file which is signed, but not >> encrypted. I can't figure out what to do with it. All of the functions >> seem to require that it also be encrypted. I tr

Re: [HACKERS] delta relations in AFTER triggers

2014-09-03 Thread Kevin Grittner
Kevin Grittner wrote: > Marti Raudsepp wrote: >> What are the interactions with search_path? > > Pretty much the same as the interactions of RTEs with search_path. > If the apparent relation name is not schema-qualified, parse > analysis first tries to resolve the name as an RTE, and if that

Re: [HACKERS] Display of timestamp in pg_dump custom format

2014-09-03 Thread Bruce Momjian
On Thu, May 1, 2014 at 12:09:34PM -0400, Bruce Momjian wrote: > On Thu, May 1, 2014 at 12:33:51PM +1200, Gavin Flower wrote: > > On 01/05/14 12:04, Bruce Momjian wrote: > > >On Thu, May 1, 2014 at 08:27:49AM +1200, Gavin Flower wrote: > > >>On 01/05/14 02:51, Bruce Momjian wrote: > > >>>The tabl

Re: [HACKERS] delta relations in AFTER triggers

2014-09-03 Thread Kevin Grittner
Marti Raudsepp wrote: > On Mon, Sep 1, 2014 at 9:09 PM, Tom Lane wrote: > The concept of "lightweight relations" that pop into existence when a > certain kind of trigger definition is used somewhere in the function > stack, without a CREATE TABLE, without being discoverable in > information_sche

Re: [HACKERS] On partitioning

2014-09-03 Thread Robert Haas
On Tue, Sep 2, 2014 at 4:18 PM, Martijn van Oosterhout wrote: > On Tue, Sep 02, 2014 at 09:44:17AM -0400, Bruce Momjian wrote: >> On Sun, Aug 31, 2014 at 10:45:29PM +0200, Martijn van Oosterhout wrote: >> > There is one situation where you need to be more flexible, and that is >> > if you ever wan

Re: [HACKERS] pgcrypto: PGP signatures

2014-09-03 Thread Marko Tiikkaja
On 2014-09-03 9:36 PM, Jeff Janes wrote: I wanted to start simple so I have a file which is signed, but not encrypted. I can't figure out what to do with it. All of the functions seem to require that it also be encrypted. I tried providing an empty password for pgp_sym_signatures but it didn'

Re: [HACKERS] pgcrypto: PGP signatures

2014-09-03 Thread Jeff Janes
On Fri, Aug 15, 2014 at 12:55 AM, Marko Tiikkaja wrote: > Hi, > > > On 8/7/14 12:15 PM, I wrote: > >> Here's v2 of the patch. I've changed the info-extracting code to not >> look for signatures beyond the data, which also meant that it had to >> parse one-pass signatures (which it didn't do befo

[HACKERS] xslt_process deprecated?

2014-09-03 Thread Mark
Hi, I'd like to use the xslt_process function but it is in part of the documentation that is deprecated. I don't want to use something that is going to disappear and if there is a better alternative I'd like to use it, however I cannot find an equivalent in the documentation. I could well be

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Pavel Stehule
2014-09-03 21:01 GMT+02:00 David G Johnston : > This is more of an SQL request the pl/pgsql but is/has there been thought > to > adding the ternary if/then opeator? Something like: > > boolean_exp ?> val_if_true : val_if_false > > using "?" by itself would be OK but not ideal - and the addition o

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread David G Johnston
This is more of an SQL request the pl/pgsql but is/has there been thought to adding the ternary if/then opeator? Something like: boolean_exp ?> val_if_true : val_if_false using "?" by itself would be OK but not ideal - and the addition of the ">" doesn't seem hateful... Sorry if this is deemed

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Robert Haas
On Tue, Sep 2, 2014 at 5:47 PM, Álvaro Hernández Tortosa wrote: > Yeah, we differ there. I think having an Oracle compatibility layer in > PostgreSQL would be the-next-big-thing we could have. Oracle is has orders > of magnitude bigger user base than postgres has; and having the ability to > a

Re: [HACKERS] INSERT ... ON CONFLICT {UPDATE | IGNORE}

2014-09-03 Thread Peter Geoghegan
On Wed, Sep 3, 2014 at 9:51 AM, Robert Haas wrote: >> Essentially, the implementation has all stages of query processing >> During the execution of the parent ModifyTable, a special auxiliary >> subquery (the UPDATE ModifyTable) is considered as a special case. >> This is not a subplan of the Modi

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Álvaro Hernández Tortosa
On 03/09/14 15:24, Joshua D. Drake wrote: On 09/02/2014 04:01 PM, Álvaro Hernández Tortosa wrote: It's not copying. It's easying a path for others to migrate and come to Postgres. I'm interested why you are more interested in MSSQL. My reasons for being interested in Oracle are: -

Re: [HACKERS] pgcrypto: PGP armor headers

2014-09-03 Thread Jeff Janes
On Fri, Aug 15, 2014 at 1:55 AM, Marko Tiikkaja wrote: > Hi, > > > On 8/8/14 3:18 PM, I wrote: > >> Currently there's no way to generate or extract armor headers from the >> PGP armored format in pgcrypto. I've written a patch to add the >> support. >> > > Latest version of the patch here, havin

Re: [HACKERS] Immediate standby promotion

2014-09-03 Thread Robert Haas
On Mon, Sep 1, 2014 at 7:14 AM, Fujii Masao wrote: >> I think there is one downside as well for this proposal that >> apart from data loss, it can lead to uncommitted data occupying >> space in database which needs to be later cleaned by vacuum. >> This can happen with non-immediate promote as wel

Re: [HACKERS] INSERT ... ON CONFLICT {UPDATE | IGNORE}

2014-09-03 Thread Robert Haas
On Wed, Aug 27, 2014 at 10:43 PM, Peter Geoghegan wrote: > Example usage: > > INSERT INTO upsert(key, val) VALUES(1, 'insert') ON CONFLICT UPDATE > SET val = 'update'; I think that syntax is a dramatic improvement over your previous proposals. The only part I don't entire like is this: > INSERT

Re: [HACKERS] Re: [BUGS] Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns

2014-09-03 Thread Bruce Momjian
On Mon, Sep 1, 2014 at 04:40:11PM -0400, Bruce Momjian wrote: > On Mon, Sep 1, 2014 at 04:06:58PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > NOTICE: moving and merging column "c" with inherited definition > > > DETAIL: user-specified column moved to the location of the inherite

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Andres Freund
On 2014-09-03 11:23:21 -0400, Robert Haas wrote: > On Wed, Sep 3, 2014 at 11:06 AM, Andres Freund wrote: > >> >> Maybe: > >> >> > >> >> ERROR: pg_logical_slot_peek_changes cannot be used with a plugin that > >> >> produces only binary output > >> >> HINT: Use pg_logical_slot_peek_binary_changes in

Re: [HACKERS] LIMIT for UPDATE and DELETE

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 11:02 AM, Marko Tiikkaja wrote: > On 9/3/14 4:46 PM, Robert Haas wrote: >> Making it >> suck more because you don't think it's as important as your feature >> is, in my opinion, not cool. > > I really can't see how that would make inheritance suck *more*. You can't > do UPD

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 11:06 AM, Andres Freund wrote: >> >> Maybe: >> >> >> >> ERROR: pg_logical_slot_peek_changes cannot be used with a plugin that >> >> produces only binary output >> >> HINT: Use pg_logical_slot_peek_binary_changes instead. >> > >> > That level has no knowledge of what it's use

Re: [HACKERS] RLS Design

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 10:40 AM, Stephen Frost wrote: >> This is not a full review of this patch; as we're mid-CommitFest, I >> assume this will get added to the next CommitFest. > > As per usual, the expectation is that the patch is reviewed and updated > during the commitfest. Given that the co

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Pavel Stehule
2014-09-03 17:05 GMT+02:00 Bruce Momjian : > On Wed, Sep 3, 2014 at 07:54:09AM +0200, Pavel Stehule wrote: > > I am not against to improve a PL/pgSQL. And I repeat, what can be done > and can > > be done early: > > > > a) ASSERT clause -- with some other modification to allow better static > anal

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Marko Tiikkaja
On 9/3/14 5:05 PM, Bruce Momjian wrote: On Wed, Sep 3, 2014 at 07:54:09AM +0200, Pavel Stehule wrote: I am not against to improve a PL/pgSQL. And I repeat, what can be done and can be done early: a) ASSERT clause -- with some other modification to allow better static analyze of DML statements,

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Bruce Momjian
On Wed, Sep 3, 2014 at 07:54:09AM +0200, Pavel Stehule wrote: > I am not against to improve a PL/pgSQL. And I repeat, what can be done and can > be done early: > > a) ASSERT clause -- with some other modification to allow better static > analyze > of DML statements, and enforces checks in runtim

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Andres Freund
On 2014-09-03 10:59:17 -0400, Robert Haas wrote: > On Wed, Sep 3, 2014 at 10:45 AM, Andres Freund wrote: > > On 2014-09-03 09:36:32 -0400, Robert Haas wrote: > >> On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund > >> wrote: > >> > On 2014-08-29 22:42:46 +0900, Michael Paquier wrote: > >> >> Hi all

Re: [HACKERS] LIMIT for UPDATE and DELETE

2014-09-03 Thread Marko Tiikkaja
On 9/3/14 4:46 PM, Robert Haas wrote: Making it suck more because you don't think it's as important as your feature is, in my opinion, not cool. I really can't see how that would make inheritance suck *more*. You can't do UPDATE .. ORDER BY now, and you wouldn't be able to do it after the pa

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Bruce Momjian
On Tue, Sep 2, 2014 at 08:46:36PM -0400, Christopher Browne wrote: > 3.  Is there anything to be learned from Tutorial D?  That is, Date & Darwen's > would-be alternative to SQL of their Third Manifesto? What would a set-oriented-language PL look like, such as APL? I guess Perl has arrays, so it

Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 10:44 AM, Andres Freund wrote: > On 2014-09-03 09:31:50 -0400, Robert Haas wrote: >> On Fri, Aug 29, 2014 at 1:26 PM, Andres Freund >> wrote: >> > We have pg_get_serial_sequence() mapping (relation, colum) to the >> > sequence. What I'm missing right now is the inverse. I.

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 10:45 AM, Andres Freund wrote: > On 2014-09-03 09:36:32 -0400, Robert Haas wrote: >> On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund >> wrote: >> > On 2014-08-29 22:42:46 +0900, Michael Paquier wrote: >> >> Hi all, >> >> >> >> Using a plugin producing binary output, I came

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-09-03 Thread Robert Haas
On Mon, Sep 1, 2014 at 5:30 AM, Andres Freund wrote: > Hi, > >> >Currently pg_dump does not allow a user to specify an exported snapshot >> >name that he would like to use for a dump using SET TRANSACTION SNAPSHOT >> >(now pg_export_snapshot is only used for parallel pg_dump within it). I >> >imag

Re: [HACKERS] LIMIT for UPDATE and DELETE

2014-09-03 Thread Robert Haas
On Mon, Sep 1, 2014 at 8:06 AM, Marko Tiikkaja wrote: > Ideally? Yeah, that would be great. But I don't see anyone volunteering to > do that work, and I think holding back a useful feature (ORDER BY with > UPDATE/DELETE) in hopes of getting someone to volunteer to do it is insane. > Now, you're

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Andres Freund
On 2014-09-03 09:36:32 -0400, Robert Haas wrote: > On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund wrote: > > On 2014-08-29 22:42:46 +0900, Michael Paquier wrote: > >> Hi all, > >> > >> Using a plugin producing binary output, I came across this error: > >> =# select data from pg_logical_slot_peek_c

Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-09-03 Thread Andres Freund
On 2014-09-03 09:31:50 -0400, Robert Haas wrote: > On Fri, Aug 29, 2014 at 1:26 PM, Andres Freund wrote: > > We have pg_get_serial_sequence() mapping (relation, colum) to the > > sequence. What I'm missing right now is the inverse. I.e. given a > > sequence tell me the owner. > > describe.c has a

Re: [HACKERS] pg_receivexlog and replication slots

2014-09-03 Thread Robert Haas
On Sun, Aug 31, 2014 at 9:45 AM, Magnus Hagander wrote: > Do we really want those Asserts? There is not a single Assert in > bin/pg_basebackup today - as is the case for most things in bin/. We > typically use regular if statements for things that "can happen", and > just ignore the others I think

Re: [HACKERS] RLS Design

2014-09-03 Thread Stephen Frost
Robert, Alright, I can't help it so I'll try and reply from my phone for a couple of these. :) On Wednesday, September 3, 2014, Robert Haas wrote: > On Fri, Aug 29, 2014 at 8:16 PM, Brightwell, Adam > > wrote: > > Attached is a patch for RLS that was create against master at > > 01363beae52700c

Re: [HACKERS] Audit of logout

2014-09-03 Thread Fujii Masao
On Thu, Aug 28, 2014 at 11:23 PM, Amit Kapila wrote: > On Wed, Aug 27, 2014 at 5:19 PM, Fujii Masao wrote: >> >> On Sat, Aug 23, 2014 at 3:44 PM, Amit Kapila >> wrote: >> > On Tue, Aug 5, 2014 at 8:04 PM, Fujii Masao >> > wrote: >> > Changing PGC_SU_BACKEND parameter (log_connections) is >> > v

Re: [HACKERS] Scaling shared buffer eviction

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 7:27 AM, Amit Kapila wrote: >> +Background Reclaimer's Processing >> +- >> >> I suggest titling this section "Background Reclaim". > > I don't mind changing it, but currently used title is based on similar > title "Background Writer's Processi

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Jan Wieck
On 09/03/2014 03:14 AM, Joel Jacobson wrote: I'm in favour of Tom's idea. To merely make the plpgsql2 "language" a way of explicitly saying you want a specific exact combination of features/beaviour/settings which we can implemented in plpgsql's existing codebase. Since it was about 100 posts si

Re: [HACKERS] RLS Design

2014-09-03 Thread Stephen Frost
Hey Robert, On my phone at the moment but wanted to reply. I'm working through a few of these issues already actually (noticed as I've been going over it with Adam), but certainly appreciate the additional review. We've not posted another update quite yet but plan to shortly. Thanks! Stephen

Re: [HACKERS] PL/PgSQL: EXIT USING ROLLBACK

2014-09-03 Thread Robert Haas
On Mon, Sep 1, 2014 at 5:08 AM, Joel Jacobson wrote: > On Sat, Jul 26, 2014 at 8:39 PM, Tom Lane wrote: >> Basically my point is that this just seems like inventing another way to >> do what one can already do with RAISE, and it doesn't have much redeeming >> social value to justify the cognitive

Re: [HACKERS] RLS Design

2014-09-03 Thread Robert Haas
On Fri, Aug 29, 2014 at 8:16 PM, Brightwell, Adam wrote: > Attached is a patch for RLS that was create against master at > 01363beae52700c7425cb2d2452177133dad3e93 and is ready for review. > > Overview: > > This patch provides the capability to create multiple named row level > security policies f

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Wed, Sep 3, 2014 at 10:56 PM, Greg Stark wrote: > On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier > wrote: >> OK, then as all the comments are basically addressed, here is an >> updated patch correcting the comment problems mentioned by Heikki. Thanks a lot! > I just tried this and found it

Re: [HACKERS] Enable WAL archiving even in standby

2014-09-03 Thread Alexey Klyukin
On Wed, Aug 13, 2014 at 12:42 PM, Fujii Masao wrote: > Hi, > > I'd propose the attached WIP patch which allows us to enable WAL archiving > even in standby. ... > I think that this feature is useful for the case, e.g., where large database > needs to be replicated between remote servers. Imagine t

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Greg Stark
On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier wrote: > OK, then as all the comments are basically addressed, here is an > updated patch correcting the comment problems mentioned by Heikki. I just tried this and found it doesn't cooperate well with AUTOCOMMIT = 'off' and ON_ERROR_ROLLBACK = 'on

Re: [HACKERS] [v9.5] Custom Plan API

2014-09-03 Thread Robert Haas
On Sun, Aug 31, 2014 at 12:54 AM, Kohei KaiGai wrote: > 2014-08-29 13:33 GMT-04:00 Robert Haas : >> On Wed, Aug 27, 2014 at 6:51 PM, Kouhei Kaigai wrote: > I'd like to follow this direction, and start stripping the DDL support. ...please make it so. >>> The attached patch elim

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Robert Haas
On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund wrote: > On 2014-08-29 22:42:46 +0900, Michael Paquier wrote: >> Hi all, >> >> Using a plugin producing binary output, I came across this error: >> =# select data from pg_logical_slot_peek_changes('foo', NULL, NULL); >> ERROR: 0A000: output plugin ca

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Joel Jacobson
On Wed, Sep 3, 2014 at 3:17 PM, Joshua D. Drake wrote: > Well, I don't think PostgreSQL needs its own PL. I mean we already have > several (what other database has pl/javascript or pl/python?) PostgreSQL already *have* it's own PL, it's called PL/pgSQL. > Besides, the idea of this community tryi

Re: [HACKERS] Inverse of pg_get_serial_sequence?

2014-09-03 Thread Robert Haas
On Fri, Aug 29, 2014 at 1:26 PM, Andres Freund wrote: > We have pg_get_serial_sequence() mapping (relation, colum) to the > sequence. What I'm missing right now is the inverse. I.e. given a > sequence tell me the owner. > describe.c has a query for that, and it's not too hard to write, but it > st

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Joshua D. Drake
On 09/02/2014 04:01 PM, Álvaro Hernández Tortosa wrote: It's not copying. It's easying a path for others to migrate and come to Postgres. I'm interested why you are more interested in MSSQL. My reasons for being interested in Oracle are: - It has more users (biggest and above all, t

Re: [HACKERS] PL/pgSQL 2

2014-09-03 Thread Joshua D. Drake
On 09/02/2014 03:50 PM, Jan Wieck wrote: PL/pgSQL's syntax was modelled to look like PL/SQL. Which is a Ada/COBOL lookalike. Instead of trying to mimic what it was or a T-SQL thing instead ... maybe it is time to come up with a true PostgreSQL specific PL for a change? Just for the sake of be

Re: [HACKERS] GSoC on WAL-logging hash indexes

2014-09-03 Thread Vik Fearing
On 08/20/2014 02:43 AM, Michael Paquier wrote: > > > > On Thu, Jun 19, 2014 at 6:40 PM, Vik Fearing > wrote: > > On 04/30/2014 11:41 PM, Tom Lane wrote: > > We really oughta fix the WAL situation, not just band-aid around it. > > After re-reading thi

Re: [HACKERS] TODO item for protocol revision: Negotiate encryption in connection handshake

2014-09-03 Thread Magnus Hagander
On Wed, Sep 3, 2014 at 12:17 PM, Craig Ringer wrote: > Hi all > > Another thing I keep on wishing Pg's protocol had is an after-connection > negotiation for transport encryption, like STARTTLS . > > Right now, the client has to guess if the server requires, permits, or > rejects SSL, and decide wh

Re: [HACKERS] Escaping from blocked send() reprised.

2014-09-03 Thread Heikki Linnakangas
On 09/03/2014 12:23 AM, Andres Freund wrote: On 2014-09-02 17:21:03 -0400, Tom Lane wrote: Heikki Linnakangas writes: I was going to suggest using WaitLatchOrSocket instead of sleeping in 1 second increment, but I see that WaitLatchOrSocket() doesn't currently support waiting for a socket to b

Re: [HACKERS] [BUGS] BUG #10823: Better REINDEX syntax.

2014-09-03 Thread Vik Fearing
On 09/02/2014 10:17 PM, Marko Tiikkaja wrote: > On 2014-08-29 01:00, Alvaro Herrera wrote: >> Vik Fearing wrote: >> >>> Here are two patches for this. >>> >>> The first one, reindex_user_tables.v1.patch, implements the variant that >>> only hits user tables, as suggested by you. >>> >>> The second

Re: [HACKERS] pgcrypto: PGP signatures

2014-09-03 Thread Heikki Linnakangas
On 09/03/2014 02:51 PM, Joel Jacobson wrote: On Wed, Aug 6, 2014 at 2:46 PM, Marko Tiikkaja wrote: Hi hackers, Attached is a patch to add support for PGP signatures in encrypted messages into pgcrypto. I noticed Heikki wanted to check if there is any interested for the patches in the current

Re: [HACKERS] pgcrypto: PGP signatures

2014-09-03 Thread Joel Jacobson
On Wed, Aug 6, 2014 at 2:46 PM, Marko Tiikkaja wrote: > Hi hackers, > > Attached is a patch to add support for PGP signatures in encrypted messages > into pgcrypto. I noticed Heikki wanted to check if there is any interested for the patches in the current commitfest. Yes, our company Trustly are

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Michael Paquier
On Mon, Sep 1, 2014 at 11:56 PM, Tom Lane wrote: > Michael Paquier writes: >> I just tested the patch and this feature works as expected if timing >> is on and it displays the individual run time of each query kicked by >> \watch. Note that --echo-hidden does not display the query run during >> e

Re: [HACKERS] Commitfest status

2014-09-03 Thread Pavel Stehule
Hi 2014-09-03 13:18 GMT+02:00 Heikki Linnakangas : > We now have 32 patches in "Needs Review" state, and 7 of those don't have > a reviewer assigned. They are: > > 1. Grouping Sets I plan to do review of Grouping Sets, but I am afraid so I cannot to do in next two weeks. Regards Pavel > 2.

Re: [HACKERS] Scaling shared buffer eviction

2014-09-03 Thread Amit Kapila
On Wed, Sep 3, 2014 at 1:45 AM, Robert Haas wrote: > On Thu, Aug 28, 2014 at 7:11 AM, Amit Kapila wrote: > > I have updated the patch to address the feedback. Main changes are: > > > > 1. For populating freelist, have a separate process (bgreclaimer) > > instead of doing it by bgwriter. > > 2. A

Re: [HACKERS] Commitfest status

2014-09-03 Thread Heikki Linnakangas
We now have 32 patches in "Needs Review" state, and 7 of those don't have a reviewer assigned. They are: 1. Grouping Sets 2. hash join - dynamic bucket count 3. Enable WAL archiving even in standby 4. Selectivity estimation for inet operators 5. Better syntax for REINDEX 6. pgcrypto: support PGP

  1   2   >