[GENERAL] Resetting Serial Column Sequence Number

2006-10-13 Thread Adam
I just emptied my table and I want all my new inserts to start with a 'location_id' of '1'.  The table is named "locations" with a SERIAL column "location_id"   I tried the below SQL to rest the sequence ID but it's not working.  What am I doing wrong?   SELECT setval('locations_location_id_s

[GENERAL] RAM Based Disk Drive?

2006-10-31 Thread Adam
I recently saw a Hard Disk Drive that is really 4GB of RAM with and SATA 1.5Gb/s serial interface.  It's basically a hard disk drive that uses RAM.  It also has a battery backup, so if you loose power, you don't loose your data.   Has anyone tried using this, and if so was there a noticeable

[GENERAL] ECPG and multiple threads

2006-11-10 Thread Adam
ource code? Thanks in advance. Adam. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] CertFirst Legit?

2006-12-01 Thread adam
I'm looking at taking this course.  The Illinois location is about 30 min from my home.   No one else has taken this course? Original Message Subject: Re: [GENERAL] CertFirst Legit?From: Jim Nasby <[EMAIL PROTECTED]>Date: Thu, November 30, 2006 2:34 pmTo: [EMAIL PROTECTED]Cc: pgsq

[GENERAL] Best Perl DBI Driver for Postgres

2006-12-21 Thread adam
Can anyone recommend a stable Perl DBI driver for Postgresql?   I'm using DBD::PgPP and it's limited to not using BLOB data and has a bug in it if you return only one filed.  Have a better suggestion?   Thanks Adam

[GENERAL] Granting Privleges on All Tables in One Comand?

2006-01-11 Thread Adam
Is it possible to 'GRANT SELECT ON ALL TABLES TO User' in 1 command ? I saw the question in 2003 and wonder if it's still true. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] What's wrong with this SQL?

2006-05-09 Thread Adam
I'm trying to create a table and I'm getting this error: SQL error: ERROR: syntax error at or near "(" at character 39 In statement: CREATE TABLE "users" ("user_ID" SERIAL(12), "first_name" character varying(40) NOT NULL, "last_name" character varying(40) NOT NULL, "password"

[GENERAL] Logging and Viewing SQL History

2006-06-10 Thread Adam
I tried searching for this but didn't see anything. Is there a way I can see the last 5 or last 1 SQL statements that have been run on the server? I'm using 8.1.3 ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Getting Primary Key Value After Insert

2006-07-08 Thread Adam
I'm inserting data into two tables, the second table has a forigen key that points to the primary key of the first table. After I insert a row into the first table, I need to take the primary key value created in "SERIAL" column and store it so I can insert it as the forigen key value on the s

Re: [GENERAL] Getting Primary Key Value After Insert

2006-07-08 Thread Adam
I think I found the answer, you use the CURRVAL() function. Just to cover all the bases, consider this scenario in chronological order: 1. You insert data and the primary key is set to 20. 2. Someone else inserts data and the next key is set to 21. 3. If you call currval() will it return 20?

[GENERAL] count of occurences

2001-09-14 Thread Adam
I help run a job database and have a table of search records. I want a query that will return the top 10 jobs by search frequency. I'm familiar with ORDER BY and LIMIT, so I basically need this: Given a table search_records: job_num --- 1 2 2 3 4 4 4 I want a query that will return: job_nu

Re: [GENERAL] pgAgent

2015-04-06 Thread Adam Brusselback
Here you are: do $$ declare job_id int; begin /* add a job and get its id: */ insert into pgagent.pga_job ( jobjclid , jobname ) values ( 1 /*1=Routine Maintenance*/ , 'DELETE_NAMES' /* job name */ ) returning

Re: [GENERAL] How to keep pg_largeobject from growing endlessly

2015-04-15 Thread Adam Hooper
tp://www.postgresql.org/message-id/camwjz6gf9tm+vwm_0ymqypi4xk_bv2nyaremwr1ecsqbs40...@mail.gmail.com Enjoy life, Adam -- Adam Hooper +1-613-986-3339 http://adamhooper.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to keep pg_largeobject from growing endlessly

2015-04-15 Thread Adam Hooper
On Wed, Apr 15, 2015 at 9:57 AM, Andreas Joseph Krogh wrote: > > På onsdag 15. april 2015 kl. 15:50:36, skrev Adam Hooper > : > > On Wed, Apr 15, 2015 at 4:49 AM, Andreas Joseph Krogh > wrote: > > > > In other words: Does vacuumlo cause diskspace used by pg_large

Re: [GENERAL] Using the database to validate data

2015-07-27 Thread Adam Brusselback
order_date::date != s2.order_date > OR s.ship_date::date != s2.ship_date > OR s.sale_date::date != s2.sale_date > OR p.product_id != s2.product_id > OR s.quantity::numeric != s2.quantity > OR uom.uom_type_id != s2.uom_type_id > OR s.price::numeric != s2.price > OR s.reduction::n

Re: [GENERAL] PostgreSQL Developer Best Practices

2015-08-25 Thread Adam Brusselback
reference as a foreign key. In the case of a many to many situation, I prefer to use a two column composite key. In the case of a many to many, i've never run into a case where I needed to reference a single row in that table without knowing about both sides of that relation. Just my $0.02

[GENERAL] UUID and Enum columns in exclusion constraints

2016-06-17 Thread Adam Brusselback
Just wondering what others have done for using enum or uuid columns in exclusion constraints? I have a solution now, but I just wanted to see what others have ended up doing as well and see if what i'm doing is sane. If i'm doing something unsafe, or you know of a better way, please chime in. Fo

Re: [GENERAL] OT hardware recommend

2016-06-18 Thread Adam Brusselback
Agreed with Joshua, a single ssd will have way more performance than all 15 of those for random io for sure, and probably be very close on sequential. That said, a raid controller able to handle all 15 drives (or multiple that handle a subset of the drives) is likely to be more expensive than a sin

Re: [GENERAL] C++ port of Postgres

2016-08-15 Thread Adam Brusselback
h for the state of the project. The latter possibly could if the community gets on board. Thanks, -Adam

Re: [GENERAL] Foreign key against a partitioned table

2016-08-23 Thread Adam Brusselback
I have wondered if there were any plans to enhance fkey support for partitioned tables now that more work is being done on partitioning (I know there has been a large thread on declarative partitioning on hackers, though I haven't followed it too closely). Foreign keys are all done through trigger

Re: [GENERAL] Vacuum Full - Questions

2016-08-31 Thread Adam Brusselback
Yes that very well could happen because the size of the table changed, as well as stats being more accurate now. Just because you have a seq scan doesn't mean the planer is making a bad choice.

[GENERAL] Incrementally refreshed materialized view

2016-09-26 Thread Adam Brusselback
;ll get me everything I need. I'd really appreciate any help with this, as i'd love a better way to get eagerly refreshed materialized views in Postgres rather than doing everything manually as I have to now. If I can provide any more info please let me know. Thanks, -Adam

Re: [GENERAL] Incrementally refreshed materialized view

2016-09-26 Thread Adam Brusselback
I require eagerly refreshed materialized views for my use case, which is something Postgres does not currently support. I need my updates to a table the view refers to visible within the same transaction, and often it is a single change to one row which will only effect a single row in the view.

Re: [GENERAL] Incrementally refreshed materialized view

2016-09-26 Thread Adam Brusselback
On Mon, Sep 26, 2016 at 2:35 PM, Rob Sargent wrote: > Of course 9.5 is the current release so the answer is Yes, since 9.5 > > It seems like there is some confusion about what we're talking about. I am talking about incremental updates to a sort of "fake" materialized view (implemented as a table

Re: [GENERAL] Incrementally refreshed materialized view

2016-09-26 Thread Adam Brusselback
On Mon, Sep 26, 2016 at 3:21 PM, Kevin Grittner wrote: > On Mon, Sep 26, 2016 at 2:04 PM, Rakesh Kumar > wrote: > > > Does PG have a concept of MV log, from where it can detect the > > delta changes and apply incremental changes quickly. > > That is what I am trying to work toward with the patc

Re: [GENERAL] Incrementally refreshed materialized view

2016-09-29 Thread Adam Brusselback
On Thu, Sep 29, 2016 at 8:10 AM, Nguyễn Trần Quốc Vinh wrote: > Dear, > > As it was recommended, we pushed our projects into github: > https://github.com/ntqvinh/PgMvIncrementalUpdate. > > 1) Synchronous incremental update > - For-each-row triggers are generated for all changing events on all > u

[GENERAL] Postgres create database freezes - trying to run with replication

2016-11-01 Thread Adam Carrgilson
unfreeze this connection and correctly create my applications database correctly? Many Thanks, Adam.

Re: [GENERAL] CRM where pg is a first class citizen?

2016-12-13 Thread Adam Brusselback
On Tue, Dec 13, 2016 at 3:36 PM, George Weaver wrote: > I've never used it but what about: > > https://developer.sugarcrm.com/2012/08/03/like-postgresql- > and-want-to-use-it-with-sugarcrm-check-out-a-new-community-project/ > > Cheers, > George Looks like not much came out of it: https://commun

Re: [GENERAL] Column Tetris Automatisation

2017-01-15 Thread Adam Brusselback
I for one would love having something like this available. I also know i've seen discussed in the past, divorcing the physical column order from the logical column order, which seems like it'd be useful here as well to not break the workflow of those who do use ordinal positions for columns.

[GENERAL] Reading VARTAT EXTERNAL ONDISK value from logical replication decoder

2017-01-27 Thread Adam Dratwiński
someone more experienced help me to decode this value? I am talking about this part of code: https://github.com/xstevens/decoderbufs/blob/master/src/decoderbufs.c#L527-L528 Cheers Adam

Re: [GENERAL] create trigger in postgres to check the password strength

2017-02-03 Thread Adam Brusselback
Whoops, accidentally sent this to only Pawan instead of the list: > > Hey there, so I would highly suggest you avoid arbitrary password strength policies like that. I wrote a library for my company which we use for password strength estimation, but it is written in Java. I've been thinking about

Re: [GENERAL] create trigger in postgres to check the password strength

2017-02-03 Thread Adam Brusselback
Oh sorry, I misunderstood. Didn't realize you meant database users an not an application user table implemented in Postgres. I'll let others answer that then because i'm not aware of a way to do that.

[GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Adam Guthrie
); GRANT ALL ON ALL TABLES IN SCHEMA public TO test; SET ROLE test; SELECT * FROM b; UPDATE b SET text = 'ONE' WHERE id = 1; gives error: psql:/tmp/test.sql:26: ERROR: plan should not reference subplan's variable Is this a bug or am I doing something wrong? Any help much ap

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Adam Guthrie
On 24 February 2016 at 20:27, Stephen Frost wrote: > Yeah, looks like a bug to me. My gut reaction is that we're pulling up > a subquery in a way that isn't possible and that plan shouldn't be > getting built/considered. Thanks - shall I go ahead and submit a bug report? > > As a work-around, u

[GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-08 Thread Adam Brusselback
to a real system, but it'll do. Please see attached. Thanks, -Adam CREATE SCHEMA test; SET search_path = 'test'; CREATE TABLE header ( header_id serial primary key, description text not null, amount numeric not null ); CREATE TABLE detail_1 ( detail_1_id serial primary

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-08 Thread Adam Brusselback
le to contain that logic within a view of some sort though, as a bunch of other stuff is built on top of that. Having to push that aggregate query into all of those other queries would be hell. Thanks, -Adam On Tue, Mar 8, 2016 at 5:17 PM, Tom Lane wrote: > Adam Brusselback writes: > > I

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-09 Thread Adam Brusselback
I responded yesterday, but it seems to have gotten caught up because it was too big with the attachments... Here it is again. Sorry about not posting correctly, hopefully I did it right this time. So I wanted to see if Sql Server (2014) could handle this type of query differently than Postgres (9

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-10 Thread Adam Brusselback
Rob, I understand that if I were to replicate the logic in that view for every use case I had for those totals, this would not be an issue. But that would very much complicate some of my queries to the point of absurdity if I wanted to write them in a way which would push everything down properly.

Re: [GENERAL] Columnar store as default for PostgreSQL 10?

2016-04-25 Thread Adam Brusselback
>It is not difficult to simulate column store in a row store system if >you're willing to decompose your tables into (what is essentially) >BCNF fragments. It simply is laborious for designers and programmers. I could see a true column store having much better performance than tricking a row base

Re: [GENERAL] NULL concatenation

2016-05-12 Thread Adam Pearson
Hello Sridhar, Have you tried the 'coalesce' function to handle the nulls? Kind Regards, Adam Pearson From: pgsql-general-ow...@postgresql.org on behalf of Sridhar N Bamandlapally Sent: 12 May 2016 09:47 To: PG-General Mailing List; PostgreS

Re: [GENERAL] Foreign key triggers

2016-05-14 Thread Adam Brusselback
Yes, foreign keys are implemented using triggers. Here is a blog post explaining a little more: http://bonesmoses.org/2014/05/14/foreign-keys-are-not-free/ I would assume it's still got to do a seq scan even on every referencing table even if it's empty for every record since there are no indexes.

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-18 Thread Adam Brusselback
> On Tue, May 17, 2016 at 1:54 PM, Raymond O'Donnell wrote: > > Having said all that, I've rarely had any trouble with pgAdmin 3 on > > Windows 7 and XP, Ubuntu and Debian; just a very occasional crash (maybe > > one every six months). So just to chime in, it has not been at all that stable fo

Re: [GENERAL] first_value/last_value

2016-05-18 Thread Adam Brusselback
Is there a reason you can't do that now with a limit 1/order by/union all? Just have it ordered one way on the first query and the other on the bottom. That will give you two rows that are the first / last in your set based on whatever column you order on. On May 18, 2016 8:47 PM, "Tom Smith" wrot

Re: [GENERAL] first_value/last_value

2016-05-18 Thread Adam Brusselback
Here is an example that works in a single query. Since you have two different orders you want the data back in, you need to use subqueries to get the proper data back, but it works, and is very fast. CREATE TEMPORARY TABLE foo AS SELECT generate_series as bar FROM generate_series(1, 100); CR

[GENERAL] Date style handling changes between 7.4.12 and 8.2.4

2007-06-12 Thread Adam Witney
with date handling has changed? I have found date_trunc and extract in the docs, but can't seem to get the syntax right to get this to work... Is there a function that can convert the string to be acceptable for 8.2.4? Thanks in advance adam ---(end of broadcas

Re: [GENERAL] Date style handling changes between 7.4.12 and 8.2.4

2007-06-12 Thread Adam Witney
Excellent, thanks very much. Will this make it into the general source tree? Or would I have to patch this with future upgrades? adam On 12/6/07 16:51, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> In 7.4.12 this would w

Re: [GENERAL] Mac OS X

2007-07-12 Thread Adam Witney
ollow the installation instructions for Unix in the INSTALL file that comes with the source. If you have any problems then post the errors back to the list and someone should be able to help... Cheers Adam ---(end of broadcast)--- TIP 9: In versio

Re: [GENERAL] Restrict access

2007-08-02 Thread Adam Witney
won't require a password from that connection location/type. You will need to run a "pg_ctl reload" to make any changes take effect HTH Adam ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] ORDER BY on multiple columns still requires multi-col index?

2007-08-04 Thread pritchard . adam
(col, pk_col) indexes on for every column in every pageable table, but that hurts insert performance (I need both fast read and insert). Is there a way to achieve this without ton of two-col indexes? Thanks in advance. Adam Pritchard ---(end of broadcast)--

Re: [GENERAL] import content of XLS file into PostgreSQL

2007-08-06 Thread Adam Witney
d write a perl script to read the XLS file and insert the data from that adam ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Confusing performance of specific query

2007-08-09 Thread Adam Endicott
sted in the performance difference between the two machines than I am in changing this query to something better. When I run EXPLAIN ANALYZE on this query, it takes something like 1200ms on my desktop (Dual 2GHz G5 Mac - 1.5 GB RAM for reference) and about 14000ms on the production server (quad

Re: [GENERAL] Confusing performance of specific query

2007-08-09 Thread Adam Endicott
Here's the output from explain analyze. My desktop: - Unique (cost=6732.86..7380.50 rows=504 width=677) (actual time=844.345..1148.705 rows=65 loops=1) -> Sort (cost=6732.86..6773.34 rows=16191 width=677) (actual time=844.341..1099.446 rows=16191 loops=1) Sort Key:

Re: [GENERAL] Confusing performance of specific query

2007-08-17 Thread Adam Endicott
On Aug 9, 10:47 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > Do you have comparable work_mem settings on both machines? Another > thing to look at, if any of the sort key columns are textual, is whether > the lc_collate settings are the same. work_mem is commented out in both postgresql.conf files:

[GENERAL] Locking & concurrency - best practices

2008-01-14 Thread Adam Rich
I have a "parent_tbl" and dozens of data tables, with foreign keys referencing the PK of "parent_tbl" (one-to-many). There are 100+ users accessing the application, usually (but not always) each user is working on a different record in parent_tbl. (this would seem like a pretty standard scena

Re: [GENERAL] Locking & concurrency - best practices

2008-01-14 Thread Adam Rich
> You should be able to do "select for update" on both parent and child > records and get the effect you desire. > I don't think that will work. Let me demonstrate: (this is simplified, but sufficient to make my point) -- Connection 1 -- begin trans; select * from parent_tbl where id=1 for upda

Re: [GENERAL] Locking & concurrency - best practices

2008-01-14 Thread Adam Rich
> > From what I can tell, this kind of roll-your-own application level > locking system is exactly what advisory locks are for. Search the > archives for the last couple of weeks as I remember someone posting > some really helpful functions to assist in using advisory locks. > > Erik Jones Yes

Re: [GENERAL] Locking & concurrency - best practices

2008-01-14 Thread Adam Rich
> Advisory locks would work here (better that than table lock), but I > don't think that's the right approach. Transaction 2 should simply do > a > select * from parent_tbl > where id=1 for update; > > at the start of the transaction. That's actually what I'm doing (just forgot to include it in

[GENERAL] altering foreign keys

2008-01-22 Thread Adam Rich
In my database, I have a core table that nearly all other tables key against. Now I need to adjust all of those foreign keys to add a "on update cascade" action. Is there a way to alter the existing keys? (it didn't jump out at me in the manual) If not, is there a serious issue preventing this

Re: [GENERAL] altering foreign keys

2008-01-22 Thread Adam Rich
> In my database, I have a core table that nearly all other tables > key against. Now I need to adjust all of those foreign keys to > add a "on update cascade" action. Is there a way to alter the > existing keys? (it didn't jump out at me in the manual) > Would it be possible to modify confupdt

Re: [GENERAL] Simple row serialization?

2008-01-26 Thread Adam Rich
> I'd like to implement some simple data logging via triggers on a small > number of infrequently updated tables and I'm wondering if there are > some helpful functions, plugins or idioms that would serialize a row If you're familiar with perl, you can try PL/Perl. http://www.postgresql.org/docs

Re: [GENERAL] Getting the count(*) from two tables and two date ranges in same query

2008-01-28 Thread Adam Rich
> Resulting in 4 columns in the ResultSet like: > > count(*)_from_table2_between_fromdate1_and_todate1 = X > count(*)_from_table2_between_fromdate2_and_todate2 = Y > count(*)_from_table3_between_fromdate1_and_todate1 = Z > count(*)_from_table3_between_fromdate2_and_todate2 = V > > Is thi

Re: [GENERAL] Oracle Analytical Functions

2008-01-30 Thread Adam Rich
> and I would like to create a new view that takes the first table and > calculates the time difference in minutes between each row so that the > result is something like: > > client_id,datetime, previousTime, difftime > 122,2007-05-01 12:01:00, 2007-05-01 12:00:00, 1 > 455,2007-05-01 12:03:00, 20

Re: [GENERAL] Oracle Analytical Functions

2008-01-30 Thread Adam Rich
> I tried this function but it keeps returning an error such as: > > ERROR: invalid input syntax for integer: "2007-05-05 00:34:08" > SQL state: 22P02 > Context: PL/pgSQL function "lagfunc" line 10 at assignment Whoops, this line: > > client_id := thisrow.datetime; Should be: clien

[GENERAL] Error when using phpPgAdmin

2010-12-22 Thread Adam Bruss
AND NOT pdb.datistemplate ORDER BY pdb.datname" I'm running on Windows 7 x64. On a side note I've been using the pgql command line tool and pgadmin 3 for a few days without any problems. Thanks, Adam Adam Bruss Development Engineer AWR Corpo

Re: [GENERAL] Large object performance

2011-01-12 Thread Wohld, Adam
unsubscribe -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] PostgreSQL 9.0.3 - collate/ctype order by hu_HU.UTF8 is not correct sorting

2011-02-05 Thread Adam PAPAI
all docs on this topic and all sais the LC_COLLATE and LC_CTYPE solves it, but it seems not. Any advice would be helpful. Thanks in advance, -- Adam PAPAI BSD Support Service http://www.bsdsupportservice.hu E-mail: adam.pa...@bsdsupportservice.hu Phone: +36 30 33-55-735 (Hungary) --

Re: [GENERAL] PostgreSQL 9.0.3 - collate/ctype order by hu_HU.UTF8 is not correct sorting

2011-02-05 Thread Adam PAPAI
8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 8192 Bytes per WAL segment:16777216 Maximum length of identifiers:64 Maximum columns in an index: 32 Maximum size of a TOAST chunk:1996 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value -- Adam PAPAI BSD Support Service http://www.bsdsupportservice.hu E-mail: adam.pa...@bsdsupportservice.hu Phone: +36 30 33-55-735 (Hungary) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PostgreSQL 9.0.3 - collate/ctype order by hu_HU.UTF8 is not correct sorting

2011-02-06 Thread Adam PAPAI
Pavel Stehule wrote: > 2011/2/5 Adam PAPAI : > your system locales is correct? PostgreSQL uses only system libs I've tested it with a fresh 8.4 and 9.0. It's the same. My FreeBSD 8.1 supports hu_HU.UTF-8, but I don't know why it's not working. initdb output: [ro

Re: [GENERAL] PostgreSQL 9.0.3 - collate/ctype order by hu_HU.UTF8 is not correct sorting

2011-02-06 Thread Adam PAPAI
Adam PAPAI wrote: > Pavel Stehule wrote: >> 2011/2/5 Adam PAPAI : > >> your system locales is correct? PostgreSQL uses only system libs > > I've tested it with a fresh 8.4 and 9.0. > > It's the same. > > My FreeBSD 8.1 supports hu_HU.UTF-8, but I

Re: [GENERAL] PostgreSQL 9.0.3 - collate/ctype order by hu_HU.UTF8 is not correct sorting

2011-02-06 Thread Adam PAPAI
Radosław Smogura wrote: > You need to create database with LC_COLLATE="hu_HU.utf8", e.g. > > CREATE DATABASE tx2 ENCODING='UTF-8' TEMPLATE=template0 > LC_COLLATE='pl_PL.utf8'; > Are you running it under FreeBSD? -- Adam PAPAI BSD Support S

Re: [GENERAL] pg_dump makes our system unusable - any way to pg_dump in the middle of the day? (postgres 8.4.4)

2011-02-24 Thread Adam Bruss
7:09 PM, Adam Bruss wrote: > I'm using cruisecontrol and ant to back up our database at certain > times on certain days of the week. Cruisecontrol sends out completion > emails when it's done. I don't think pgsql has a good built in way to > schedule backups. C

[GENERAL] User-defined operator function: what parameter type to use for uncast character string?

2014-07-30 Thread Adam Mackler
its second parameter type is either varchar and char(3), but those still require a cast in the WHERE-clause of the query. I've also tried anyelement, but that does not work even with a cast. Thank you, -- Adam Mackler -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Re: User-defined operator function: what parameter type to use for uncast character string?

2014-07-31 Thread Adam Mackler
e defining all possible cominations, which even in this limited example would be 26^3 values? I just used three uppercase letters (and case-insensitive matching) as an example. In my actual application I have twelve characters and the operator function is doing more advanced regular-expression matching. Thanks again, -- Adam Mackler -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Re: User-defined operator function: what parameter type to use for uncast character string?

2014-07-31 Thread Adam Mackler
n between two data types,' that the meaning of "data type" includes only those created using 'CREATE TYPE' and excludes domains. If I am mistaken on that point I would be grateful to learn of that mistake. Thanks again, -- Adam Mackler -- Sent via pgsql-general mailing li

Re: [GENERAL] table versioning approach (not auditing)

2014-09-30 Thread Adam Brusselback
Felix, I'd love to see a single, well maintained project. For example, I just found yours, and gave it a shot today after seeing this post. I found a bug when an update command is issued, but the old and new values are all the same. The trigger will blow up. I've got a fix for that, but if we ha

Re: [GENERAL] table versioning approach (not auditing)

2014-10-01 Thread Adam Brusselback
here to go next. I think switching to JSONB > for example will be easy, as it offers the same functions than JSON afaik. > > > Gesendet: Dienstag, 30. September 2014 um 21:16 Uhr > Von: "Adam Brusselback" > An: "Felix Kunde" > Cc: "pgsql-general@post

Re: [GENERAL] table versioning approach (not auditing)

2014-10-02 Thread Adam Brusselback
s is on an i5 desktop with 16 gigs of ram and an ssd. This is a pretty good test though, as it's a real world use case (even if the data was generated with PGBench). We now know that area needs some work before it can be used for anything more than a toy database. Thanks, -Adam On Thu, Oct

Re: [GENERAL] table versioning approach (not auditing)

2014-10-02 Thread Adam Brusselback
Ended up running for 28 min, but it did work as expected. On Thu, Oct 2, 2014 at 10:27 AM, Adam Brusselback wrote: > Testing that now. Initial results are not looking too performant. > I have one single table which had 234575 updates done to it. I am rolling > back 13093 of them.

[GENERAL] Conflicting function name in dynamically-loaded shared library

2015-01-27 Thread Adam Mackler
s "point_add()" function? I know I could ask that project's developers to change the function's name, but that could break other code that currently uses it, and even if it didn't, I would prefer something less intrusive on that project. Thanks very much for any ideas ab

Re: [GENERAL] Conflicting function name in dynamically-loaded shared library

2015-01-29 Thread Adam Mackler
PostgreSQL. Thank you for the response and insight. -- Adam Mackler -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] VACUUM FULL pg_largeobject without (much) downtime?

2015-02-03 Thread Adam Hooper
75 pages, containing 25085 live rows and 0 dead rows; 25085 rows in sample, 24203398 estimated total rows VACUUM Enjoy life, Adam -- Adam Hooper +1-613-986-3339 http://adamhooper.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] VACUUM FULL pg_largeobject without (much) downtime?

2015-02-03 Thread Adam Hooper
On Tue, Feb 3, 2015 at 12:58 PM, Bill Moran wrote: > On Tue, 3 Feb 2015 10:53:11 -0500 > Adam Hooper wrote: > >> This plan won't work: Step 2 will be too slow because pg_largeobject >> still takes 266GB. We tested `VACUUM FULL pg_largeobject` on our >> staging dat

Re: [GENERAL] VACUUM FULL pg_largeobject without (much) downtime?

2015-02-03 Thread Adam Hooper
On Tue, Feb 3, 2015 at 2:29 PM, Bill Moran wrote: > On Tue, 3 Feb 2015 14:17:03 -0500 > Adam Hooper wrote: > > My recommendation here would be to use Slony to replicate the data to a > new server, then switch to the new server once the data has synchornized. Looks exciting. Bu

Re: [GENERAL] VACUUM FULL pg_largeobject without (much) downtime?

2015-02-04 Thread Adam Hooper
On Tue, Feb 3, 2015 at 3:12 PM, Bill Moran wrote: > On Tue, 3 Feb 2015 14:48:17 -0500 > Adam Hooper wrote: > >> It's doable for us to VACUUM FULL and add a notice to our website >> saying, "you can't upload files for the next two hours." Maybe that

Re: [GENERAL] Row-level Security vs Application-level authz

2015-02-24 Thread Adam Hooper
s to an endpoint with the given parameters. Postgres RLS seems like a bad approach for that use case. Enjoy life, Adam -- Adam Hooper +1-613-986-3339 http://adamhooper.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Hex characters in COPY input

2015-02-27 Thread Adam Hooper
#x27;ve memorized 0xe9 in particular, because we've been through your pain before. In the Americas and Western Europe, if a file contains the byte 0xe9 it probably contains the character "é" encoded as windows-1252/ISO-8859-1/ISO-8859-15. That's very common. MySQL in particula

[GENERAL] Enforcing Parameterised Nested Loop Join Order for Foreign Table Joins

2013-03-17 Thread Adam Zegelin
Hello, I’m in the process of writing a Postgres FDW that can interface with web service endpoints. Certain FDW columns would act as web service parameters, while others would be the output. For example: adam=# select * from bing where query = 'xbox'; query |

Re: [GENERAL] Enforcing Parameterised Nested Loop Join Order for Foreign Table Joins

2013-03-18 Thread Adam Zegelin
given a restriction based on one of the other two tables: adam=# explain select * from l1, l2, foreign1 where foreign1.a = l1.a and foreign1.b = l2.a; QUERY PLAN

Re: [GENERAL] Enforcing Parameterised Nested Loop Join Order for Foreign Table Joins

2013-03-24 Thread Adam Zegelin
t would require a logic change inside the planner itself? Regards, Adam smime.p7s Description: S/MIME cryptographic signature

Re: [GENERAL] Search on very big (partitioned) table

2017-02-20 Thread Adam Brusselback
Do you have non overlapping check constraints on the partitions by date to allow the planner to exclude the child tables from needing to be looked at?

[GENERAL] pg_dump recording privileges on foreign data wrappers

2017-03-30 Thread Adam Mackler
there a way to get pg_dump to output the necessary statements such that running the dump back through psql results in the same priviliges that I started with? I am using version 9.5.6. Thanks very much, -- Adam Mackler -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in the future?

2017-05-07 Thread Adam Brusselback
> > there's also pg_agent which is a cron-like extension, usually bundled with > pg_admin but also available standalone > > https://www.pgadmin.org/docs4/dev/pgagent.html > > > -- > john r pierce, recycling bits in santa cruz > In addition to that, there is also jpgAgent: https://github.com/GoSim

[GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-07 Thread Adam Sjøgren
before. We will be upgrading to PostgreSQL 9.3.17 during the weekend, but I'd like to hear if anyone has seen something like this, or have some ideas of how to investigate/what the cause might be. Best regards, Adam -- "Lägg ditt liv i min hand Ada

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-08 Thread Adam Sjøgren
er to identify the damaged row(s). And then do some > good update to create a new version. Yes - we started by doing a quick pg_dump, but I guess we should switch to something that can tell us exactly what rows hit the problem. Anyone has a handy little script lying around? Thanks for t

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-08 Thread Adam Sjøgren
s other than pg_default? > I can only replicate the issue when using separately mounted > tablespaces. No, we are using pg_default only. I hope your finding can be reproduced, it would be really interesting to see. Best regards, Adam -- "Lägg ditt liv i min hand

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-11 Thread Adam Sjøgren
Alvaro Herrera wrote: > ADSJ (Adam Sjøgren) wrote: > >> Our database has started reporting errors like this: >> >> 2017-05-31 13:48:10 CEST ERROR: unexpected chunk number 0 (expected 1) >> for toast value 14242189 in pg_toast_10919630 > Does the problem sti

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-21 Thread Adam Sjøgren
Adam Sjøgren wrote: > Meanwhile, I can report that I have upgraded from 9.3.14 to 9.3.17 and > the errors keep appearing the log. Just a quick update with more observations: All the errors in the postgres.log from one of the tables are triggered by a stored procedure that gathers data

Re: [GENERAL] Materialised view - refresh

2017-07-11 Thread Adam Brusselback
You can use something like cron, windows task scheduler (if you're running windows), pgagent (or jpgagent), pg_cron, or any of the others. I personally use (and wrote) jpgagent, at the time pgagent was the only alternative and it was very unstable for me. Here is the link if interested: https://g

[GENERAL] How to get transaction started always in WRITE mode.

2017-07-25 Thread Adam Šlachta
rg.springframework.orm.jpa.JpaTransactionManager Spring @Transactional(read-only) hint -> where we could we set it to "false" Our typical @Repository extends org.springframework.data.jpa.repository.JpaRepository, which uses implementation from org.springframework

Re: [GENERAL] How to get transaction started always in WRITE mode.

2017-07-25 Thread Adam Šlachta
how to find it out eg. in PostgreSQL logs how the read-only flag is setup for current transaction? We have tried to enable full logging (postgresql.conf) however reading it is quite tough and we did not get any closer to the solution. Thank you for your help so far, Adam ---

  1   2   3   4   5   6   >