Hacker Newsnew | past | comments | ask | show | jobs | submit | nierman's commentslogin

you can also take advantage of transactions:

  begin;
  delete from product where id = 123;
  --verify things are correct with counts, by issuing "selects", etc.
and then issue either a "rollback;" or a "commit;"... I've been happy to have followed this pattern on occasion ;)


I grew up in Washington State and remember eating a lot of Gala, Braeburn, and Fuji apples in that time period; I think those are all pretty good apples to eat "out of hand" (compared to what you list for sure; a granny smith is great in a pie though!). Yeah, some of the tasty varieties like Cameo, Honeycrisp, etc, etc, weren't really widely available until quite a bit later, even if they were discovered in the 80s/90s.

You are right: durability and surviving extended stays in "cold storage" was a big factor.


I love fresh broccoli, but as a Canuck, the closest I can get in the winter is often shipped from Mexico, or further away.

While not a different variety like the apples you mention, the result is the same. Dull, flavourless, unpalatable. So much so that I seem to eat much more broccoli in the summer, especially when locally grown, and bought day of pick.

Recently, I realised that fat accumulated also stores vitamins, etc, which is why animal fat is so nutritious. For example, people with an excess intake of some vitamins, can have issues getting those levels down, if it has been going on long enough to accumulate in their fat stores.

My point here is, I have found myself, yearly, gaining some weight at the end of summer, early fall. Not a lot, 10 lbs isn't much when 6'2". But it is interesting to me, for I do love the taste of summer's bounty, and that includes fresh, local apples.

The taste I think is not just the texture, flavour, but also the body detecting the enhanced nutritional content.

The body knows 'this is good', and thus I think wants to store excess nutrition in fat to see through the winter.

Anyhow, yes... love those local, freshly picked apples.


You were fortunate to live in Washington. The cultivars you listed are the first that I saw appear widely in the late 90s. I suspect we have you local consumers to thank for popularizing them.


yes, wal archiving would have helped (archive_command = rsync standby ...), but it's also very easy in postgres 9.4+ to add a replication slot on the master so that wal is kept until it is no longer needed by the standby. simply reference the slot in the standby's recovery.conf file.

definitely monitor your replication lag--or at least disk usage on the master--with this approach (in case wal starts piling up there).


with respect to "Difficulty upgrading to newer releases":

pg_upgade has a --link option which uses hard links in the new cluster to reference files from the old cluster. This can be a very fast way to do upgrades even for large databases (most of the data between major versions will look the same; perhaps only some mucking with system catalogs is required in the new cluster). Furthermore, you can use rsync with --hard-links to very quickly upgrade your standby instances (creating hard links on the remote server rather than transferring the full data).

that is all referenced in the current documentation: https://www.postgresql.org/docs/current/static/pgupgrade.htm...


I don't usually eat breakfast, but one of the cereals I really like is Heritage Flakes from Nature's Path: http://us.naturespath.com/product/heritager-flakes

I wouldn't consider it the same as "eating a donut" (the cereal has 4g sugar and 5g fiber per 3/4 cup serving).


yeah, the current/official JDBC driver does not support async listen/notify so you have to do polling.

note, the following jdbc driver can do async listen/notify: http://impossibl.github.io/pgjdbc-ng/


the way in which notify/listen interacts with transactions is interesting; from the docs:

http://www.postgresql.org/docs/9.5/static/sql-notify.html

"... if a NOTIFY is executed inside a transaction, the notify events are not delivered until and unless the transaction is committed. This is appropriate, since if the transaction is aborted, all the commands within it have had no effect, including NOTIFY.... Secondly, if a listening session receives a notification signal while it is within a transaction, the notification event will not be delivered to its connected client until just after the transaction is completed (either committed or aborted). Again, the reasoning is that if a notification were delivered within a transaction that was later aborted, one would want the notification to be undone somehow — but the server cannot "take back" a notification once it has sent it to the client. So notification events are only delivered between transactions."


I'd like to make more use of it but it can't "repack" tables that have gist indices (e.g., postgis spatial indices, etc).


note: there are also "skip locked" and "nowait" clauses in Postgres 9.5 for more flexibility when dealing with row level locking. This gives you the option of failing immediately (nowait) or just getting back the set of rows that aren't locked (skip locked).

https://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9....


Running more aggressive vacuums that will clean up "old" tuples/tables is good for off-peak times. See Josh Berkus' short three part blog series on postgres' vacuum/freeze: http://www.databasesoup.com/2012/09/freezing-your-tuples-off...

and his python script for doing this: https://github.com/pgexperts/flexible-freeze

Also, note that long running transactions can prevent cleanup of tuples. Look for old xact_start values of non-idle queries in pg_stat_activity (particularly "idle in transaction" connections) and old entries in pg_prepared_xacts.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: