Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Alban Hertroys
On 17 Apr 2014, at 2:49, David G Johnston david.g.johns...@gmail.com wrote: Robert DiFalco wrote Two common cases I can think of: 1. The PERL framework is only caching the insert and does not actually perform it until commit is issued. Wouldn't the same mechanism cache the corresponding

Re: [GENERAL] Heartbleed Impact

2014-04-17 Thread Stephen Frost
* Dev Kumkar (devdas.kum...@gmail.com) wrote: AFAIK, the binary name is postgres.exe, from what I've read they are static linking openssl. the updated versions on the site linked in another message are fixed per the note on that page.

Re: [GENERAL] hot standby data folder bigger than primary

2014-04-17 Thread yhe
hi, Andy, We are using streaming hot standby, no wal shipping. I checked and base and pg_xlog. both are fine. The extra space is used by /pg_multixact/members(about 5G) and /pg_multixact/offsets(about 1.5G) The doc said that pg_multixact contains multitransaction data used for shared row

Re: [GENERAL] hot standby data folder bigger than primary

2014-04-17 Thread Andres Freund
Hi, On 2014-04-17 06:28:52 -0700, yhe wrote: We are using streaming hot standby, no wal shipping. I checked and base and pg_xlog. both are fine. The extra space is used by /pg_multixact/members(about 5G) and /pg_multixact/offsets(about 1.5G) The doc said that pg_multixact contains

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Bruce Momjian
On Thu, Apr 17, 2014 at 09:39:55AM -0400, Steve Spence wrote: So, who wants to work on this with me? I'm a fair arduino programmer, but know nothing about postgres. I would look at the MySQL one as a first step to see how that was done. You are basically going to need to duplicate libpq, which

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread David Rysdam
Bruce Momjian br...@momjian.us writes: On Thu, Apr 17, 2014 at 09:39:55AM -0400, Steve Spence wrote: So, who wants to work on this with me? I'm a fair arduino programmer, but know nothing about postgres. I would look at the MySQL one as a first step to see how that was done. You are

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Bruce Momjian
On Thu, Apr 17, 2014 at 10:44:36AM -0400, David Rysdam wrote: Bruce Momjian br...@momjian.us writes: On Thu, Apr 17, 2014 at 09:39:55AM -0400, Steve Spence wrote: So, who wants to work on this with me? I'm a fair arduino programmer, but know nothing about postgres. I would look at the

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Adrian Klaver
On 04/17/2014 07:44 AM, David Rysdam wrote: Bruce Momjian br...@momjian.us writes: On Thu, Apr 17, 2014 at 09:39:55AM -0400, Steve Spence wrote: So, who wants to work on this with me? I'm a fair arduino programmer, but know nothing about postgres. I would look at the MySQL one as a first

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
I've never had that happen before, and I've used Perl and DBI a lot. Susan On Wed, Apr 16, 2014 at 5:34 PM, Robert DiFalco robert.difa...@gmail.comwrote: Two common cases I can think of: 1. The PERL framework is only caching the insert and does not actually perform it until commit is

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
It is never committed, because the lookup for the insert fails. Susan On Wed, Apr 16, 2014 at 5:39 PM, David G Johnston david.g.johns...@gmail.com wrote: Susan Cassidy-3 wrote Nor can any regular SELECTs in the main program find it. Ever? If this is a same transaction visibility issue

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread David Rysdam
Bruce Momjian br...@momjian.us writes: On Thu, Apr 17, 2014 at 10:44:36AM -0400, David Rysdam wrote: Maybe I'm being naive, but isn't libpq already being compiled for ARM by Debian? As long as it fits, you should be good. If it doesn't, you'll need to strip some stuff out. Oh, can you run

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
No, I am doing: begin transaction Loop: Do some selects, including id on second iteration of the inserted id Do the insert (function call), which also does a select on an id. Save the newly inserted id for select on the next iteration. This id will be selected by the insert function on the next

Re: [GENERAL] any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
No. One gets done automatically when the transaction fails, however. I can see it in the log. Susan On Wed, Apr 16, 2014 at 6:26 PM, Andy Colson a...@squeakycode.net wrote: On 04/16/2014 07:06 PM, Susan Cassidy wrote: Yes, it is the same connection. It is all the same transaction.

Re: [GENERAL] any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
There aren't multiple connections. It is a CGI program. One connection is made when the program starts, and that is all. I've looked at the log. It shows just what I expect, except that the lookup does not work. 0 rows are returned from the select of the newly inserted id. Susan On Wed,

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
I suppose it's possible. I've never seen this behavior before, but I don't think I've ever used this same scenario before. It is slightly unusual. Susan On Wed, Apr 16, 2014 at 11:55 PM, Alban Hertroys haram...@gmail.com wrote: On 17 Apr 2014, at 2:49, David G Johnston

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
Except for the fact that I get the new id returned from the first insert, which means that the insert probably did happen. Susan On Wed, Apr 16, 2014 at 11:55 PM, Alban Hertroys haram...@gmail.com wrote: On 17 Apr 2014, at 2:49, David G Johnston david.g.johns...@gmail.com wrote: Robert

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Jan Wieck
On 04/17/14 10:49, Bruce Momjian wrote: On Thu, Apr 17, 2014 at 10:44:36AM -0400, David Rysdam wrote: Bruce Momjian br...@momjian.us writes: On Thu, Apr 17, 2014 at 09:39:55AM -0400, Steve Spence wrote: So, who wants to work on this with me? I'm a fair arduino programmer, but know nothing

Re: [GENERAL] hot standby data folder bigger than primary

2014-04-17 Thread yhe
hi, Andy, Thanks. Right we are using 9.2.4 but plan to upgrade soon. I read 9.3.2 release notes and it is fixed specifically for this. best, Ying -- View this message in context: http://postgresql.1045698.n5.nabble.com/hot-standby-data-folder-bigger-than-primary-tp5800402p5800545.html Sent

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread David Rysdam
Steve Spence greentr...@gmail.com writes: no, you can't run arm / debian on an arduino UNO. it's all c++ compiled to machine code then uploaded. This is how all executables work. smime.p7s Description: S/MIME cryptographic signature

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Scott Marlowe
So any chance of a self-contained test case so we're not all chasing our tails? On Thu, Apr 17, 2014 at 9:06 AM, Susan Cassidy susan.cass...@decisionsciencescorp.com wrote: Except for the fact that I get the new id returned from the first insert, which means that the insert probably did happen.

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Robert DiFalco
Right. I don't know this code or DBI but many frameworks create a pool of ids using sequence generators so that they can minimize round trips and know the id of new records before the are written. Sent from my iPhone On Apr 17, 2014, at 8:06 AM, Susan Cassidy

Re: [GENERAL] pg_upgrade tablespaces

2014-04-17 Thread Bruce Momjian
On Mon, Jan 13, 2014 at 09:17:41AM -0500, Joseph Kregloh wrote: On Fri, Jan 10, 2014 at 11:53 AM, Adrian Klaver adrian.kla...@gmail.com wrote: On 01/10/2014 08:40 AM, Joseph Kregloh wrote: Just as a followup to this. The process that I am using to do the upgrade

[GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread David G Johnston
Please note that everyone here but you is bottom-posting; please follow the convention and list standard. Susan Cassidy-3 wrote It is never committed, because the lookup for the insert fails. So, alter the code so only the first insert happens then stop further processing and go explore that

Re: [GENERAL] any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Bosco Rama wrote: Is it returning the right id? I seem to remember a recent thread about Perl DBI returning the wrong id's for certain operations. Er...can you point me to that thread, please? I'd be very interested in such a bug. - --

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
I don't see how. It is a fairly complicated program, and the perl calls are done through an API, which works fine in all other circumstances (I was told I had to use an API, and not use the Perl calls directly). I moved the code in the function inline into the code, and I still cannot find the

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread John R Pierce
On 4/17/2014 7:46 AM, Steve Spence wrote: Not using arm or debian. Using a atmel 328p. which is an AVR processor architecture. 16 bit, limited memory space. you should be able to compile libpq as a static linkable library if you have an AVR compiler, its pure C. I would leave out SSL

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Andy Colson
On 4/17/2014 9:44 AM, David Rysdam wrote: Bruce Momjian br...@momjian.us writes: On Thu, Apr 17, 2014 at 09:39:55AM -0400, Steve Spence wrote: So, who wants to work on this with me? I'm a fair arduino programmer, but know nothing about postgres. I would look at the MySQL one as a first step

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Vincent Veyron
On Thu, 17 Apr 2014 10:02:00 -0700 Susan Cassidy susan.cass...@decisionsciencescorp.com wrote: I moved the code in the function inline into the code, and I still cannot find the newly inserted id the next time through the loop. I suppose you use DBD::Pg, whose current default isolation

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Susan Cassidy
I found the problem, and it is all my fault. I was calling the insert function with the wrong combination of parameters, so naturally it didn't find the item. It is working fine now, although I do think I needed to mark the function as VOLATILE, which I think helped. Thanks to all for the help.

Re: [GENERAL] pg_upgrade tablespaces

2014-04-17 Thread Joseph Kregloh
This will be fixed in the next 9.3 minor release by throwing ane error for non-existent tablespace directores. Awesome! I have already upgraded my dev, stage, preprod, and production environments to 9.3. However I do have some snapshots that I can test with. -- Bruce Momjian

Re: [GENERAL] shared memory allocation - C function

2014-04-17 Thread Alan Nilsson
Perfect, thank you. On Apr 16, 2014, at 9:56 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Apr 17, 2014 at 8:04 AM, Alan Nilsson anils...@apple.com wrote: Is it possible to allocate a small chunk of shared memory outside of any pools(i.e. manually alloced de-alloced) that is

[GENERAL] Cluster recovery - FATAL: database files are incompatible with server. Different PG_CONTROL_VERSION for cluster and server.

2014-04-17 Thread Guillaume Drolet
Dear list users, For some tests, I installed a new cluster with different parameters than the ones I had used a while ago to create the cluster I use for my day-to-day activities (let's call it my main cluster). I used initdb --no-locale -E UTF8 -D new_data_dir. Then I used pg_ctl -D new_data_dir

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Vincent Veyron
On Thu, 17 Apr 2014 10:02:00 -0700 Susan Cassidy susan.cass...@decisionsciencescorp.com wrote: I moved the code in the function inline into the code, and I still cannot find the newly inserted id the next time through the loop. I suppose you use DBD::Pg, whose current default isolation

Re: [GENERAL] Re: any way for a transaction to see inserts done earlier in the transaction?

2014-04-17 Thread Vincent Veyron
My apologies to all, I posted with the wrong id; reposting -- Regards, Vincent Veyron http://libremen.com/ Legal case, contract and insurance claim management software -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Tomas Vondra
On 17.4.2014 16:51, Adrian Klaver wrote: On 04/17/2014 07:44 AM, David Rysdam wrote: Bruce Momjian br...@momjian.us writes: On Thu, Apr 17, 2014 at 09:39:55AM -0400, Steve Spence wrote: So, who wants to work on this with me? I'm a fair arduino programmer, but know nothing about postgres. I

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Tomas Vondra
On 17.4.2014 19:43, Steve Spence wrote: Oracle thought it was a good idea to put out a MySQL version, I figure there should be some effort to counter that here . Really? I found no information about this on oracle.com or mysql.com, except for a section in the discussion forum with ~20

Re: [GENERAL] Cluster recovery - FATAL: database files are incompatible with server. Different PG_CONTROL_VERSION for cluster and server.

2014-04-17 Thread Adrian Klaver
On 04/17/2014 01:29 PM, Guillaume Drolet wrote: Dear list users, For some tests, I installed a new cluster with different parameters than the ones I had used a while ago to create the cluster I use for my day-to-day activities (let's call it my main cluster). I used initdb --no-locale -E UTF8

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Adrian Klaver
On 04/17/2014 03:04 PM, Tomas Vondra wrote: On 17.4.2014 16:51, Adrian Klaver wrote: On 04/17/2014 07:44 AM, David Rysdam wrote: Bruce Momjian br...@momjian.us writes: On Thu, Apr 17, 2014 at 09:39:55AM -0400, Steve Spence wrote: So, who wants to work on this with me? I'm a fair arduino

Re: [GENERAL] Cluster recovery - FATAL: database files are incompatible with server. Different PG_CONTROL_VERSION for cluster and server.

2014-04-17 Thread Adrian Klaver
On 04/17/2014 01:29 PM, Guillaume Drolet wrote: Dear list users, For some tests, I installed a new cluster with different parameters than the ones I had used a while ago to create the cluster I use for my day-to-day activities (let's call it my main cluster). I used initdb --no-locale -E UTF8

Re: [GENERAL] Cluster recovery - FATAL: database files are incompatible with server. Different PG_CONTROL_VERSION for cluster and server.

2014-04-17 Thread Adrian Klaver
On 04/17/2014 01:29 PM, Guillaume Drolet wrote: Dear list users, For some tests, I installed a new cluster with different parameters than the ones I had used a while ago to create the cluster I use for my day-to-day activities (let's call it my main cluster). I used initdb --no-locale -E UTF8

Re: [GENERAL] Unrecognized service

2014-04-17 Thread Augori
Hi Adrian, I don't know the answer to #1. Was that a wildcard search? As for #2, I should have been more clear, that's not a check that it does every night. I just ran that check when it seemed to be down. It has been a long time to since I've worked with it, so I didn't correctly recall that

Re: [GENERAL] Unrecognized service

2014-04-17 Thread Adrian Klaver
On 04/17/2014 05:55 PM, Augori wrote: Hi Adrian, I don't know the answer to #1. Was that a wildcard search? It was a grep of the processes running. You replied with this: Here's what the ps command gives: root(at)server# ps ax | grep post 9165 pts/1S+ 0:00 grep post If postgres

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread John R Pierce
On 4/17/2014 9:09 PM, Steve Spence wrote: You know what? Fine, it doesn't matter that much to me. I'm happy to continue using MySQL. It works with the Arduino quite nicely. Postgres doesn't work. That's Postgres loss not mine. I really thought the postgres team would be interested in providing

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Jan Wieck
On 04/18/14 00:27, Steve Spence wrote: On 4/18/2014 12:21 AM, John R Pierce wrote: personal opinion: I don't think a terminal device like a PC or an embedded system should be talking directly to SQL at all. instead, they should be talking to an application server which implements the

Re: [GENERAL] Arduino SQL Connector

2014-04-17 Thread Gavin Flower
On 18/04/14 16:27, Steve Spence wrote: On 4/18/2014 12:21 AM, John R Pierce wrote: personal opinion: I don't think a terminal device like a PC or an embedded system should be talking directly to SQL at all. instead, they should be talking to an application server which implements the

Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-17 Thread Roxanne Reid-Bennett
On 4/16/2014 2:40 PM, Robert DiFalco wrote: Thanks Roxanne, I suppose when it comes down to it -- for the current use cases and data size -- my only concern is the calling query that will need to use max to determine if a user has already had a call today. For a large user set, for each user I