Re: [HACKERS] experimental: replace s_lock spinlock code with pthread_mutex on linux

2012-06-27 Thread Martijn van Oosterhout
On Wed, Jun 27, 2012 at 12:58:47AM +0200, Nils Goroll wrote: So it looks like using pthread_mutexes could at least be an option on Linux. Using futexes directly could be even cheaper. Note that below this you only have the futex(2) system call. Futexes require all counter manipulation to

Re: [HACKERS] Schema version management

2012-06-27 Thread Joel Jacobson
Robert, thank you for keeping this thread alive. Hopefully some more will join the discussion. I'm still hopeful the community can manage to agree upon acceptable tradeoffs and work-arounds to make this possible. I think the benefits clearly outweighs the minor issues of filenames, dumping

Re: [HACKERS] new --maintenance-db options

2012-06-27 Thread Amit Kapila
Tom Lane t...@sss.pgh.pa.us writes: Amit Kapila amit.kap...@huawei.com writes: [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tom Lane The implementation I've wanted to see for some time is that you can start a standalone backend, but it speaks FE/BE protocol to its caller

[HACKERS] plpython issue with Win64 (PG 9.2)

2012-06-27 Thread Asif Naeem
Hi, On Windows 7 64bit, plpython is causing server crash with the following test case i.e. CREATE PROCEDURAL LANGUAGE 'plpython3u'; CREATE OR REPLACE FUNCTION pymax (a integer, b integer) RETURNS integer AS $$ if a b: return a return b $$ LANGUAGE plpython3u; SELECT pymax(1,

Re: [HACKERS] experimental: replace s_lock spinlock code with pthread_mutex on linux

2012-06-27 Thread Nils Goroll
Using futexes directly could be even cheaper. Note that below this you only have the futex(2) system call. I was only referring to the fact that we could save one function and one library call, which could make a difference for the uncontended case. -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [PATCH 01/16] Overhaul walsender wakeup handling

2012-06-27 Thread Andres Freund
On Tuesday, June 26, 2012 04:06:08 PM Andres Freund wrote: On Tuesday, June 26, 2012 04:01:26 PM Robert Haas wrote: On Fri, Jun 22, 2012 at 12:35 PM, Andres Freund and...@2ndquadrant.com wrote: Can you elaborate on that a bit? What scenarios did you play around with, and what does win

Re: [HACKERS] [v9.3] Row-Level Security

2012-06-27 Thread Florian Pflug
On Jun27, 2012, at 07:18 , Kohei KaiGai wrote: The problem is the way to implement it. If we would have permission checks on planner stage, it cannot handle a case when user-id would be switched prior to executor stage, thus it needs something remedy to handle the scenario correctly. Instead

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Robert Haas
On Wed, Jun 27, 2012 at 12:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: So, here's a patch.  Instead of using POSIX shmem, I just took the expedient of using mmap() to map a block of MAP_SHARED|MAP_ANONYMOUS memory.  The sysv shm is still allocated, but

Re: [HACKERS] proof concept - access to session variables on client side

2012-06-27 Thread Pavel Stehule
2012/6/27 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: Another thing I don't care for is the unannounced protocol extension. yes, it needs protocol extension and increasing version too. But I don't afraid about dissynchronisation - server doesn't send 'v'

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Magnus Hagander
On Wed, Jun 27, 2012 at 3:50 AM, Tom Lane t...@sss.pgh.pa.us wrote: A.M. age...@themactionfaction.com writes: On 06/26/2012 07:30 PM, Tom Lane wrote: I solved this via fcntl locking. No, you didn't, because fcntl locks aren't inherited by child processes. Too bad, because they'd be a great

Re: [HACKERS] plpython issue with Win64 (PG 9.2)

2012-06-27 Thread Jan Urbański
On 27/06/12 11:51, Asif Naeem wrote: Hi, On Windows 7 64bit, plpython is causing server crash with the following test case i.e. CREATE PROCEDURAL LANGUAGE 'plpython3u'; CREATE OR REPLACE FUNCTION pymax (a integer, b integer) RETURNS integer AS $$ if a b: return a return b $$

Re: [HACKERS] pg_terminate_backend for same-role

2012-06-27 Thread Magnus Hagander
On Tue, Jun 26, 2012 at 10:58 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 29, 2012 at 3:04 AM, Daniel Farina dan...@heroku.com wrote: On Mon, Mar 26, 2012 at 12:14 AM, Jeff Davis pg...@j-davis.com wrote: On Tue, 2012-03-20 at 01:38 -0700, Daniel Farina wrote: On Thu, Mar 15, 2012

Re: [HACKERS] [v9.3] Row-Level Security

2012-06-27 Thread Kohei KaiGai
2012/6/27 Florian Pflug f...@phlo.org: On Jun27, 2012, at 07:18 , Kohei KaiGai wrote: The problem is the way to implement it. If we would have permission checks on planner stage, it cannot handle a case when user-id would be switched prior to executor stage, thus it needs something remedy to

Re: [HACKERS] [PATCH] Lazy hashaggregate when no aggregation is needed

2012-06-27 Thread Ants Aasma
Sorry about the delay in answering. I have been swamped with non-PG related things lately. On Tue, Jun 26, 2012 at 11:08 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Jun 22, 2012 at 10:12 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jun 19, 2012 at 5:41 AM, Etsuro Fujita

Re: [HACKERS] [v9.3] Row-Level Security

2012-06-27 Thread Robert Haas
On Wed, Jun 27, 2012 at 7:21 AM, Florian Pflug f...@phlo.org wrote: On Jun27, 2012, at 07:18 , Kohei KaiGai wrote: The problem is the way to implement it. If we would have permission checks on planner stage, it cannot handle a case when user-id would be switched prior to executor stage, thus

Re: [HACKERS] pg_terminate_backend for same-role

2012-06-27 Thread Robert Haas
On Wed, Jun 27, 2012 at 8:13 AM, Magnus Hagander mag...@hagander.net wrote: I went ahead and committed this. I kinda think we should back-patch this into 9.2.  It doesn't involve a catalog change, and would make the behavior consistent between the two releases, instead of changing in 9.1 and

[HACKERS] Reporting hba lines

2012-06-27 Thread Magnus Hagander
When debugging strange and complex pg_hba lines, it can often be quite useful to know which line is matching a particular connection that failed for some reason. Because more often than not, it's actually not using the line in pg_hba.conf that's expected. The easiest way to do this is to emit an

Re: [HACKERS] [v9.3] Row-Level Security

2012-06-27 Thread Kohei KaiGai
2012/6/27 Robert Haas robertmh...@gmail.com: On Wed, Jun 27, 2012 at 7:21 AM, Florian Pflug f...@phlo.org wrote: On Jun27, 2012, at 07:18 , Kohei KaiGai wrote: The problem is the way to implement it. If we would have permission checks on planner stage, it cannot handle a case when user-id

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Cédric Villemain
Le mercredi 27 juin 2012 14:54:15, Magnus Hagander a écrit : When debugging strange and complex pg_hba lines, it can often be quite useful to know which line is matching a particular connection that failed for some reason. Because more often than not, it's actually not using the line in

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Jun 27, 2012 at 3:50 AM, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether this design can be adapted to Windows?  IIRC we do not have a bulletproof data directory lock scheme for Windows. It seems like this makes few enough demands on the

Re: [HACKERS] Visual Studio 2012 RC

2012-06-27 Thread Heikki Linnakangas
On 10.06.2012 11:41, Magnus Hagander wrote: On Sun, Jun 10, 2012 at 3:16 AM, Brar Pieningb...@gmx.de wrote: Magnus Hagander wrote: I don't have too much hope for them actually changing it - they seem hell-bent on forcing everybody into metro, and this seems to be yet another way to do that.

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Jun 27, 2012 at 12:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Would Posix shmem help with that at all? Why did you choose not to use the Posix API, anyway? It seemed more complicated. If we use the POSIX API, we've got to have code to find a

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Stephen Frost
All, * Tom Lane (t...@sss.pgh.pa.us) wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Jun 27, 2012 at 12:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Would Posix shmem help with that at all? Why did you choose not to use the Posix API, anyway? It seemed more complicated. If we

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Right, but does it provide honest protection against starting two postmasters in the same data directory? Or more to the point, does it prevent starting a new postmaster when the old postmaster crashed but there are still orphaned backends making

[HACKERS] Re: [PATCH 07/16] Log enough data into the wal to reconstruct logical changes from it if wal_level=logical

2012-06-27 Thread Heikki Linnakangas
On 13.06.2012 14:28, Andres Freund wrote: @@ -2584,6 +2610,73 @@ l1: rdata[1].buffer_std = true; rdata[1].next = NULL; + /* +* XXX: We could decide not to log changes when the origin is not the +* local node, that

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: When debugging strange and complex pg_hba lines, it can often be quite useful to know which line is matching a particular connection that failed for some reason. Because more often than not, it's actually not using the line in pg_hba.conf that's

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Magnus Hagander
On Wed, Jun 27, 2012 at 3:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: When debugging strange and complex pg_hba lines, it can often be quite useful to know which line is matching a particular connection that failed for some reason. Because more often

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Magnus Hagander
On Wed, Jun 27, 2012 at 3:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Wed, Jun 27, 2012 at 3:50 AM, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether this design can be adapted to Windows?  IIRC we do not have a bulletproof data directory lock

Re: [HACKERS] warning handling in Perl scripts

2012-06-27 Thread Andrew Dunstan
On 06/24/2012 04:05 PM, Robert Haas wrote: On Sun, Jun 24, 2012 at 2:40 PM, Peter Eisentrautpete...@gmx.net wrote: Every time I make a change to the structure of the catalog files, genbki.pl produces a bunch of warnings (like Use of uninitialized value in string eq at genbki.pl line ...),

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Jun 27, 2012 at 3:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: BTW, are you sure that auth_failed is only called in cases where an hba line has already been identified? Even if true today, it seems fairly risky to assume that. It is true

[HACKERS] Regarding WAL Format Changes

2012-06-27 Thread Amit Kapila
While reading patch-1 ( http://archives.postgresql.org/pgsql-hackers/2012-06/txtFskHiYakjO.txt 1-use-uint64-got-segno.patch) of WAL Format Changes(http://archives.postgresql.org/message-id/4FDA5136.6080206@enterpris edb.com), I had few observations which are summarized below: 1. Function

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Jun 27, 2012 at 3:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: AFAIR we basically punted on those problems for the Windows port, for lack of an equivalent to nattch. No, we spent a lot of time trying to *fix* it, and IIRC we did. OK, in that

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Magnus Hagander
On Wed, Jun 27, 2012 at 4:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Wed, Jun 27, 2012 at 3:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: BTW, are you sure that auth_failed is only called in cases where an hba line has already been identified?  Even if

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Robert Haas
On Wed, Jun 27, 2012 at 9:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Jun 27, 2012 at 12:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Would Posix shmem help with that at all?  Why did you choose not to use the Posix API, anyway? It seemed more

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Wed, Jun 27, 2012 at 4:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: cases where people are modifying the wrong hba file.  Can we show the source text of the hba line? We don't currently keep the full source text around - but we certainly could do

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Robert Haas
On Wed, Jun 27, 2012 at 9:52 AM, Stephen Frost sfr...@snowman.net wrote: What this all boils down to is- can you have a shm segment that goes away when no one is still attached to it, but actually give it a name and then detect if it already exists atomically on startup on Linux/Unixes?  If

Re: [HACKERS] Regarding WAL Format Changes

2012-06-27 Thread Heikki Linnakangas
On 27.06.2012 17:14, Amit Kapila wrote: 1. Function header for following functions still contains referece to log, seg a. InstallXLogFileSegment() b. RemoveOldXlogFiles() c. XLogFileCopy() d. XLogGetLastRemoved() e. UpdateLastRemovedPtr() f. RemoveOldXlogFiles() Thanks,

[HACKERS] Re: [COMMITTERS] pgsql: Move WAL continuation record information to WAL page header.

2012-06-27 Thread Heikki Linnakangas
On 27.06.2012 17:53, Andres Freund wrote: I had noticed one thing when reviewing the patches before: @@ -717,6 +719,15 @@ XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata) booldoPageWrites; boolisLogSwitch = (rmid == RM_XLOG_ID info == XLOG_SWITCH); uint8

Re: [HACKERS] warning handling in Perl scripts

2012-06-27 Thread David E. Wheeler
On Jun 27, 2012, at 4:07 PM, Andrew Dunstan wrote: I realise I'm late to this party, but I'm with Robert. The root cause of the errors should be fixed. That's not to say that making warnings fatal might not also be a good idea as a general defense mechanism. ISTM that if they are fatal,

Re: [HACKERS] foreign key locks

2012-06-27 Thread Alvaro Herrera
Excerpts from Kevin Grittner's message of mié jun 27 08:40:58 -0400 2012: Alvaro Herrera wrote: here's fklocks v14, which also merges to new master as there were several other conflicts. It passes make installcheck-world now. Recent commits broke it again, so here's a rebased v15.

Re: [HACKERS] Regarding WAL Format Changes

2012-06-27 Thread Alvaro Herrera
Excerpts from Heikki Linnakangas's message of mié jun 27 10:56:13 -0400 2012: On 27.06.2012 17:14, Amit Kapila wrote: For the above 2 changed error messages, 'log segment' is used for filename. However all similar changes has 'log file' for filename. There are some places

Re: [HACKERS] Regarding WAL Format Changes

2012-06-27 Thread Fujii Masao
On Wed, Jun 27, 2012 at 11:56 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 27.06.2012 17:14, Amit Kapila wrote: 1. Function header for following functions still contains referece to log, seg    a. InstallXLogFileSegment()    b. RemoveOldXlogFiles()    c.

Re: [HACKERS] [v9.3] Row-Level Security

2012-06-27 Thread Florian Pflug
On Jun27, 2012, at 15:07 , Kohei KaiGai wrote: Probably, PlannedStmt-invalItems allows to handle invalidation of plan-cache without big code changes. I'll try to put a flag of user-id to track the query plan with RLS assumed, or InvalidOid if no RLS was applied in this plan. I'll investigate

Re: [HACKERS] [COMMITTERS] pgsql: Move WAL continuation record information to WAL page header.

2012-06-27 Thread Andres Freund
On Wednesday, June 27, 2012 05:09:46 PM Heikki Linnakangas wrote: On 27.06.2012 17:53, Andres Freund wrote: I had noticed one thing when reviewing the patches before: @@ -717,6 +719,15 @@ XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata) booldoPageWrites;

Re: [HACKERS] Regarding WAL Format Changes

2012-06-27 Thread Heikki Linnakangas
On 27.06.2012 18:55, Fujii Masao wrote: On Wed, Jun 27, 2012 at 11:56 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 27.06.2012 17:14, Amit Kapila wrote: 1. Function header for following functions still contains referece to log, seg a. InstallXLogFileSegment()

Re: [HACKERS] Regarding WAL Format Changes

2012-06-27 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: So is there any particular reason for it? Not really. There are several messages that use log file %s, and also several places that use log segment %s Should we make it consistent and use either log segment or log file

Re: [HACKERS] [ADMIN] pg_basebackup blocking all queries with horrible performance

2012-06-27 Thread Fujii Masao
On Thu, Jun 21, 2012 at 3:18 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jun 20, 2012 at 7:18 AM, Magnus Hagander mag...@hagander.net wrote: You agreed to add something like NOSYNC option into START_REPLICATION command? I'm on the fence. I was hoping somebody else would chime in

Re: [HACKERS] Regarding WAL Format Changes

2012-06-27 Thread Fujii Masao
On Thu, Jun 28, 2012 at 1:13 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 27.06.2012 18:55, Fujii Masao wrote: On Wed, Jun 27, 2012 at 11:56 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com  wrote: On 27.06.2012 17:14, Amit Kapila wrote: 1. Function

Re: [HACKERS] [ADMIN] pg_basebackup blocking all queries with horrible performance

2012-06-27 Thread Simon Riggs
On 27 June 2012 18:24, Fujii Masao masao.fu...@gmail.com wrote: will never become sync standby even if their name is in synchronous_standby_names. I don't understand why you'd want that. What is wrong with removing the name from synchronous_standby_names if you don't like it? --  Simon

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread A.M.
On Jun 27, 2012, at 7:34 AM, Robert Haas wrote: On Wed, Jun 27, 2012 at 12:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: So, here's a patch. Instead of using POSIX shmem, I just took the expedient of using mmap() to map a block of

Re: [HACKERS] Patch: add conversion from pg_wchar to multibyte

2012-06-27 Thread Robert Haas
On Thu, May 24, 2012 at 12:04 AM, Alexander Korotkov aekorot...@gmail.com wrote: Thanks. I rewrote inverse conversion from pg_wchar to mule. New version of patch is attached. Review: It looks to me like pg_wchar2utf_with_len will not work, because unicode_to_utf8 returns its second argument

Re: [HACKERS] Uh, I change my mind about commit_delay + commit_siblings (sort of)

2012-06-27 Thread Robert Haas
On Sat, Jun 2, 2012 at 10:44 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Tom Lane  wrote: Simon Riggs  writes: On 31 May 2012 15:00, Tom Lane  wrote: If we want to finish the beta cycle in a reasonable time period and get back to actual development, we have to refrain from adding

Re: [HACKERS] Uh, I change my mind about commit_delay + commit_siblings (sort of)

2012-06-27 Thread Peter Geoghegan
On 27 June 2012 23:01, Robert Haas robertmh...@gmail.com wrote: 1. Are there any call sites from which this should be disabled, either because the optimization won't help, or because the caller is holding a lock that we don't want them sitting on for a moment longer than necessary?  I think

[HACKERS] pg_signal_backend() asymmetry

2012-06-27 Thread Josh Kupershmidt
Hi all, I have one nitpick related to the recent changes for pg_cancel_backend() and pg_terminate_backend(). If you use these functions as an unprivileged user, and try to signal a nonexistent PID, you get: ERROR: must be superuser or have the same role to cancel queries running in other

Re: [HACKERS] WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink

2012-06-27 Thread Shigeru HANADA
On Thu, Jun 14, 2012 at 10:55 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jun 13, 2012 at 12:07 AM, Amit Kapila amit.kap...@huawei.com wrote: To achieve the same in dblink, we need to parse the passed connection string and check if it contains fallback_application_name, if yes then its

[HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Josh Berkus
Folks, Yeah, I can't believe I'm calling for *yet another* configuration variable either. Suggested workaround fixes very welcome. The basic issue is that autovacuum_max_workers is set by most users based on autovac's fairly lightweight action most of the time: analyze, vacuuming pages not on

Re: [HACKERS] WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink

2012-06-27 Thread Robert Haas
On Wed, Jun 27, 2012 at 9:57 PM, Shigeru HANADA shigeru.han...@gmail.com wrote: On Thu, Jun 14, 2012 at 10:55 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jun 13, 2012 at 12:07 AM, Amit Kapila amit.kap...@huawei.com wrote: To achieve the same in dblink, we need to parse the passed

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Yeah, I can't believe I'm calling for *yet another* configuration variable either. Suggested workaround fixes very welcome. The basic issue is that autovacuum_max_workers is set by most users based on autovac's fairly lightweight action most of the time:

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread David Johnston
On Jun 27, 2012, at 22:00, Josh Berkus j...@agliodbs.com wrote: Folks, Yeah, I can't believe I'm calling for *yet another* configuration variable either. Suggested workaround fixes very welcome. The basic issue is that autovacuum_max_workers is set by most users based on autovac's

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Josh Berkus
I think what you've really got here is inappropriate autovacuum cost delay settings, and/or the logic in autovacuum.c to try to divvy up the available I/O capacity by tweaking workers' delay settings isn't working very well. It's hard to propose improvements without a lot more detail than

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Stephen Frost
Josh, all, * Josh Berkus (j...@agliodbs.com) wrote: Yeah, I can't believe I'm calling for *yet another* configuration variable either. Suggested workaround fixes very welcome. As I suggested on IRC, my thought would be to have a goal-based system for autovacuum which is similar to our

Re: [HACKERS] Server crash while trying to fetch EXPLAIN query results with a cursor

2012-06-27 Thread Tom Lane
Rushabh Lathia rushabh.lat...@gmail.com writes: Above testcase endup with server crash. Crash is due to following assert into ScanQueryForLocks() Assert(parsetree-commandType != CMD_UTILITY); Meh, yeah, more fallout from the CREATE TABLE AS representation change. PFA patch for the same.

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: I think what you've really got here is inappropriate autovacuum cost delay settings, and/or the logic in autovacuum.c to try to divvy up the available I/O capacity by tweaking workers' delay settings isn't working very well. It's hard to propose

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Josh Berkus (j...@agliodbs.com) wrote: Yeah, I can't believe I'm calling for *yet another* configuration variable either. Suggested workaround fixes very welcome. As I suggested on IRC, my thought would be to have a goal-based system for autovacuum

Re: [HACKERS] Regarding WAL Format Changes

2012-06-27 Thread Amit Kapila
From: Heikki Linnakangas [mailto:heikki.linnakan...@enterprisedb.com] Sent: Wednesday, June 27, 2012 8:26 PM On 27.06.2012 17:14, Amit Kapila wrote: 2. @@ -2680,8 +2645,8 @@ InstallXLogFileSegment(uint32 *log, uint32 *seg, char *tmppath,

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Robert Haas
On Wed, Jun 27, 2012 at 11:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Stephen Frost sfr...@snowman.net writes: * Josh Berkus (j...@agliodbs.com) wrote: Yeah, I can't believe I'm calling for *yet another* configuration variable either.  Suggested workaround fixes very welcome. As I suggested

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: For example, suppose that 26 tables each of which is 4GB in size are going to simultaneously come due for an anti-wraparound vacuum in 26 hours. For the sake of simplicity suppose that each will take 1 hour to vacuum. What we currently do is wait for

Re: [HACKERS] Posix Shared Mem patch

2012-06-27 Thread Robert Haas
On Wed, Jun 27, 2012 at 9:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Jun 27, 2012 at 12:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Would Posix shmem help with that at all?  Why did you choose not to use the Posix API, anyway? It seemed more

Re: [HACKERS] pl/perl and utf-8 in sql_ascii databases

2012-06-27 Thread Kyotaro HORIGUCHI
Hello, thank you for your sugestion. I agree. That is the fundamental question. I've coded just for my fun but I don't see not so much signicance to do that. We might omit the test for this which is non-ciritical and corner cases. We need these tests to work on Windows too, so fancy

Re: [HACKERS] We probably need autovacuum_max_wraparound_workers

2012-06-27 Thread Robert Haas
On Thu, Jun 28, 2012 at 12:51 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: For example, suppose that 26 tables each of which is 4GB in size are going to simultaneously come due for an anti-wraparound vacuum in 26 hours.  For the sake of simplicity suppose