How to store thousands of properties related to a record in PostgreSQL?
You could create a table to hold the key/value pairs like such:

CREATE TABLE KEY_VALUE (
  ID BIGINT, -- THIS COULD BE A FKEY TO YOUR '300K' RECORD TABLE
  KEY VARCHAR,
  VALUE VARCHAR
);


As long as this table is indexed properly (an index on id/key, I imagine), getting any key/value pairs you are interested in should still be very quick, even if it's millions of rows large. Granted - this solution as a viable option really depends on what scope of data you expect to store with your key/value pairs (is it all text? or numbers? etc..). Perhaps adding a 3rd column to say what type of data the value is would help.

EDIT


https://sqlblog.org/2009/11/19/what-is-so-bad-about-eav-anyway


Just to be clear, btw - I figured this might work given the sheer number of different key->value pairs you said you would have..  If it were a small number, I would probably just have a "details" type of table where each value was stored in a column.