Re: [GENERAL] My first PL/pgSQL function

2015-10-21 Thread Pavel Stehule
2015-10-21 4:08 GMT+02:00 Dane Foster : > Since I'm switching to OUT parameters is there any difference > (performance/efficiency wise) between using an INTO STRICT > RECORD_TYPE_VARIABLE statement which forces me to copy/assign the property > values from the RECORD to the OUT parameter variables

Re: [GENERAL] [ADMIN] $libdir/mysql_fdw

2015-10-21 Thread Devrim GÜNDÜZ
Hi, On Thu, 2015-08-27 at 12:46 -0500, Ryan King - NOAA Affiliate wrote: > ERROR: could not access file "$libdir/mysql_fdw": No such file or > directory > > dbname=# CREATE EXTENSION mysql_fdw; > > ERROR: could not open extension control file > "/usr/pgsql-9.4/share/extension/mysql_fdw.contro

Re: [GENERAL] BDR - DDL Locking

2015-10-21 Thread Craig Ringer
What's the *exact* BDR version? When you say you "attempted to" - what was the outcome? Presumably an ERROR from the TRUNCATE, right? That would roll back the transaction, and in the process abort the DDL lock acquisition attempt. Are you sure replication was working normally prior to this point,

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread Adrian Klaver
On 10/20/2015 05:48 PM, anj patnaik wrote: Several weeks ago, I successfully downloaded postgresql-9.4.4-3-linux-x64.run on a Linux server. Where did you download from? Today, I attempted to download from the site. I notice 9.5 is there, but getting lots of errors: Looks like you are trying

Re: [GENERAL] BDR - DDL Locking

2015-10-21 Thread Will McCormick
Hey Craig thank you very much for your response. > When you say you "attempted to" - what was the outcome? I tried a truncate without the cascade option. After that I tried it with the cascade option. The session just hanged indefinitely at that point. There was no rollback and I was testing on a

Re: [GENERAL] BDR - DDL Locking

2015-10-21 Thread Craig Ringer
Will, I saw after replying that there's more detail I missed in your mail, so please see the more detailed reply inline below. On 20 October 2015 at 23:31, Will McCormick wrote: > First time user here and new to PostgreSQL and BDR so I hope I have the > right place. You do. > I attempted to is

Re: [GENERAL] Multiple word synonyms (maybe?)

2015-10-21 Thread Kevin Grittner
On Tuesday, October 20, 2015 7:56 PM, Tim van der Linden wrote: > On Tue, 20 Oct 2015 12:02:46 +0100 >> ​Does the Thesaurus dictionary not do what you want?​ >> ​ >> http://www.postgresql.org/docs/current/static/textsearch-dictionaries.html#TEXTSEARCH-THESAURUS > > Damn, I completely overlooked t

Re: [GENERAL] My first PL/pgSQL function

2015-10-21 Thread Dane Foster
On Wed, Oct 21, 2015 at 3:20 AM, Pavel Stehule wrote: > > > 2015-10-21 4:08 GMT+02:00 Dane Foster : > >> Since I'm switching to OUT parameters is there any difference >> (performance/efficiency wise) between using an INTO STRICT >> RECORD_TYPE_VARIABLE statement which forces me to copy/assign the

Re: [GENERAL] My first PL/pgSQL function

2015-10-21 Thread Pavel Stehule
> ​For posterity here is the final version. I ran it through PostgreSQL > 9.5beta1 this morning so it's at least syntactically valid. Additionally I > went w/ a list of INTO targets instead of a RECORD because it's a more > elegant solution in that it made the code a little less verbose and a > lit

Re: [GENERAL] My first PL/pgSQL function

2015-10-21 Thread Merlin Moncure
On Wed, Oct 21, 2015 at 10:24 AM, Dane Foster wrote: > For posterity here is the final version. I ran it through PostgreSQL > 9.5beta1 this morning so it's at least syntactically valid. Additionally I > went w/ a list of INTO targets instead of a RECORD because it's a more > elegant solution in th

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread Adrian Klaver
On 10/21/2015 08:57 AM, anj patnaik wrote: I used the same link: http://www.enterprisedb.com/products-services-training/pgdownload I chose /*Version 9.5.0 Beta 1*/ Linux x86-64 I downloaded(postgresql-9.5.0-beta1-linux-x64.run) and ran it. I did not actually complete the install as I already

[GENERAL] Configure with Openssl fails

2015-10-21 Thread Michael Hartung
Hi, being on OS X 10.11 (El Capitain) and trying a VPATH build with plain "configure" and "make" works fine. /Users/me/Documents/workspace/postgres/configure --with-openssl --with-includes=/usr/local/ssl/include/openssl --with-libraries=/usr/local/ssl/lib fails and leads to: ... checking o

Re: [GENERAL] Configure with Openssl fails

2015-10-21 Thread Adrian Klaver
On 10/21/2015 09:16 AM, Michael Hartung wrote: Hi, being on OS X 10.11 (El Capitain) and trying a VPATH build with plain "configure" and "make" works fine. /Users/me/Documents/workspace/postgres/configure --with-openssl --with-includes=/usr/local/ssl/include/openssl --with-libraries=/usr/local/

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread Adrian Klaver
On 10/21/2015 09:14 AM, anj patnaik wrote: Ok, i am trying to determine why I am getting errors. Is it possible that my browser is corrupting the transfer? Maybe, though I used FireFox to download also. I would go to wherever the file has been downloaded on your computer and delete it and try

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread anj patnaik
I used the same link: http://www.enterprisedb.com/products-services-training/pgdownload I chose *Version 9.5.0 Beta 1* Linux x86-64 Then, I tried 9.4 for Linux x86-64 Has anyone downloaded/installed within last 2 days? my OS is RHEL 6.5 I am using the Linux machine's firefox browser to download

[GENERAL] Configure with Openssl fails

2015-10-21 Thread Michael Hartung
Hi, being on OS X 10.11 (El Capitain) and trying a VPATH build with plain "configure" and "make" works fine. /Users/me/Documents/workspace/postgres/configure --with-openssl --with-includes=/usr/local/ssl/include/openssl --with-libraries=/usr/local/ssl/lib fails and leads to: ... checking

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread Scott Mead
> On Oct 21, 2015, at 12:28, Adrian Klaver wrote: > >> On 10/21/2015 09:14 AM, anj patnaik wrote: >> Ok, i am trying to determine why I am getting errors. Is it possible >> that my browser is corrupting the transfer? > > Maybe, though I used FireFox to download also. I would go to wherever the

Re: [GENERAL] Configure with Openssl fails

2015-10-21 Thread Joe Conway
On 10/21/2015 07:31 AM, Michael Hartung wrote: > being on OS X 10.11 (El Capitain) and trying a VPATH build with plain > "configure" and "make" works fine. > > /Users/me/Documents/workspace/postgres/configure --with-openssl > --with-includes=/usr/local/ssl/include/openssl > --with-libraries=/usr/l

[GENERAL] ERROR: invalid page in block 1226710 of relation base/16750/27244

2015-10-21 Thread bricklen
Hi, We have run into some corruption in one of our production tables. We know the cause (a compute node was moved), but now we need to fix the data. We have backups, but at this point they are nearly a day old, so recovering from them is a last-resort and will incur significant downtime. We are ru

[GENERAL] temporary indexes?

2015-10-21 Thread Jonathan Vanasco
I couldn't find any mention of this on the archives... Have the project maintainers ever considered extending CREATE INDEX to support "temporary" indexes like CREATE TEMPORARY TABLE? When creating temporary tables for analytics/reporting, I've noticed that I often need to create (then drop) ind

Re: [GENERAL] ERROR: invalid page in block 1226710 of relation base/16750/27244

2015-10-21 Thread Tom Lane
bricklen writes: > We have run into some corruption in one of our production tables. We know > the cause (a compute node was moved), but now we need to fix the data. We > have backups, but at this point they are nearly a day old, so recovering > from them is a last-resort and will incur significan

Re: [GENERAL] temporary indexes?

2015-10-21 Thread Adrian Klaver
On 10/21/2015 11:43 AM, Jonathan Vanasco wrote: I couldn't find any mention of this on the archives... Have the project maintainers ever considered extending CREATE INDEX to support "temporary" indexes like CREATE TEMPORARY TABLE? When creating temporary tables for analytics/reporting, I've no

Re: [GENERAL] [ADMIN] $libdir/mysql_fdw

2015-10-21 Thread Ryan King - NOAA Affiliate
Hi Devrim, I have already installed that: "Package mysql_fdw_94-2.0.1-1.rhel6.x86_64 already installed and latest version..." We're looking into some other options though. Thanks though. Ryan King Internet Dissemination Group, Kansas City Shared Infrastructure Services Branch National Weather Serv

Re: [GENERAL] temporary indexes?

2015-10-21 Thread Jeff Janes
On Wed, Oct 21, 2015 at 11:50 AM, Adrian Klaver wrote: > On 10/21/2015 11:43 AM, Jonathan Vanasco wrote: > >> I couldn't find any mention of this on the archives... >> >> Have the project maintainers ever considered extending CREATE INDEX to >> support "temporary" indexes like CREATE TEMPORARY TA

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread Scott Mead
> On Oct 21, 2015, at 14:58, anj patnaik wrote: > > With the graphical installer, I had a way to create a user. Does it create > postgres user by default? Yeah, it creates both the OS user and the database super-user. > > Let me know. Thx > >> On Wed, Oct 21, 2015 at 1:43 PM, Scott Mead

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread Adrian Klaver
On 10/21/2015 11:58 AM, anj patnaik wrote: With the graphical installer, I had a way to create a user. Does it create postgres user by default? Yes. For more information see here: http://yum.postgresql.org/howtoyum.php in particular this PDF: http://yum.postgresql.org/files/PostgreSQL-RPM-In

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread anj patnaik
With the graphical installer, I had a way to create a user. Does it create postgres user by default? Let me know. Thx On Wed, Oct 21, 2015 at 1:43 PM, Scott Mead wrote: > > > On Oct 21, 2015, at 12:28, Adrian Klaver > wrote: > > > >> On 10/21/2015 09:14 AM, anj patnaik wrote: > >> Ok, i am try

Re: [GENERAL] temporary indexes?

2015-10-21 Thread Jonathan Vanasco
On Oct 21, 2015, at 2:59 PM, Jeff Janes wrote: > I think he means more like: > > create temporary table temp_test(id int, fld_1 varchar); > create temporary index on permanent_table (fld_1); > > select something from temp_test join permanent_table using (fld_1) where a=b; > select something_else

Re: [GENERAL] ERROR: invalid page in block 1226710 of relation base/16750/27244

2015-10-21 Thread bricklen
Hi Tom, On Wed, Oct 21, 2015 at 11:46 AM, Tom Lane wrote: > bricklen writes: > > I get the following output for ctid, id, other_id, tstamp: > > > (690651,42) |318698967 | 347978007 | 2015-10-20 01:55:41.757+00 > > (690651,43) |318698968 | 347978008 | 2015-10-20 01:55:41.663+00 > >

Re: [GENERAL] temporary indexes?

2015-10-21 Thread melvin6925
What Adrian is saying is that there is no need for "temporary" indexes. You can create the idxs on a temp table and they get dropped when you drop the table. Sent via the Samsung Galaxy S® 6, an AT&T 4G LTE smartphone Original message From: Adrian Klaver Date: 10/21/2015 14:5

Re: [GENERAL] temporary indexes?

2015-10-21 Thread Adrian Klaver
On 10/21/2015 12:27 PM, Jonathan Vanasco wrote: On Oct 21, 2015, at 2:59 PM, Jeff Janes wrote: I think he means more like: create temporary table temp_test(id int, fld_1 varchar); create temporary index on permanent_table (fld_1); select something from temp_test join permanent_table using (fl

Re: [GENERAL] ERROR: invalid page in block 1226710 of relation base/16750/27244

2015-10-21 Thread Tom Lane
bricklen writes: > On Wed, Oct 21, 2015 at 11:46 AM, Tom Lane wrote: >> I'm confused by the block mentioned in the error message not having >> anything to do with the TID sequence. I wonder whether it refers to an >> index not the table proper. What query were you using to get this output, >> e

Re: [GENERAL] ERROR: invalid page in block 1226710 of relation base/16750/27244

2015-10-21 Thread bricklen
On Wed, Oct 21, 2015 at 12:52 PM, Tom Lane wrote: > bricklen writes: > > Yes, it is definitely a table. There was originally an index on that > table > > which threw the original error (about sibling mismatch). I dropped the > > index and attempted to recreate it, which failed. Further investiga

Re: [GENERAL] temporary indexes?

2015-10-21 Thread Jonathan Vanasco
On Oct 21, 2015, at 3:42 PM, Adrian Klaver wrote: > I misunderstood then. The only thing I can think of is to wrap in a > transaction, though that presents other issues with open transactions and/or > errors in the transaction. I just explicitly drop. The convenience of an auto-drop would be

Re: [GENERAL] trouble downloading postgres 9.4 for RHEL 6.x

2015-10-21 Thread John R Pierce
On 10/21/2015 11:58 AM, anj patnaik wrote: With the graphical installer, I had a way to create a user. Does it create postgres user by default? after following the steps I gave earlier, do this... $ sudo -u postgres psql postgres=# create user YOURNAME password 'whatever' superus

Re: [GENERAL] temporary indexes?

2015-10-21 Thread Adrian Klaver
On 10/21/2015 01:28 PM, Jonathan Vanasco wrote: On Oct 21, 2015, at 3:42 PM, Adrian Klaver wrote: I misunderstood then. The only thing I can think of is to wrap in a transaction, though that presents other issues with open transactions and/or errors in the transaction. I just explicitly dr

[GENERAL] Migrate whole cluster to utf8

2015-10-21 Thread NTPT
Hi all I have a db cluster (around 50GB of data ) in LATIN2  encoding. Now I need to dump whole cluster because of upgrade to newer  version of pstgresql. But I need to  have new cluster created with utf8 encoding  And databases in that clusters tooo (with cs_CZ locale) what is the best /safe p

[GENERAL] A question about PL/pgSQL DECLAREd variable behavior

2015-10-21 Thread Dane Foster
I wrote the following simple function to try to learn what happens to a DECLAREd variable whose assignment comes from an INTO statement where the query being executed does not return a result. CREATE OR REPLACE FUNCTION _test() RETURNS BOOLEAN AS $$ DECLARE r RECORD; BEGIN SELECT 1 AS one INTO r W

Re: [GENERAL] A question about PL/pgSQL DECLAREd variable behavior

2015-10-21 Thread Thomas Munro
On Thu, Oct 22, 2015 at 2:48 PM, Dane Foster wrote: > I wrote the following simple function to try to learn what happens to a > DECLAREd variable whose assignment comes from an INTO statement where the > query being executed does not return a result. > > CREATE OR REPLACE FUNCTION _test() RETURNS

Re: [GENERAL] A question about PL/pgSQL DECLAREd variable behavior

2015-10-21 Thread Dane Foster
On Wed, Oct 21, 2015 at 10:23 PM, Thomas Munro < thomas.mu...@enterprisedb.com> wrote: > On Thu, Oct 22, 2015 at 2:48 PM, Dane Foster wrote: > > I wrote the following simple function to try to learn what happens to a > > DECLAREd variable whose assignment comes from an INTO statement where the >

Re: [GENERAL] temporary indexes?

2015-10-21 Thread Andreas Kretschmer
Jonathan Vanasco wrote: > I couldn't find any mention of this on the archives... > > Have the project maintainers ever considered extending CREATE INDEX to > support "temporary" indexes like CREATE TEMPORARY TABLE? Not sure if you mean something like this: http://www.depesz.com/2015/09/07/hypo