Re: [HACKERS] pg_archivecleanup bug

2014-03-19 Thread Heikki Linnakangas
On 03/19/2014 02:30 AM, Bruce Momjian wrote: On Tue, Mar 18, 2014 at 09:13:28PM +0200, Heikki Linnakangas wrote: On 03/18/2014 09:04 PM, Simon Riggs wrote: On 18 March 2014 18:55, Alvaro Herrera alvhe...@2ndquadrant.com wrote: That said, I don't find comma expression to be particularly not

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-19 Thread Kyotaro HORIGUCHI
Hello, thank you for suggestions. The *problematic* operation sequence I saw was performed by pgsql-RA/Pacemaker. It stops a server already with immediate mode and starts the Master as a Standby at first, then promote. Focusing on this situation, there would be reasonable to reset backup

[HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Pavel Stehule
Hello This patch introduce a possibility to implement some new checks without impact to current code. 1. there is a common agreement about this functionality, syntax, naming 2. patching is clean, compilation is without error and warning 3. all regress tests passed 4. feature is well

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe Reply-To:

2014-03-19 Thread Simon Riggs
On 18 March 2014 21:21, Noah Misch n...@leadboat.com wrote: On Tue, Mar 18, 2014 at 10:39:03AM +, Simon Riggs wrote: On 8 March 2014 11:14, Simon Riggs si...@2ndquadrant.com wrote: Implemented in attached patch, v22 I commend this patch to you for final review; I would like to commit

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Petr Jelinek
On 19/03/14 09:45, Pavel Stehule wrote: Hello This patch introduce a possibility to implement some new checks without impact to current code. 1. there is a common agreement about this functionality, syntax, naming 2. patching is clean, compilation is without error and warning 3. all regress

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-19 Thread Fujii Masao
On Wed, Mar 19, 2014 at 5:28 PM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Hello, thank you for suggestions. The *problematic* operation sequence I saw was performed by pgsql-RA/Pacemaker. It stops a server already with immediate mode and starts the Master as a Standby at

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-19 Thread Heikki Linnakangas
On 03/19/2014 10:28 AM, Kyotaro HORIGUCHI wrote: The*problematic* operation sequence I saw was performed by pgsql-RA/Pacemaker. It stops a server already with immediate mode and starts the Master as a Standby at first, then promote. Focusing on this situation, there would be reasonable to reset

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

2014-03-19 Thread Simon Riggs
On 18 March 2014 11:12, Heikki Linnakangas hlinnakan...@vmware.com 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

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-19 Thread Fujii Masao
On Wed, Mar 19, 2014 at 7:57 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 03/19/2014 10:28 AM, Kyotaro HORIGUCHI wrote: The*problematic* operation sequence I saw was performed by pgsql-RA/Pacemaker. It stops a server already with immediate mode and starts the Master as a Standby

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Pavel Stehule
Hello all is pk Pavel 2014-03-19 11:28 GMT+01:00 Petr Jelinek p...@2ndquadrant.com: On 19/03/14 09:45, Pavel Stehule wrote: Hello This patch introduce a possibility to implement some new checks without impact to current code. 1. there is a common agreement about this functionality,

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-19 Thread Alvaro Herrera
Fujii Masao escribió: On Wed, Mar 19, 2014 at 7:57 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: 9.4 canceles backup mode even on immediate shutdown so the operation causes no problem, but 9.3 and before are doesn't. Hmm, I don't think we've changed that behavior in 9.4. ISTM

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Alvaro Herrera
Why start a new thread for this review? It seems to me it'd be more comfortable to keep the review as a reply on the original thread. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Pavel Stehule
2014-03-19 13:51 GMT+01:00 Alvaro Herrera alvhe...@2ndquadrant.com: Why start a new thread for this review? It seems to me it'd be more comfortable to keep the review as a reply on the original thread. I am sorry, I though so review should to start in separate thread Pavel -- Álvaro

Re: [HACKERS] logical decoding doc

2014-03-19 Thread Robert Haas
On Tue, Mar 18, 2014 at 7:27 PM, Tatsuo Ishii is...@postgresql.org wrote: Maybe this is to demonstrating peek ahead does not consume changes, but IMO this is a little bit confusing for readers and I think there's a room to enhance the second sql session comment for example: I didn't write that

[HACKERS] four minor proposals for 9.5

2014-03-19 Thread Pavel Stehule
Hello I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1. cancel time - we log a execution time cancelled statements 2. fatal verbose - this patch ensure a verbose log for fatal errors. It simplify a investigation

Re: [HACKERS] jsonb status

2014-03-19 Thread Andres Freund
Hi, On 2014-03-13 17:00:33 -0400, Andrew Dunstan wrote: Peter Geoghegan has been doing a lot of great cleanup of the jsonb code, after moving in the bits we wanted from nested hstore. You can see the current state of the code at https://github.com/feodor/postgres/tree/jsonb_and_hstore I've

Re: [HACKERS] jsonb status

2014-03-19 Thread Josh Berkus
On 03/19/2014 09:28 AM, Andres Freund wrote: * The whole datastructure doesn't have any sensible highlevel documentation. Explain ... ? I'm planning on improving the docs through the beta period for this, so can you explain what kind of docs we're missing here? -- Josh Berkus PostgreSQL

Re: [HACKERS] jsonb status

2014-03-19 Thread Andres Freund
On 2014-03-19 09:55:03 -0700, Josh Berkus wrote: On 03/19/2014 09:28 AM, Andres Freund wrote: * The whole datastructure doesn't have any sensible highlevel documentation. Explain ... ? I'm planning on improving the docs through the beta period for this, so can you explain what kind of

Re: [HACKERS] Wiki Page Draft for upcoming release

2014-03-19 Thread Alvaro Herrera
Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: On 03/17/2014 05:49 PM, Josh Berkus wrote: https://wiki.postgresql.org/wiki/20140320UpdateIssues Anyone? We're going public with this in 36 hours, so I'd love for it to actually be correct. I did a bit more hacking on this page.

Re: [HACKERS] pg_archivecleanup bug

2014-03-19 Thread Bruce Momjian
On Wed, Mar 19, 2014 at 09:59:19AM +0200, Heikki Linnakangas wrote: Would people accept? for (errno = 0; (dirent = readdir(dir)) != NULL; errno = 0) That would keep the errno's together and avoid the 'continue' additions. That's clever. A less clever way would be: for (;;) {

Re: [HACKERS] Patch: show relation and tuple infos of a lock to acquire

2014-03-19 Thread Alvaro Herrera
Alvaro Herrera escribió: Tom Lane escribió: I think the enum idea you floated is probably worth doing. It's certainly no more complex than passing a string, no? Okay, done that way, attached. I think this one solves all concerns there were. I hope the silence meant assent, because I

Re: [HACKERS] Wiki Page Draft for upcoming release

2014-03-19 Thread Josh Berkus
On 03/19/2014 10:37 AM, Alvaro Herrera wrote: Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: On 03/17/2014 05:49 PM, Josh Berkus wrote: https://wiki.postgresql.org/wiki/20140320UpdateIssues Anyone? We're going public with this in 36 hours, so I'd love for it to actually be correct.

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Alvaro Herrera
Petr Jelinek escribió: + para + These additional checks are enabled through the configuration variables + varnameplpgsql.extra_warnings/ for warnings and + varnameplpgsql.extra_errors/ for errors. Both can be set either to + a comma-separated list of checks, literalnone/ or literalall/.

Re: [HACKERS] Patch: show relation and tuple infos of a lock to acquire

2014-03-19 Thread Christian Kruse
Hi, On 19/03/14 15:12, Alvaro Herrera wrote: I hope the silence meant assent, because I have pushed this patch now. Great, thanks! Best regards, -- Christian Kruse http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services pgpYfuVjR_gg_.pgp

[HACKERS] Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-03-19 Thread Gurjeet Singh
Please find attached the patch to send transaction commit/rollback stats to stats collector unconditionally. Without this patch, the transactions that do not read from/write to a database table do not get reported to the stats collector until the client disconnects. Hence the transaction counts

Re: [HACKERS] jsonb status

2014-03-19 Thread Andrew Dunstan
On 03/19/2014 03:58 PM, Peter Geoghegan wrote: On Wed, Mar 19, 2014 at 9:28 AM, Andres Freund and...@2ndquadrant.com wrote: * Jsonb vs JsonbValue is just bad, the latter needs to be renamed, and there needs to be a very clear explanation about why two forms exist and what each is used

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Petr Jelinek
On 19/03/14 19:26, Alvaro Herrera wrote: Petr Jelinek escribió: + para + These additional checks are enabled through the configuration variables + varnameplpgsql.extra_warnings/ for warnings and + varnameplpgsql.extra_errors/ for errors. Both can be set either to + a comma-separated list

Re: [HACKERS] jsonb status

2014-03-19 Thread Peter Geoghegan
On Wed, Mar 19, 2014 at 9:28 AM, Andres Freund and...@2ndquadrant.com wrote: I've pushed one commit with minor fixes, and one with several FIXMEs to http://git.postgresql.org/gitweb/?p=users/andresfreund/postgres.git;a=shortlog;h=refs/heads/jsonb_and_hstore Cool. * Jsonb vs JsonbValue is just

Re: [HACKERS] Wiki Page Draft for upcoming release

2014-03-19 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: On 03/19/2014 10:37 AM, Alvaro Herrera wrote: I wonder about suggesting other versions of ALTER TABLE that can do heap rewrites. I don't want to recommend any version of ALTER TABLE until someone actually tests it on a corrupted database. A test would

Re: [HACKERS] Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-03-19 Thread Tom Lane
Gurjeet Singh gurj...@singh.im writes: Please find attached the patch to send transaction commit/rollback stats to stats collector unconditionally. That's intentional to reduce stats traffic. What kind of performance penalty does this patch impose? If the number of such transactions is large

Re: [HACKERS] First draft of update announcement

2014-03-19 Thread Josh Berkus
On 03/18/2014 03:02 PM, Tom Lane wrote: Josh Berkus j...@agliodbs.com writes: Updated per feedback. CC'd to Advocacy now for additional corrections. A few thoughts: Changes incorporated. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list

Re: [HACKERS] First-draft release notes for next week's releases

2014-03-19 Thread Josh Berkus
All, So, I'll ask again (because I didn't see a reply): is there any way users can *check* if they've been corrupted? Short of waiting for PK/FK violations? Given that all of the fixes we recommend involve extensive downtimes, nobody is going to want to do them just in case. How can they test

Re: [HACKERS] First-draft release notes for next week's releases

2014-03-19 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: So, I'll ask again (because I didn't see a reply): is there any way users can *check* if they've been corrupted? Short of waiting for PK/FK violations? I think it would work to do a REINDEX on each table (doesn't matter which index you select) and see if

Re: [HACKERS] First-draft release notes for next week's releases

2014-03-19 Thread Alvaro Herrera
Josh Berkus wrote: All, So, I'll ask again (because I didn't see a reply): is there any way users can *check* if they've been corrupted? Short of waiting for PK/FK violations? Obviously there are queries you can run to check each FK -- the same queries that ri_triggers.c would run when you

[HACKERS] effective_cache_size cannot be changed by a reload

2014-03-19 Thread Jeff Janes
In 9.4dev, if the server is started with effective_cache_size = -1, then it cannot be changed away from that without a restart. If you change the config file and do a reload or pg_reload_conf(), it ignores the change without comment in the logs. If you start the server with a value other than

Re: [HACKERS] First-draft release notes for next week's releases

2014-03-19 Thread Josh Berkus
On 03/19/2014 02:01 PM, Alvaro Herrera wrote: Josh Berkus wrote: All, So, I'll ask again (because I didn't see a reply): is there any way users can *check* if they've been corrupted? Short of waiting for PK/FK violations? Obviously there are queries you can run to check each FK -- the

Re: [pgsql-advocacy] [HACKERS] First draft of update announcement

2014-03-19 Thread Darren Duncan
On 2014-03-18, 2:42 PM, Josh Berkus wrote: Other PostgreSQL 9.3 only fixes in this update include: * Add read-only data_checksum parameter I recall being told last fall that this would not be added to 9.3.x (9.3.1 at the time I think) and only to 9.4.x because such a feature addition was

Re: [HACKERS] Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-03-19 Thread Gurjeet Singh
On Wed, Mar 19, 2014 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh gurj...@singh.im writes: Please find attached the patch to send transaction commit/rollback stats to stats collector unconditionally. That's intentional to reduce stats traffic. What kind of performance

Re: [HACKERS] First-draft release notes for next week's releases

2014-03-19 Thread Alvaro Herrera
Josh Berkus wrote: On 03/19/2014 02:01 PM, Alvaro Herrera wrote: Josh Berkus wrote: All, So, I'll ask again (because I didn't see a reply): is there any way users can *check* if they've been corrupted? Short of waiting for PK/FK violations? Some notes: 1. if there's been no crash

Re: [HACKERS] Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-03-19 Thread Alvaro Herrera
Gurjeet Singh wrote: On Wed, Mar 19, 2014 at 4:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh gurj...@singh.im writes: Please find attached the patch to send transaction commit/rollback stats to stats collector unconditionally. That's intentional to reduce stats traffic.

Re: [HACKERS] four minor proposals for 9.5

2014-03-19 Thread Vik Fearing
On 03/19/2014 04:34 PM, Pavel Stehule wrote: Hello I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1. cancel time - we log a execution time cancelled statements +1 I even wrote a patch to do this, but it

Re: [HACKERS] jsonb status

2014-03-19 Thread Peter Geoghegan
On Wed, Mar 19, 2014 at 9:28 AM, Andres Freund and...@2ndquadrant.com wrote: * Jsonb vs JsonbValue is just bad, the latter needs to be renamed, and there needs to be a very clear explanation about why two forms exist and what each is used for. I've pushed some comments to Github that

Re: [HACKERS] Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-03-19 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: I'm not sure I understand the point of this whole thing. Realistically, how many transactions are there that do not access any database tables? I think that something like select * from pg_stat_activity might not bump any table-access counters,

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Tom Lane
Petr Jelinek p...@2ndquadrant.com writes: On 19/03/14 19:26, Alvaro Herrera wrote: I think this should have the GUC_LIST_INPUT flag, and ensure that when multiple values are passed, we can process them all in a sane fashion. Well, as we said with Marko in the original thread, the proper

Re: [HACKERS] jsonb status

2014-03-19 Thread Andrew Dunstan
On 03/19/2014 06:57 PM, Peter Geoghegan wrote: On Wed, Mar 19, 2014 at 9:28 AM, Andres Freund and...@2ndquadrant.com wrote: * Jsonb vs JsonbValue is just bad, the latter needs to be renamed, and there needs to be a very clear explanation about why two forms exist and what each is used

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-19 Thread Pavel Stehule
2014-03-20 0:32 GMT+01:00 Tom Lane t...@sss.pgh.pa.us: Petr Jelinek p...@2ndquadrant.com writes: On 19/03/14 19:26, Alvaro Herrera wrote: I think this should have the GUC_LIST_INPUT flag, and ensure that when multiple values are passed, we can process them all in a sane fashion. Well,

Re: [HACKERS] four minor proposals for 9.5

2014-03-19 Thread Pavel Stehule
2014-03-19 23:31 GMT+01:00 Vik Fearing vik.fear...@dalibo.com: On 03/19/2014 04:34 PM, Pavel Stehule wrote: Hello I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1. cancel time - we log a execution

Re: [HACKERS] four minor proposals for 9.5

2014-03-19 Thread Josh Berkus
Pavel, I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1. cancel time - we log a execution time cancelled statements Manually cancelled? statement_timeout? Anyway, +1 to add the time to the existing log

Re: [HACKERS] jsonb status

2014-03-19 Thread Peter Geoghegan
On Wed, Mar 19, 2014 at 5:10 PM, Andrew Dunstan and...@dunslane.net wrote: I didn't like the _state-state stuff either, but I think you changed the wrong name - it's the field name in the struct that needs changing. What you've done is inconsistent with the common idiom in jsonfuncs.c. Okay.

Re: [HACKERS] Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-03-19 Thread Robert Haas
On Wed, Mar 19, 2014 at 7:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: I'm not sure I understand the point of this whole thing. Realistically, how many transactions are there that do not access any database tables? I think that something like

Re: [HACKERS] four minor proposals for 9.5

2014-03-19 Thread Pavel Stehule
2014-03-20 1:28 GMT+01:00 Josh Berkus j...@agliodbs.com: Pavel, I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1. cancel time - we log a execution time cancelled statements Manually cancelled?

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-19 Thread Kouhei Kaigai
Hello, * Definition of add_join_path_hook I didn't have idea to improve the definition and location of this hook, so it is still on the tail of the add_paths_to_joinrel(). Its definition was a bit adjusted according to the feedback on the pgsql-hackers. I omitted the mergeclause_list

Re: [HACKERS] Patch to send transaction commit/rollback stats to the stats collector unconditionally.

2014-03-19 Thread Gurjeet Singh
On Wed, Mar 19, 2014 at 7:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: I'm not sure I understand the point of this whole thing. Realistically, how many transactions are there that do not access any database tables? I think that something like

Re: [HACKERS] Minimum supported version of Python?

2014-03-19 Thread Tom Lane
I wrote: Peter Eisentraut pete...@gmx.net writes: It does pass the tests for me and others. If you are seeing something different, then we need to see some details, like what platform, what version, what Python version, how installed, what PostgreSQL version, how installed, actual diffs,

Re: [HACKERS] issue log message to suggest VACUUM FULL if a table is nearly empty

2014-03-19 Thread Amit Kapila
On Wed, Mar 19, 2014 at 6:25 AM, Wang, Jing ji...@fast.au.fujitsu.com wrote: On Friday, 14 March 2014 2:42 PM, Amit Kapila amit.kapil...@gmail.com wrote: I think it might be okay to even change this API to return the FreeSpace, as the other place it is used is for Index Vacuum, so even if we

Re: [HACKERS] four minor proposals for 9.5

2014-03-19 Thread Amit Kapila
On Wed, Mar 19, 2014 at 9:04 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1. cancel time - we log a execution time cancelled statements 2. fatal